Skip to contentSkip to conversation

net/iavf: support enhanced VLAN offload

PATCH New Qiming Yang 1 participant 1 message Sep 2, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/iavf: support enhanced VLAN offload

This patch add VIRTCHNL_VF_OFFLOAD_VLAN_V2 series virtual channel support, included get VLAN offload capability, support VLAN filter and double VLAN strip.

---
 drivers/net/iavf/iavf.h        |  5 ++
 drivers/net/iavf/iavf_ethdev.c | 70 ++++++++++++++++++++-------
 drivers/net/iavf/iavf_vchnl.c  | 87 ++++++++++++++++++++++++++++++++++
 3 files changed, 145 insertions(+), 17 deletions(-)
drivers/net/iavf/iavf.h +5 -0
index 9ad331ee9..8c10f7e59 100644
@@ -149,6 +149,7 @@ struct iavf_info {
 	struct iavf_parser_list dist_parser_list;
 
 	struct iavf_fdir_info fdir; /* flow director info */
+	struct virtchnl_vlan_caps *vlan_cap;
 };
 
 #define IAVF_MAX_PKT_TYPE 1024
@@ -279,4 +280,8 @@ int iavf_add_del_rss_cfg(struct iavf_adapter *adapter,
 int iavf_add_del_mc_addr_list(struct iavf_adapter *adapter,
 			struct rte_ether_addr *mc_addrs,
 			uint32_t mc_addrs_num, bool add);
+int iavf_get_vlan_offload_capa(struct rte_eth_dev *dev);
+int iavf_add_del_vlan_v2(struct iavf_adapter *adapter, uint16_t vlanid,
+			 bool add, bool qinq);
+int iavf_switch_vlan_strip(struct iavf_adapter *adapter, bool qinq, bool on);
 #endif /* _IAVF_ETHDEV_H_ */
drivers/net/iavf/iavf_ethdev.c +53 -17

95 lines not on this page · raw message

drivers/net/iavf/iavf_vchnl.c +87 -0

93 lines not on this page · raw message

Signature · 1 line
2.17.1