On Sun, 16 Nov 2025 14:14:37 +0200
Maayan Kashani <[email protected]> wrote:
> The flex_link_item_parse function was using FLEX_MAX_FLOW_PATTERN_LENGTH
> for all memcpy operations regardless of the actual flow item type. This
> could lead to copying incorrect amounts of data.
>
> This patch adds a switch statement to determine the correct size based
> on the actual flow item type (IPv4, IPv6, UDP, TCP) and uses that size
> for the memcpy operations on spec, mask, and last fields.
>
> Also adds validation to reject unsupported item types.
>
> Fixes: 59f3a8acbcdb ("app/testpmd: add flex item commands")
> Cc: [email protected]
>
> Signed-off-by: Maayan Kashani <[email protected]>
Queued to next-net