|SUCCESS| net/ice: add missing SMAC field mapping in flow input set

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Mon Apr 6 14:06:54 CEST 2026


Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/162858

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-04-06

Commit: 733640dae75e ("net/ice: support L2TPv2 flow pattern matching")
Author: Shaiq Wani <shaiq.wani at intel.com>
Subject: net/ice: add missing SMAC field mapping in flow input set

This patch addresses a bug where the ice_inset_map[] array was missing
an entry for ICE_INSET_SMAC, causing flow rules with source MAC address
specifications to be silently ignored and match any source address.

> diff --git a/drivers/net/intel/ice/ice_fdir_filter.c b/drivers/net/intel/ice/ice_fdir_filter.c
> index 3522d77123..b3fdb1a9d7 100644
> --- a/drivers/net/intel/ice/ice_fdir_filter.c
> +++ b/drivers/net/intel/ice/ice_fdir_filter.c
> @@ -967,6 +967,7 @@ ice_fdir_input_set_parse(uint64_t inset, enum ice_flow_field *field)
>  	};
>  	static const struct ice_inset_map ice_inset_map[] = {
>  		{ICE_INSET_DMAC, ICE_FLOW_FIELD_IDX_ETH_DA},
> +		{ICE_INSET_SMAC, ICE_FLOW_FIELD_IDX_ETH_SA},
>  		{ICE_INSET_ETHERTYPE, ICE_FLOW_FIELD_IDX_ETH_TYPE},
>  		{ICE_INSET_IPV4_SRC, ICE_FLOW_FIELD_IDX_IPV4_SA},
>  		{ICE_INSET_IPV4_DST, ICE_FLOW_FIELD_IDX_IPV4_DA},

The fix looks correct and addresses the reported issue. The new entry is
placed immediately after the DMAC entry, which follows the logical
ordering of destination MAC followed by source MAC and maintains
consistency with the rest of the array structure (DA before SA pattern).

Does the ice_inset_map[] array need to be ordered in any specific way?
The existing entries show IPv4 before IPv6, and generally follow a DA
before SA pattern. The placement after DMAC appears consistent with this
convention.

Is there any validation or testing that should be added to verify that
SMAC matching now works correctly? While the fix itself is
straightforward, it might be valuable to ensure that source MAC
filtering behaves as expected after this change.


More information about the test-report mailing list