|SUCCESS| [v3] net/ice: detect L2TPv2 tunnel type in pre-scan loop

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Thu Apr 9 22:12:53 CEST 2026


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

_AI Code Review_

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

Below is a plain text review of the patch, focused on correctness, coding
style, and guideline adherence. Commit message formatting and SPDX/copyright
are excluded per your request.

================================================================================

git sha: (patch is not yet applied, reviewing from series.patch)
Author: Shaiq Wani <shaiq.wani at intel.com>
Subject: net/ice: detect L2TPv2 tunnel type in pre-scan loop

This patch adds recognition of RTE_FLOW_ITEM_TYPE_L2TPV2 in the
ice_fdir_parse_pattern() pre-scan loop, so the tunnel_type is set to
ICE_FDIR_TUNNEL_TYPE_L2TPV2 when an L2TPv2 item is present. This ensures
that the MAC address from an ETH item is stored in the outer structure.

> diff --git a/drivers/net/intel/ice/ice_fdir_filter.c b/drivers/net/intel/ice/ice_fdir_filter.c
> index 3522d77123..1cbc613020 100644
> --- a/drivers/net/intel/ice/ice_fdir_filter.c
> +++ b/drivers/net/intel/ice/ice_fdir_filter.c
> @@ -1911,6 +1911,8 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad,
>  	for (item = pattern; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {
>  		if (item->type == RTE_FLOW_ITEM_TYPE_VXLAN)
>  			tunnel_type = ICE_FDIR_TUNNEL_TYPE_VXLAN;
> +		if (item->type == RTE_FLOW_ITEM_TYPE_L2TPV2)
> +			tunnel_type = ICE_FDIR_TUNNEL_TYPE_L2TPV2;

Can the tunnel_type be overwritten unexpectedly if both VXLAN and L2TPV2
items appear in the same pattern?  Should these conditions be mutually
exclusive, perhaps using else-if chains?

According to the DPDK coding style guide, explicit comparisons against zero
or NULL are generally not required for integer types, however the existing
code (the VXLAN check) does not use an explicit comparison either. Your
addition matches the existing style, but it is worth confirming whether this
loop can encounter multiple tunnel types in a single pattern and whether the
last one wins or if there should be a validation error.

>  		/* To align with shared code behavior, save gtpu outer
>  		 * fields in inner struct.
>  		 */

[ ... ]


More information about the test-report mailing list