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

Message ID 20180510024513.75072-1-yanglong.wu@intel.com (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Yanglong Wu May 10, 2018, 2:45 a.m. UTC
  VLAN offload capability should be exposed both
VF and PF since i40e does support it.

Fixes: c3ac7c5b0b8a ("net/i40e: convert to new Rx offloads API")
Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Comments

Qi Zhang May 10, 2018, 3:06 a.m. UTC | #1
> -----Original Message-----
> From: Wu, Yanglong
> Sent: Thursday, May 10, 2018 10:45 AM
> To: dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Dai, Wei <wei.dai@intel.com>; Wu,
> Yanglong <yanglong.wu@intel.com>
> Subject: [PATCH] net/i40e: fix missing VLAN offload capability
> 
> VLAN offload capability should be exposed both VF and PF since i40e does
> support it.
> 
> Fixes: c3ac7c5b0b8a ("net/i40e: convert to new Rx offloads API")
> Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
> ---
>  drivers/net/i40e/i40e_ethdev.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 894505f98..ad377f440 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -3299,7 +3299,9 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct
> rte_eth_dev_info *dev_info)
>  		DEV_RX_OFFLOAD_CRC_STRIP |
>  		DEV_RX_OFFLOAD_VLAN_EXTEND |
>  		DEV_RX_OFFLOAD_VLAN_FILTER |
> -		DEV_RX_OFFLOAD_JUMBO_FRAME;
> +		DEV_RX_OFFLOAD_JUMBO_FRAME |
> +		DEV_RX_OFFLOAD_VLAN_FILTER |
> +		DEV_RX_OFFLOAD_VLAN_EXTEND;

This is duplicate.
I guess want to add missing flags to i40evf_dev_info_get ?

> 
>  	dev_info->tx_queue_offload_capa =
> DEV_TX_OFFLOAD_MBUF_FAST_FREE;
>  	dev_info->tx_offload_capa =
> --
> 2.11.0
  

Patch

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 894505f98..ad377f440 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3299,7 +3299,9 @@  i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_RX_OFFLOAD_CRC_STRIP |
 		DEV_RX_OFFLOAD_VLAN_EXTEND |
 		DEV_RX_OFFLOAD_VLAN_FILTER |
-		DEV_RX_OFFLOAD_JUMBO_FRAME;
+		DEV_RX_OFFLOAD_JUMBO_FRAME |
+		DEV_RX_OFFLOAD_VLAN_FILTER |
+		DEV_RX_OFFLOAD_VLAN_EXTEND;
 
 	dev_info->tx_queue_offload_capa = DEV_TX_OFFLOAD_MBUF_FAST_FREE;
 	dev_info->tx_offload_capa =