diff mbox

[dpdk-dev,v2,2/6] igb: change for VMDQ arguments expansion

Message ID 1413454046-13407-3-git-send-email-jing.d.chen@intel.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Chen, Jing D Oct. 16, 2014, 10:07 a.m. UTC
From: "Chen Jing D(Mark)" <jing.d.chen@intel.com>

Assign new VMDQ arguments with correct values.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
---
 lib/librte_pmd_e1000/igb_ethdev.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Comments

Thomas Monjalon Nov. 3, 2014, 6:37 p.m. UTC | #1
2014-10-16 18:07, Chen Jing D:
> --- a/lib/librte_pmd_e1000/igb_ethdev.c
> +++ b/lib/librte_pmd_e1000/igb_ethdev.c
> @@ -1286,18 +1286,21 @@ eth_igb_infos_get(struct rte_eth_dev *dev,
>  		dev_info->max_rx_queues = 16;
>  		dev_info->max_tx_queues = 16;
>  		dev_info->max_vmdq_pools = ETH_8_POOLS;
> +		dev_info->vmdq_queue_num = 16;
>  		break;
>  
>  	case e1000_82580:
>  		dev_info->max_rx_queues = 8;
>  		dev_info->max_tx_queues = 8;
>  		dev_info->max_vmdq_pools = ETH_8_POOLS;
> +		dev_info->vmdq_queue_num = 8;
>  		break;
>  
>  	case e1000_i350:
>  		dev_info->max_rx_queues = 8;
>  		dev_info->max_tx_queues = 8;
>  		dev_info->max_vmdq_pools = ETH_8_POOLS;
> +		dev_info->vmdq_queue_num = 8;
>  		break;

Why not simply set it only once?
	dev_info->vmdq_queue_num = dev_info->max_rx_queues;
Chen, Jing D Nov. 4, 2014, 5:26 a.m. UTC | #2
Hi, 

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Tuesday, November 04, 2014 2:37 AM
> To: Chen, Jing D
> Cc: dev@dpdk.org; Ananyev, Konstantin
> Subject: Re: [PATCH v2 2/6] igb: change for VMDQ arguments expansion
> 
> 2014-10-16 18:07, Chen Jing D:
> > --- a/lib/librte_pmd_e1000/igb_ethdev.c
> > +++ b/lib/librte_pmd_e1000/igb_ethdev.c
> > @@ -1286,18 +1286,21 @@ eth_igb_infos_get(struct rte_eth_dev *dev,
> >  		dev_info->max_rx_queues = 16;
> >  		dev_info->max_tx_queues = 16;
> >  		dev_info->max_vmdq_pools = ETH_8_POOLS;
> > +		dev_info->vmdq_queue_num = 16;
> >  		break;
> >
> >  	case e1000_82580:
> >  		dev_info->max_rx_queues = 8;
> >  		dev_info->max_tx_queues = 8;
> >  		dev_info->max_vmdq_pools = ETH_8_POOLS;
> > +		dev_info->vmdq_queue_num = 8;
> >  		break;
> >
> >  	case e1000_i350:
> >  		dev_info->max_rx_queues = 8;
> >  		dev_info->max_tx_queues = 8;
> >  		dev_info->max_vmdq_pools = ETH_8_POOLS;
> > +		dev_info->vmdq_queue_num = 8;
> >  		break;
> 
> Why not simply set it only once?
> 	dev_info->vmdq_queue_num = dev_info->max_rx_queues;

There are some other NIC types in this 'switch'.  Vmdq_queue_num is set in case max_vmdq_pools is not 0.
> 
> --
> Thomas
diff mbox

Patch

diff --git a/lib/librte_pmd_e1000/igb_ethdev.c b/lib/librte_pmd_e1000/igb_ethdev.c
index c9acdc5..dc0ea6d 100644
--- a/lib/librte_pmd_e1000/igb_ethdev.c
+++ b/lib/librte_pmd_e1000/igb_ethdev.c
@@ -1286,18 +1286,21 @@  eth_igb_infos_get(struct rte_eth_dev *dev,
 		dev_info->max_rx_queues = 16;
 		dev_info->max_tx_queues = 16;
 		dev_info->max_vmdq_pools = ETH_8_POOLS;
+		dev_info->vmdq_queue_num = 16;
 		break;
 
 	case e1000_82580:
 		dev_info->max_rx_queues = 8;
 		dev_info->max_tx_queues = 8;
 		dev_info->max_vmdq_pools = ETH_8_POOLS;
+		dev_info->vmdq_queue_num = 8;
 		break;
 
 	case e1000_i350:
 		dev_info->max_rx_queues = 8;
 		dev_info->max_tx_queues = 8;
 		dev_info->max_vmdq_pools = ETH_8_POOLS;
+		dev_info->vmdq_queue_num = 8;
 		break;
 
 	case e1000_i354: