diff options
| author | Eric Dumazet <[email protected]> | 2024-04-29 13:30:09 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2024-05-01 01:32:38 +0000 |
| commit | 05d6d492097c55f2d153fc3fd33cbe78e1e28e0a (patch) | |
| tree | 9adf856d1bf6bece623d78a5f6412ec337927ec5 /drivers/net/loopback.c | |
| parent | Merge branch 'selftests-net-page_poll-allocation-error-injection' (diff) | |
| download | kernel-05d6d492097c55f2d153fc3fd33cbe78e1e28e0a.tar.gz kernel-05d6d492097c55f2d153fc3fd33cbe78e1e28e0a.zip | |
inet: introduce dst_rtable() helper
I added dst_rt6_info() in commit
e8dfd42c17fa ("ipv6: introduce dst_rt6_info() helper")
This patch does a similar change for IPv4.
Instead of (struct rtable *)dst casts, we can use :
#define dst_rtable(_ptr) \
container_of_const(_ptr, struct rtable, dst)
Patch is smaller than IPv6 one, because IPv4 has skb_rtable() helper.
Signed-off-by: Eric Dumazet <[email protected]>
Reviewed-by: David Ahern <[email protected]>
Reviewed-by: Sabrina Dubroca <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/loopback.c')
0 files changed, 0 insertions, 0 deletions
