[dpdk-dev] net/i40e: fix VLAN offload setting

Message ID 20171129102730.81197-1-qi.z.zhang@intel.com
State Accepted, archived
Delegated to: Helin Zhang
Headers show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Zhang, Qi Z Nov. 29, 2017, 10:27 a.m.
Vlan offload flag "rx_mode.hw_vlan_extend" should be considerred at
rte_eth_dev_configure stage as well as "rx_mode.hw_vlan_strip" and
"rx_mode.hw_vlan_filter".

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Beilei Xing Nov. 30, 2017, 6:53 a.m. | #1
> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Wednesday, November 29, 2017 6:28 PM
> To: Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; stable@dpdk.org
> Subject: [PATCH] net/i40e: fix VLAN offload setting
> 
> Vlan offload flag "rx_mode.hw_vlan_extend" should be considerred at
> rte_eth_dev_configure stage as well as "rx_mode.hw_vlan_strip" and
> "rx_mode.hw_vlan_filter".
> 
> Fixes: 4861cde46116 ("i40e: new poll mode driver")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>

Acked-by: Beilei Xing <beilei.xing@intel.com>
Helin Zhang Dec. 20, 2017, 2:42 a.m. | #2
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Xing, Beilei
> Sent: Thursday, November 30, 2017 2:53 PM
> To: Zhang, Qi Z
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix VLAN offload setting
> 
> 
> > -----Original Message-----
> > From: Zhang, Qi Z
> > Sent: Wednesday, November 29, 2017 6:28 PM
> > To: Xing, Beilei <beilei.xing@intel.com>
> > Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; stable@dpdk.org
> > Subject: [PATCH] net/i40e: fix VLAN offload setting
> >
> > Vlan offload flag "rx_mode.hw_vlan_extend" should be considerred at
> > rte_eth_dev_configure stage as well as "rx_mode.hw_vlan_strip" and
> > "rx_mode.hw_vlan_filter".
> >
> > Fixes: 4861cde46116 ("i40e: new poll mode driver")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> 
> Acked-by: Beilei Xing <beilei.xing@intel.com>

Applied to next-net-intel. Thank you all! /Helin

Patch

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 811cc9f..0739f65 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -5315,15 +5315,15 @@  i40e_dev_init_vlan(struct rte_eth_dev *dev)
 	int mask = 0;
 
 	/* Apply vlan offload setting */
-	mask = ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK;
+	mask = ETH_VLAN_STRIP_MASK |
+	       ETH_VLAN_FILTER_MASK |
+	       ETH_VLAN_EXTEND_MASK;
 	ret = i40e_vlan_offload_set(dev, mask);
 	if (ret) {
 		PMD_DRV_LOG(INFO, "Failed to update vlan offload");
 		return ret;
 	}
 
-	/* Apply double-vlan setting, not implemented yet */
-
 	/* Apply pvid setting */
 	ret = i40e_vlan_pvid_set(dev, data->dev_conf.txmode.pvid,
 				data->dev_conf.txmode.hw_vlan_insert_pvid);