net/e1000: add the VLAN capabilities of NIC
From: Peng Zhihong <[email protected]>
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.
--- drivers/net/e1000/igb_rxtx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/e1000/igb_rxtx.c +2 -1
@@ -1647,7 +1647,8 @@ igb_get_rx_port_offloads_capa(struct rte_eth_dev *dev)DEV_RX_OFFLOAD_JUMBO_FRAME |DEV_RX_OFFLOAD_KEEP_CRC |DEV_RX_OFFLOAD_SCATTER | -DEV_RX_OFFLOAD_RSS_HASH ; +DEV_RX_OFFLOAD_RSS_HASH | +DEV_RX_OFFLOAD_VLAN_EXTEND ;return rx_offload_capa; }
Signature · 1 line
2.17.1
Hi,
Quoted 8 lines
-----Original Message-----
From: Peng, ZhihongX <[email protected]>
Sent: Monday, July 20, 2020 9:47 AM
To: Zhao1, Wei <[email protected]>; Guo, Jia <[email protected]>
Cc: [email protected]; Peng, ZhihongX <[email protected]>; [email protected]
Subject: [DPDK] net/e1000: add the VLAN capabilities of NIC
Quoted 8 lines
From: Peng Zhihong <[email protected]>
The
rte_eth_dev_set_vlan_offloadfunction 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 ef990fb56e55 ("net/e1000: convert to new Rx offloads API")
you should cc stable not wei.dai
Quoted 23 lines
Signed-off-by Peng Zhihong <[email protected]>--- drivers/net/e1000/igb_rxtx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/e1000/igb_rxtx.c index renamed from drivers/net/e1000/igb_rxtx.c +0
-0
5717cdb70..966df3f20100644drivers/net/e1000/igb_rxtx.c +2
-1@@ -1647,7 +1647,8 @@ igb_get_rx_port_offloads_capa(struct rte_eth_dev *dev)DEV_RX_OFFLOAD_JUMBO_FRAME |DEV_RX_OFFLOAD_KEEP_CRC |DEV_RX_OFFLOAD_SCATTER | -DEV_RX_OFFLOAD_RSS_HASH ; +DEV_RX_OFFLOAD_RSS_HASH | +DEV_RX_OFFLOAD_VLAN_EXTEND ;return rx_offload_capa;}
--
2.17.1
PATCH v2 1/1 net/e1000: add the VLAN capabilities of NIC
In reply to [email protected]From: Peng Zhihong <[email protected]>
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.
---
Changes:
V2: modify commit log Cc to [email protected].
drivers/net/e1000/igb_rxtx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/e1000/igb_rxtx.c +2 -1
@@ -1647,7 +1647,8 @@ igb_get_rx_port_offloads_capa(struct rte_eth_dev *dev)DEV_RX_OFFLOAD_JUMBO_FRAME |DEV_RX_OFFLOAD_KEEP_CRC |DEV_RX_OFFLOAD_SCATTER | -DEV_RX_OFFLOAD_RSS_HASH ; +DEV_RX_OFFLOAD_RSS_HASH | +DEV_RX_OFFLOAD_VLAN_EXTEND ;return rx_offload_capa; }
Signature · 1 line
2.17.1
PATCH v3 1/1 net/e1000: add VLAN extend feature to capability
From: Peng Zhihong <[email protected]>
The rte_eth_dev_set_vlan_offload function will check vlan rx offload capability, the i350/i210/i211 nics have vlan extend feature but DEV_RX_OFFLOAD_VLAN_EXTEND is not set into the capability, that will cause setting fail. So need to add this capability in igb_get_rx_port_offloads_capa function.
--- drivers/net/e1000/igb_rxtx.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/net/e1000/igb_rxtx.c +8 -1
@@ -1637,8 +1637,10 @@ uint64_t igb_get_rx_port_offloads_capa(struct rte_eth_dev *dev) {uint64_t rx_offload_capa; +struct e1000_hw *hw; + + hw =E1000_DEV_PRIVATE_TO_HW (dev->data->dev_private); -RTE_SET_USED (dev); rx_offload_capa =DEV_RX_OFFLOAD_VLAN_STRIP |DEV_RX_OFFLOAD_VLAN_FILTER | DEV_RX_OFFLOAD_IPV4_CKSUM |
@@ -1649,6 +1651,11 @@ igb_get_rx_port_offloads_capa(struct rte_eth_dev *dev)DEV_RX_OFFLOAD_SCATTER |DEV_RX_OFFLOAD_RSS_HASH ; +if (hw->mac.type == e1000_i350 || + hw->mac.type == e1000_i210 || + hw->mac.type == e1000_i211) + rx_offload_capa |=DEV_RX_OFFLOAD_VLAN_EXTEND ; +return rx_offload_capa; }
Signature · 1 line
2.17.1
Re: [dpdk-dev] [DPDK v3] net/e1000: add VLAN extend feature to capability
Quoted 54 lines
-----Original Message-----
From: Peng, ZhihongX <[email protected]>
Sent: Tuesday, July 21, 2020 11:05 AM
To: Zhao1, Wei <[email protected]>; Guo, Jia <[email protected]>
Cc: [email protected]; Peng, ZhihongX <[email protected]>; [email protected]
Subject: [DPDK v3] net/e1000: add VLAN extend feature to capabilityFrom: Peng Zhihong <[email protected]>
The
rte_eth_dev_set_vlan_offloadfunction will check vlan rx offload capability, the i350/i210/i211 nics have vlan extend feature butDEV_RX_OFFLOAD_VLAN_EXTENDis not set into the capability, that will cause setting fail. So need to add this capability inigb_get_rx_port_offloads_capafunction.Fixes ef990fb56e55 ("net/e1000: convert to new Rx offloads API")Signed-off-by Peng Zhihong <[email protected]>--- drivers/net/e1000/igb_rxtx.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/net/e1000/igb_rxtx.c index renamed from drivers/net/e1000/igb_rxtx.c +0
-0
5717cdb70..6411924e0100644drivers/net/e1000/igb_rxtx.c +8
-2@@ -1637,8 +1637,10 @@ uint64_t igb_get_rx_port_offloads_capa(struct rte_eth_dev *dev) {uint64_t rx_offload_capa; +struct e1000_hw *hw; + + hw =E1000_DEV_PRIVATE_TO_HW (dev->data->dev_private); -RTE_SET_USED (dev); rx_offload_capa =DEV_RX_OFFLOAD_VLAN_STRIP |DEV_RX_OFFLOAD_VLAN_FILTER | DEV_RX_OFFLOAD_IPV4_CKSUM |@@ -1649,6 +1651,11 @@ igb_get_rx_port_offloads_capa(struct rte_eth_dev *dev)DEV_RX_OFFLOAD_SCATTER |DEV_RX_OFFLOAD_RSS_HASH ; +if (hw->mac.type == e1000_i350 || + hw->mac.type == e1000_i210 || + hw->mac.type == e1000_i211) + rx_offload_capa |=DEV_RX_OFFLOAD_VLAN_EXTEND ; +return rx_offload_capa; } --2.17.1
Zhang, Qi Z
AppliedRe: [dpdk-dev] [DPDK v3] net/e1000: add VLAN extend feature to capability
Quoted 10 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Zhao1, Wei
Sent: Tuesday, July 21, 2020 11:31 AM
To: Peng, ZhihongX <[email protected]>; Guo, Jia <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [dpdk-dev] [DPDK v3] net/e1000: add VLAN extend feature to capability
Quoted 22 lines
Reviewed-by Wei Zhao <[email protected]>Quoted 20 lines
-----Original Message-----
From: Peng, ZhihongX <[email protected]>
Sent: Tuesday, July 21, 2020 11:05 AM
To: Zhao1, Wei <[email protected]>; Guo, Jia <[email protected]>
Cc: [email protected]; Peng, ZhihongX <[email protected]>; [email protected]
Subject: [DPDK v3] net/e1000: add VLAN extend feature to capabilityFrom: Peng Zhihong <[email protected]>
The
rte_eth_dev_set_vlan_offloadfunction will check vlan rx offload capability, the i350/i210/i211 nics have vlan extend feature butDEV_RX_OFFLOAD_VLAN_EXTENDis not set into the capability, that will cause setting fail. So need to add this capability inigb_get_rx_port_offloads_capafunction.Fixes ef990fb56e55 ("net/e1000: convert to new Rx offloads API")Signed-off-by Peng Zhihong <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi