DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done.
@ 2016-09-06 12:05 wang wei
  2016-09-07  1:33 ` Wu, Jingjing
  2016-09-08  1:07 ` Lu, Wenzhuo
  0 siblings, 2 replies; 8+ messages in thread
From: wang wei @ 2016-09-06 12:05 UTC (permalink / raw)
  To: thomas.monjalon; +Cc: dev

if start rxtx before flow director config, will cause driver can't receive
packets from nic.

Signed-off-by: wang wei <lnykww@gmail.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 60 ++++++++++++++++++++--------------------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index fb618ef..5ee51d5 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -2291,6 +2291,36 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
 		goto error;
 	}
 
+    mask = ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK |
+		ETH_VLAN_EXTEND_MASK;
+	ixgbe_vlan_offload_set(dev, mask);
+
+	if (dev->data->dev_conf.rxmode.mq_mode == ETH_MQ_RX_VMDQ_ONLY) {
+		/* Enable vlan filtering for VMDq */
+		ixgbe_vmdq_vlan_hw_filter_enable(dev);
+	}
+
+	/* Configure DCB hw */
+	ixgbe_configure_dcb(dev);
+
+	if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_NONE) {
+		err = ixgbe_fdir_configure(dev);
+		if (err)
+			goto error;
+	}
+
+	/* Restore vf rate limit */
+	if (vfinfo != NULL) {
+		for (vf = 0; vf < dev->pci_dev->max_vfs; vf++)
+			for (idx = 0; idx < IXGBE_MAX_QUEUE_NUM_PER_VF; idx++)
+				if (vfinfo[vf].tx_rate[idx] != 0)
+					ixgbe_set_vf_rate_limit(dev, vf,
+						vfinfo[vf].tx_rate[idx],
+						1 << idx);
+	}
+
+	ixgbe_restore_statistics_mapping(dev);
+
 	err = ixgbe_dev_rxtx_start(dev);
 	if (err < 0) {
 		PMD_INIT_LOG(ERR, "Unable to start rxtx queues");
@@ -2376,36 +2406,6 @@ skip_link_setup:
 	/* resume enabled intr since hw reset */
 	ixgbe_enable_intr(dev);
 
-	mask = ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK |
-		ETH_VLAN_EXTEND_MASK;
-	ixgbe_vlan_offload_set(dev, mask);
-
-	if (dev->data->dev_conf.rxmode.mq_mode == ETH_MQ_RX_VMDQ_ONLY) {
-		/* Enable vlan filtering for VMDq */
-		ixgbe_vmdq_vlan_hw_filter_enable(dev);
-	}
-
-	/* Configure DCB hw */
-	ixgbe_configure_dcb(dev);
-
-	if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_NONE) {
-		err = ixgbe_fdir_configure(dev);
-		if (err)
-			goto error;
-	}
-
-	/* Restore vf rate limit */
-	if (vfinfo != NULL) {
-		for (vf = 0; vf < dev->pci_dev->max_vfs; vf++)
-			for (idx = 0; idx < IXGBE_MAX_QUEUE_NUM_PER_VF; idx++)
-				if (vfinfo[vf].tx_rate[idx] != 0)
-					ixgbe_set_vf_rate_limit(dev, vf,
-						vfinfo[vf].tx_rate[idx],
-						1 << idx);
-	}
-
-	ixgbe_restore_statistics_mapping(dev);
-
 	return 0;
 
 error:
