Skip to content

Commit

Permalink
net: Remove protocol from struct dst_ops
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric W. Biederman authored and David S. Miller committed Mar 9, 2015
1 parent 13259db commit ddb3b60
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion include/net/dst_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ struct sock;

struct dst_ops {
unsigned short family;
__be16 protocol;
unsigned int gc_thresh;

int (*gc)(struct dst_ops *ops);
Expand Down
1 change: 0 additions & 1 deletion net/bridge/br_nf_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ static unsigned int fake_mtu(const struct dst_entry *dst)

static struct dst_ops fake_dst_ops = {
.family = AF_INET,
.protocol = cpu_to_be16(ETH_P_IP),
.update_pmtu = fake_update_pmtu,
.redirect = fake_redirect,
.cow_metrics = fake_cow_metrics,
Expand Down
1 change: 0 additions & 1 deletion net/decnet/dn_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ int decnet_dst_gc_interval = 2;

static struct dst_ops dn_dst_ops = {
.family = PF_DECnet,
.protocol = cpu_to_be16(ETH_P_DNA_RT),
.gc_thresh = 128,
.gc = dn_dst_gc,
.check = dn_dst_check,
Expand Down
2 changes: 0 additions & 2 deletions net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ static struct neighbour *ipv4_neigh_lookup(const struct dst_entry *dst,

static struct dst_ops ipv4_dst_ops = {
.family = AF_INET,
.protocol = cpu_to_be16(ETH_P_IP),
.check = ipv4_dst_check,
.default_advmss = ipv4_default_advmss,
.mtu = ipv4_mtu,
Expand Down Expand Up @@ -2225,7 +2224,6 @@ static u32 *ipv4_rt_blackhole_cow_metrics(struct dst_entry *dst,

static struct dst_ops ipv4_dst_blackhole_ops = {
.family = AF_INET,
.protocol = cpu_to_be16(ETH_P_IP),
.check = ipv4_blackhole_dst_check,
.mtu = ipv4_blackhole_mtu,
.default_advmss = ipv4_default_advmss,
Expand Down
1 change: 0 additions & 1 deletion net/ipv4/xfrm4_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ static void xfrm4_dst_ifdown(struct dst_entry *dst, struct net_device *dev,

static struct dst_ops xfrm4_dst_ops = {
.family = AF_INET,
.protocol = cpu_to_be16(ETH_P_IP),
.gc = xfrm4_garbage_collect,
.update_pmtu = xfrm4_update_pmtu,
.redirect = xfrm4_redirect,
Expand Down
2 changes: 0 additions & 2 deletions net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ static struct neighbour *ip6_neigh_lookup(const struct dst_entry *dst,

static struct dst_ops ip6_dst_ops_template = {
.family = AF_INET6,
.protocol = cpu_to_be16(ETH_P_IPV6),
.gc = ip6_dst_gc,
.gc_thresh = 1024,
.check = ip6_dst_check,
Expand Down Expand Up @@ -236,7 +235,6 @@ static u32 *ip6_rt_blackhole_cow_metrics(struct dst_entry *dst,

static struct dst_ops ip6_dst_blackhole_ops = {
.family = AF_INET6,
.protocol = cpu_to_be16(ETH_P_IPV6),
.destroy = ip6_dst_destroy,
.check = ip6_dst_check,
.mtu = ip6_blackhole_mtu,
Expand Down
1 change: 0 additions & 1 deletion net/ipv6/xfrm6_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ static void xfrm6_dst_ifdown(struct dst_entry *dst, struct net_device *dev,

static struct dst_ops xfrm6_dst_ops = {
.family = AF_INET6,
.protocol = cpu_to_be16(ETH_P_IPV6),
.gc = xfrm6_garbage_collect,
.update_pmtu = xfrm6_update_pmtu,
.redirect = xfrm6_redirect,
Expand Down

0 comments on commit ddb3b60

Please sign in to comment.