Re: [PATCH net-next v3 1/2] net: port TP_STORE_ADDR_PORTS_SKB macro to be tcp/udp independent

From: Jason Xing
Date: Tue Mar 26 2024 - 03:40:57 EST


On Mon, Mar 25, 2024 at 6:29 PM Balazs Scheidler <bazsi77@xxxxxxxxx> wrote:
>
> This patch moves TP_STORE_ADDR_PORTS_SKB() to a common header and removes
> the TCP specific implementation details.
>
> Previously the macro assumed the skb passed as an argument is a
> TCP packet, the implementation now uses an argument to the L4 header and
> uses that to extract the source/destination ports, which happen
> to be named the same in "struct tcphdr" and "struct udphdr"
>
> Signed-off-by: Balazs Scheidler <balazs.scheidler@xxxxxxxxxxx>

The patch itself looks good to me, feel free to add:
Reviewed-by: Jason Xing <kerneljasonxing@xxxxxxxxx>