[DPDK] net/i40e: add the VLAN capabilities of NIC
diff mbox series

Message ID 20200720024214.13972-1-zhihongx.peng@intel.com
State Changes Requested, archived
Delegated to: Qi Zhang
Headers show
Series
  • [DPDK] net/i40e: add the VLAN capabilities of NIC
Related show

Checks

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

Commit Message

Peng, ZhihongX July 20, 2020, 2:42 a.m. UTC
From: Peng Zhihong <zhihongx.peng@intel.com>

The rte_eth_dev_set_vlan_offload function will check whether the NIC has
the set vlan feature. If it has not, it will return failure. So need
to add all the vlan feature flags of the NIC.

Fixes: e0cb96204b71 (net/i40e: add support for representor ports)
Cc: declan.doherty@intel.com

Signed-off-by: Peng Zhihong <zhihongx.peng@intel.com>
---
 drivers/net/i40e/i40e_vf_representor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Jeff Guo July 20, 2020, 8:56 a.m. UTC | #1
hi,  zhihong

On 7/20/2020 10:42 AM, zhihongx.peng@intel.com wrote:
> From: Peng Zhihong <zhihongx.peng@intel.com>
>
> The rte_eth_dev_set_vlan_offload function will check whether the NIC has
> the set vlan feature. If it has not, it will return failure. So need


"...has the set vlan feature..." , that need to refine.


> to add all the vlan feature flags of the NIC.
>
> Fixes: e0cb96204b71 (net/i40e: add support for representor ports)
> Cc: declan.doherty@intel.com
>
> Signed-off-by: Peng Zhihong <zhihongx.peng@intel.com>
> ---
>   drivers/net/i40e/i40e_vf_representor.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c
> index b07b35c03..083bc1a5f 100644
> --- a/drivers/net/i40e/i40e_vf_representor.c
> +++ b/drivers/net/i40e/i40e_vf_representor.c
> @@ -46,7 +46,8 @@ i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,
>   		DEV_RX_OFFLOAD_QINQ_STRIP |
>   		DEV_RX_OFFLOAD_IPV4_CKSUM |
>   		DEV_RX_OFFLOAD_UDP_CKSUM |
> -		DEV_RX_OFFLOAD_TCP_CKSUM;
> +		DEV_RX_OFFLOAD_TCP_CKSUM |
> +		DEV_RX_OFFLOAD_VLAN_FILTER;
>   	dev_info->tx_offload_capa =
>   		DEV_TX_OFFLOAD_MULTI_SEGS  |
>   		DEV_TX_OFFLOAD_VLAN_INSERT |

Patch
diff mbox series

diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c
index b07b35c03..083bc1a5f 100644
--- a/drivers/net/i40e/i40e_vf_representor.c
+++ b/drivers/net/i40e/i40e_vf_representor.c
@@ -46,7 +46,8 @@  i40e_vf_representor_dev_infos_get(struct rte_eth_dev *ethdev,
 		DEV_RX_OFFLOAD_QINQ_STRIP |
 		DEV_RX_OFFLOAD_IPV4_CKSUM |
 		DEV_RX_OFFLOAD_UDP_CKSUM |
-		DEV_RX_OFFLOAD_TCP_CKSUM;
+		DEV_RX_OFFLOAD_TCP_CKSUM |
+		DEV_RX_OFFLOAD_VLAN_FILTER;
 	dev_info->tx_offload_capa =
 		DEV_TX_OFFLOAD_MULTI_SEGS  |
 		DEV_TX_OFFLOAD_VLAN_INSERT |