From: Xiaoyu Min Date: Mon, 16 Nov 2020 07:55:17 +0000 (+0800) Subject: net/iavf: fix ethernet header size in flow rule X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=38d5ea90943b329f0898c89cb844980465657dfa net/iavf: fix ethernet header size in flow rule The rte_flow_item_vlan items are refined. The structs do not exactly represent the packet bits captured on the wire anymore so should only copy real header instead of the whole struct. Replace the rte_flow_item_* with the existing corresponding rte_*_hdr. Fixes: 09315fc83861 ("ethdev: add VLAN attributes to ethernet and VLAN items") Signed-off-by: Xiaoyu Min Reviewed-by: Ferruh Yigit --- diff --git a/drivers/net/iavf/iavf_fdir.c b/drivers/net/iavf/iavf_fdir.c index d683a468c1..7054bde0b9 100644 --- a/drivers/net/iavf/iavf_fdir.c +++ b/drivers/net/iavf/iavf_fdir.c @@ -541,7 +541,7 @@ iavf_fdir_parse_pattern(__rte_unused struct iavf_adapter *ad, VIRTCHNL_ADD_PROTO_HDR_FIELD_BIT(hdr, ETH, ETHERTYPE); rte_memcpy(hdr->buffer, - eth_spec, sizeof(*eth_spec)); + eth_spec, sizeof(struct rte_ether_hdr)); } filter->add_fltr.rule_cfg.proto_hdrs.count = ++layer;