net/i40e: qinq strip is not supported by i40e

Message ID 20191030182131.72399-1-taox.zhu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: xiaolong ye
Headers
Series net/i40e: qinq strip is not supported by i40e |

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compilation success Compile Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/checkpatch success coding style OK

Commit Message

Zhu, TaoX Oct. 30, 2019, 6:21 p.m. UTC
  From: Zhu Tao <taox.zhu@intel.com>

Qinq strip is not supported by i40e. When user tries to turn on
QinQ strip, the driver gives unsupported return value and log.

Signed-off-by: Zhu Tao <taox.zhu@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Xing, Beilei Nov. 1, 2019, 2:02 a.m. UTC | #1
> -----Original Message-----
> From: Zhu, TaoX
> Sent: Thursday, October 31, 2019 2:22 AM
> To: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Zhu, TaoX <taox.zhu@intel.com>
> Subject: [PATCH] net/i40e: qinq strip is not supported by i40e
> 
> From: Zhu Tao <taox.zhu@intel.com>
> 
> Qinq strip is not supported by i40e. When user tries to turn on QinQ strip, the
> driver gives unsupported return value and log.
> 
> Signed-off-by: Zhu Tao <taox.zhu@intel.com>
> ---
>  drivers/net/i40e/i40e_ethdev.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 77a46832c..ed8cbd849 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -3847,6 +3847,11 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int
> mask)
>  	struct i40e_vsi *vsi = pf->main_vsi;
>  	struct rte_eth_rxmode *rxmode;
> 
> +	if (mask & ETH_QINQ_STRIP_MASK) {
> +		PMD_DRV_LOG(ERR, "Strip qinq is not supported.");
> +		return -ENOTSUP;
> +	}
> +
>  	rxmode = &dev->data->dev_conf.rxmode;
>  	if (mask & ETH_VLAN_FILTER_MASK) {
>  		if (rxmode->offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
> --
> 2.17.1

Acked-by: Beilei Xing <beilei.xing@intel.com>
  
Xiaolong Ye Nov. 4, 2019, 3:25 a.m. UTC | #2
On 10/31, taox.zhu@intel.com wrote:
>From: Zhu Tao <taox.zhu@intel.com>
>
>Qinq strip is not supported by i40e. When user tries to turn on
>QinQ strip, the driver gives unsupported return value and log.
>
>Signed-off-by: Zhu Tao <taox.zhu@intel.com>
>---
> drivers/net/i40e/i40e_ethdev.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
>diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
>index 77a46832c..ed8cbd849 100644
>--- a/drivers/net/i40e/i40e_ethdev.c
>+++ b/drivers/net/i40e/i40e_ethdev.c
>@@ -3847,6 +3847,11 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask)
> 	struct i40e_vsi *vsi = pf->main_vsi;
> 	struct rte_eth_rxmode *rxmode;
> 
>+	if (mask & ETH_QINQ_STRIP_MASK) {
>+		PMD_DRV_LOG(ERR, "Strip qinq is not supported.");
>+		return -ENOTSUP;
>+	}
>+
> 	rxmode = &dev->data->dev_conf.rxmode;
> 	if (mask & ETH_VLAN_FILTER_MASK) {
> 		if (rxmode->offloads & DEV_RX_OFFLOAD_VLAN_FILTER)
>-- 
>2.17.1
>

Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>

Applied to dpdk-next-net-intel. Thanks.
  

Patch

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 77a46832c..ed8cbd849 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3847,6 +3847,11 @@  i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 	struct i40e_vsi *vsi = pf->main_vsi;
 	struct rte_eth_rxmode *rxmode;
 
+	if (mask & ETH_QINQ_STRIP_MASK) {
+		PMD_DRV_LOG(ERR, "Strip qinq is not supported.");
+		return -ENOTSUP;
+	}
+
 	rxmode = &dev->data->dev_conf.rxmode;
 	if (mask & ETH_VLAN_FILTER_MASK) {
 		if (rxmode->offloads & DEV_RX_OFFLOAD_VLAN_FILTER)