Re: [bpf-next v1 1/5] selftests/bpf: use sockaddr_storage instead of addr_port in cls_redirect test

From: Martin KaFai Lau

Date: Tue Nov 18 2025 - 18:12:34 EST


On 11/15/25 2:55 PM, Hoyeon Lee wrote:

struct tuple {
int family;

The "family" is not needed either. Just use the ss_family from src or dst. The 'struct tuple' can be removed also?

I'm on the fence about whether this "struct sockaddr_storage" change is worth the code churn. Are patch 1 and 2 the only tests that need this
change?

Patch 3 and 4 make sense. Patch 3 and 4 are applied.

Please post patch 5 as a separate patch on its own.

- struct addr_port src;
- struct addr_port dst;
+ struct sockaddr_storage src;
+ struct sockaddr_storage dst;
};