-- 
2.7.4 (Apple Git-66)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done.
  2016-09-06 12:05 [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done wang wei
@ 2016-09-07  1:33 ` Wu, Jingjing
  2016-09-07  4:30   ` wei wang
  2016-09-08  1:07 ` Lu, Wenzhuo
  1 sibling, 1 reply; 8+ messages in thread
From: Wu, Jingjing @ 2016-09-07  1:33 UTC (permalink / raw)
  To: wang wei, thomas.monjalon; +Cc: dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of wang wei
> Sent: Tuesday, September 6, 2016 8:05 PM
> To: thomas.monjalon@6wind.com
> Cc: dev@dpdk.org
> Subject: [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done.
> 
> if start rxtx before flow director config, will cause driver can't receive packets
> from nic.
> 
Good pointer. How about move all flow director and VMDQ configure to
ixgbe_dev_configure?

Thanks
Jingjing

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done.
  2016-09-07  1:33 ` Wu, Jingjing
@ 2016-09-07  4:30   ` wei wang
  0 siblings, 0 replies; 8+ messages in thread
From: wei wang @ 2016-09-07  4:30 UTC (permalink / raw)
  To: Wu, Jingjing; +Cc: thomas.monjalon, dev

2016-09-07 9:33 GMT+08:00 Wu, Jingjing <jingjing.wu@intel.com>:
>
>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of wang wei
>> Sent: Tuesday, September 6, 2016 8:05 PM
>> To: thomas.monjalon@6wind.com
>> Cc: dev@dpdk.org
>> Subject: [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done.
>>
>> if start rxtx before flow director config, will cause driver can't receive packets
>> from nic.
>>
> Good pointer. How about move all flow director and VMDQ configure to
> ixgbe_dev_configure?
>
> Thanks
> Jingjing

Initialization of flow director and VMDQ needs to be after calling
ixgbe_pf_reset_hw, otherwise the configuration will be lost.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done.
  2016-09-06 12:05 [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done wang wei
  2016-09-07  1:33 ` Wu, Jingjing
@ 2016-09-08  1:07 ` Lu, Wenzhuo
  2016-09-20 14:17   ` Ferruh Yigit
  1 sibling, 1 reply; 8+ messages in thread
From: Lu, Wenzhuo @ 2016-09-08  1:07 UTC (permalink / raw)
  To: wang wei, thomas.monjalon; +Cc: dev

Hi Wei,


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of wang wei
> Sent: Tuesday, September 6, 2016 8:05 PM
> To: thomas.monjalon@6wind.com
> Cc: dev@dpdk.org
> Subject: [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done.
> 
> if start rxtx before flow director config, will cause driver can't receive packets
> from nic.
> 
> Signed-off-by: wang wei <lnykww@gmail.com>
I think you're right. We should start rx/tx after the config is done.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done.
  2016-09-08  1:07 ` Lu, Wenzhuo
@ 2016-09-20 14:17   ` Ferruh Yigit
  2016-09-21  0:46     ` Lu, Wenzhuo
  0 siblings, 1 reply; 8+ messages in thread
From: Ferruh Yigit @ 2016-09-20 14:17 UTC (permalink / raw)
  To: Lu, Wenzhuo, wang wei, thomas.monjalon; +Cc: dev

Hi Wenzhuo,

On 9/8/2016 2:07 AM, Lu, Wenzhuo wrote:
> Hi Wei,
> 
> 
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of wang wei
>> Sent: Tuesday, September 6, 2016 8:05 PM
>> To: thomas.monjalon@6wind.com
>> Cc: dev@dpdk.org
>> Subject: [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done.
>>
>> if start rxtx before flow director config, will cause driver can't receive packets
>> from nic.
>>
>> Signed-off-by: wang wei <lnykww@gmail.com>
> I think you're right. We should start rx/tx after the config is done.
> 

Is this an Ack?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done.
  2016-09-20 14:17   ` Ferruh Yigit
@ 2016-09-21  0:46     ` Lu, Wenzhuo
  2016-09-21  9:28       ` Ferruh Yigit
  0 siblings, 1 reply; 8+ messages in thread
From: Lu, Wenzhuo @ 2016-09-21  0:46 UTC (permalink / raw)
  To: Yigit, Ferruh, wang wei, thomas.monjalon; +Cc: dev

Hi Ferruh,

> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Tuesday, September 20, 2016 10:18 PM
> To: Lu, Wenzhuo; wang wei; thomas.monjalon@6wind.com
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done.
> 
> Hi Wenzhuo,
> 
> On 9/8/2016 2:07 AM, Lu, Wenzhuo wrote:
> > Hi Wei,
> >
> >
> >> -----Original Message-----
> >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of wang wei
> >> Sent: Tuesday, September 6, 2016 8:05 PM
> >> To: thomas.monjalon@6wind.com
> >> Cc: dev@dpdk.org
> >> Subject: [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done.
> >>
> >> if start rxtx before flow director config, will cause driver can't
> >> receive packets from nic.
> >>
> >> Signed-off-by: wang wei <lnykww@gmail.com>
> > I think you're right. We should start rx/tx after the config is done.
> >
> 
> Is this an Ack?
Yes. 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done.
  2016-09-21  0:46     ` Lu, Wenzhuo
@ 2016-09-21  9:28       ` Ferruh Yigit
  2016-09-21 12:36         ` Bruce Richardson
  0 siblings, 1 reply; 8+ messages in thread
From: Ferruh Yigit @ 2016-09-21  9:28 UTC (permalink / raw)
  To: Lu, Wenzhuo, wang wei, thomas.monjalon; +Cc: dev

...

>>>> Subject: [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done.
>>>>
>>>> if start rxtx before flow director config, will cause driver can't
>>>> receive packets from nic.
>>>>
>>>> Signed-off-by: wang wei <lnykww@gmail.com>
>>> I think you're right. We should start rx/tx after the config is done.
>>>
>>
>> Is this an Ack?
> Yes. 
> 

To put it explicitly:
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done.
  2016-09-21  9:28       ` Ferruh Yigit
@ 2016-09-21 12:36         ` Bruce Richardson
  0 siblings, 0 replies; 8+ messages in thread
From: Bruce Richardson @ 2016-09-21 12:36 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Lu, Wenzhuo, wang wei, thomas.monjalon, dev

On Wed, Sep 21, 2016 at 10:28:39AM +0100, Ferruh Yigit wrote:
> ...
> 
> >>>> Subject: [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done.
> >>>>
> >>>> if start rxtx before flow director config, will cause driver can't
> >>>> receive packets from nic.
> >>>>
> >>>> Signed-off-by: wang wei <lnykww@gmail.com>
> >>> I think you're right. We should start rx/tx after the config is done.
> >>>
> >>
> >> Is this an Ack?
> > Yes. 
> > 
> 
> To put it explicitly:
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

Applied to dpdk-next-net/rel_16_11

/Bruce

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-09-21 12:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-06 12:05 [dpdk-dev] [RFC] net/ixgbe: start rxtx after all nic config done wang wei
2016-09-07  1:33 ` Wu, Jingjing
2016-09-07  4:30   ` wei wang
2016-09-08  1:07 ` Lu, Wenzhuo
2016-09-20 14:17   ` Ferruh Yigit
2016-09-21  0:46     ` Lu, Wenzhuo
2016-09-21  9:28       ` Ferruh Yigit
2016-09-21 12:36         ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).