[PATCH 14/39] net/ice/base: fix ethertype filter input set
Kevin Liu
kevinx.liu at intel.com
Thu Apr 7 12:56:41 CEST 2022
From: Alvin Zhang <alvinx.zhang at intel.com>
Add destination and source MAC as the input sets to ethertype filter.
For example:
flow create 0 ingress pattern eth dst is 00:11:22:33:44:55
type is 0x802 / end actions queue index 2 / end
This flow will result in all the matched ingress packets be
forwarded to queue 2.
Fixes: 1f70fb3e958a ("net/ice/base: support flow director for non-IP packets")
Signed-off-by: Alvin Zhang <alvinx.zhang at intel.com>
Signed-off-by: Kevin Liu <kevinx.liu at intel.com>
---
drivers/net/ice/base/ice_fdir.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
index ae76361102..0a1d45a9d7 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
@@ -3935,6 +3935,9 @@ ice_fdir_get_gen_prgm_pkt(struct ice_hw *hw, struct ice_fdir_fltr *input,
input->ip.v6.dst_port);
break;
case ICE_FLTR_PTYPE_NON_IP_L2:
+ ice_pkt_insert_mac_addr(loc, input->ext_data.dst_mac);
+ ice_pkt_insert_mac_addr(loc + ETH_ALEN,
+ input->ext_data.src_mac);
ice_pkt_insert_u16(loc, ICE_MAC_ETHTYPE_OFFSET,
input->ext_data.ether_type);
break;
--
2.33.1
More information about the dev
mailing list