Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: Remove protocol from struct dst_ops

After my change to neigh_hh_init to obtain the protocol from the
neigh_table there are no more users of protocol in struct dst_ops.
Remove the protocol field from dst_ops and all of it's initializers.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Eric W. Biederman and committed by
David S. Miller
ddb3b603 13259db5

-9
-1
include/net/dst_ops.h
··· 12 12 13 13 struct dst_ops { 14 14 unsigned short family; 15 - __be16 protocol; 16 15 unsigned int gc_thresh; 17 16 18 17 int (*gc)(struct dst_ops *ops);
-1
net/bridge/br_nf_core.c
··· 54 54 55 55 static struct dst_ops fake_dst_ops = { 56 56 .family = AF_INET, 57 - .protocol = cpu_to_be16(ETH_P_IP), 58 57 .update_pmtu = fake_update_pmtu, 59 58 .redirect = fake_redirect, 60 59 .cow_metrics = fake_cow_metrics,
-1
net/decnet/dn_route.c
··· 136 136 137 137 static struct dst_ops dn_dst_ops = { 138 138 .family = PF_DECnet, 139 - .protocol = cpu_to_be16(ETH_P_DNA_RT), 140 139 .gc_thresh = 128, 141 140 .gc = dn_dst_gc, 142 141 .check = dn_dst_check,
-2
net/ipv4/route.c
··· 152 152 153 153 static struct dst_ops ipv4_dst_ops = { 154 154 .family = AF_INET, 155 - .protocol = cpu_to_be16(ETH_P_IP), 156 155 .check = ipv4_dst_check, 157 156 .default_advmss = ipv4_default_advmss, 158 157 .mtu = ipv4_mtu, ··· 2224 2225 2225 2226 static struct dst_ops ipv4_dst_blackhole_ops = { 2226 2227 .family = AF_INET, 2227 - .protocol = cpu_to_be16(ETH_P_IP), 2228 2228 .check = ipv4_blackhole_dst_check, 2229 2229 .mtu = ipv4_blackhole_mtu, 2230 2230 .default_advmss = ipv4_default_advmss,
-1
net/ipv4/xfrm4_policy.c
··· 232 232 233 233 static struct dst_ops xfrm4_dst_ops = { 234 234 .family = AF_INET, 235 - .protocol = cpu_to_be16(ETH_P_IP), 236 235 .gc = xfrm4_garbage_collect, 237 236 .update_pmtu = xfrm4_update_pmtu, 238 237 .redirect = xfrm4_redirect,
-2
net/ipv6/route.c
··· 194 194 195 195 static struct dst_ops ip6_dst_ops_template = { 196 196 .family = AF_INET6, 197 - .protocol = cpu_to_be16(ETH_P_IPV6), 198 197 .gc = ip6_dst_gc, 199 198 .gc_thresh = 1024, 200 199 .check = ip6_dst_check, ··· 235 236 236 237 static struct dst_ops ip6_dst_blackhole_ops = { 237 238 .family = AF_INET6, 238 - .protocol = cpu_to_be16(ETH_P_IPV6), 239 239 .destroy = ip6_dst_destroy, 240 240 .check = ip6_dst_check, 241 241 .mtu = ip6_blackhole_mtu,
-1
net/ipv6/xfrm6_policy.c
··· 292 292 293 293 static struct dst_ops xfrm6_dst_ops = { 294 294 .family = AF_INET6, 295 - .protocol = cpu_to_be16(ETH_P_IPV6), 296 295 .gc = xfrm6_garbage_collect, 297 296 .update_pmtu = xfrm6_update_pmtu, 298 297 .redirect = xfrm6_redirect,