Re: [PATCH net-next 12/13] dpaa2-switch: add support for imprecise source port

From: Ioana Ciornei

Date: Thu May 07 2026 - 07:44:41 EST


On Wed, May 06, 2026 at 06:15:39PM +0300, Ioana Ciornei wrote:
> Switch ports configured as part of a LAG group are not able to provide
> a precise source port for all packets which reach the control interface.
>
> The only frames which will have a precise source port are those that are
> explicitly trapped, for example STP and LCAP frames. For any other
> frames (for example, those which are flooded) we can only know the
> ingress LAG group.
>
> Take into account the DPAA2_ETHSW_FLC_IMPRECISE_IF_ID bit and based on
> its value target the bond device or the specific source netdevice.
>
> Signed-off-by: Ioana Ciornei <ioana.ciornei@xxxxxxx>
> ---
> drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c | 10 ++++++++--
> drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.h | 3 +++
> 2 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
> index 59ed06ed7ef6..8353d2230c72 100644

(...)

> --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.h
> +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.h
> @@ -87,6 +87,9 @@
>
> #define DPAA2_ETHSW_PORT_ACL_CMD_BUF_SIZE 256
>
> +#define DPAA2_ETHSW_FLC_IF_ID(flc) (((flc) >> 32) & GENMASK(15, 0))
> +#define DPAA2_ETHSW_FLC_IMPRECISE_IF_ID(flc) ((flc) & BIT(63))

I saw the patchwork test - this breaks the build_32bit test.

I will use BIT_ULL in the next version.

Ioana