Skip to content

Commit c16ec18

Browse files
Julian Anastasovdavem330
authored andcommitted
net: rename dst_neigh_output back to neigh_output
After the dst->pending_confirm flag was removed, we do not need anymore to provide dst arg to dst_neigh_output. So, rename it to neigh_output as before commit 5110eff ("net: Do delayed neigh confirmation."). Signed-off-by: Julian Anastasov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 90d2ea9 commit c16ec18

File tree

5 files changed

+14
-16
lines changed

5 files changed

+14
-16
lines changed

drivers/net/vrf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ static int vrf_finish_output6(struct net *net, struct sock *sk,
379379
neigh = __neigh_create(&nd_tbl, nexthop, dst->dev, false);
380380
if (!IS_ERR(neigh)) {
381381
sock_confirm_neigh(skb, neigh);
382-
ret = dst_neigh_output(dst, neigh, skb);
382+
ret = neigh_output(neigh, skb);
383383
rcu_read_unlock_bh();
384384
return ret;
385385
}
@@ -577,7 +577,7 @@ static int vrf_finish_output(struct net *net, struct sock *sk, struct sk_buff *s
577577
neigh = __neigh_create(&arp_tbl, &nexthop, dev, false);
578578
if (!IS_ERR(neigh)) {
579579
sock_confirm_neigh(skb, neigh);
580-
ret = dst_neigh_output(dst, neigh, skb);
580+
ret = neigh_output(neigh, skb);
581581
}
582582

583583
rcu_read_unlock_bh();

include/net/dst.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -442,18 +442,6 @@ static inline void dst_confirm(struct dst_entry *dst)
442442
{
443443
}
444444

445-
static inline int dst_neigh_output(struct dst_entry *dst, struct neighbour *n,
446-
struct sk_buff *skb)
447-
{
448-
const struct hh_cache *hh;
449-
450-
hh = &n->hh;
451-
if ((n->nud_state & NUD_CONNECTED) && hh->hh_len)
452-
return neigh_hh_output(hh, skb);
453-
else
454-
return n->output(n, skb);
455-
}
456-
457445
static inline struct neighbour *dst_neigh_lookup(const struct dst_entry *dst, const void *daddr)
458446
{
459447
struct neighbour *n = dst->ops->neigh_lookup(dst, NULL, daddr);

include/net/neighbour.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,16 @@ static inline int neigh_hh_output(const struct hh_cache *hh, struct sk_buff *skb
468468
return dev_queue_xmit(skb);
469469
}
470470

471+
static inline int neigh_output(struct neighbour *n, struct sk_buff *skb)
472+
{
473+
const struct hh_cache *hh = &n->hh;
474+
475+
if ((n->nud_state & NUD_CONNECTED) && hh->hh_len)
476+
return neigh_hh_output(hh, skb);
477+
else
478+
return n->output(n, skb);
479+
}
480+
471481
static inline struct neighbour *
472482
__neigh_lookup(struct neigh_table *tbl, const void *pkey, struct net_device *dev, int creat)
473483
{

net/ipv4/ip_output.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ static int ip_finish_output2(struct net *net, struct sock *sk, struct sk_buff *s
225225
int res;
226226

227227
sock_confirm_neigh(skb, neigh);
228-
res = dst_neigh_output(dst, neigh, skb);
228+
res = neigh_output(neigh, skb);
229229

230230
rcu_read_unlock_bh();
231231
return res;

net/ipv6/ip6_output.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ static int ip6_finish_output2(struct net *net, struct sock *sk, struct sk_buff *
120120
neigh = __neigh_create(&nd_tbl, nexthop, dst->dev, false);
121121
if (!IS_ERR(neigh)) {
122122
sock_confirm_neigh(skb, neigh);
123-
ret = dst_neigh_output(dst, neigh, skb);
123+
ret = neigh_output(neigh, skb);
124124
rcu_read_unlock_bh();
125125
return ret;
126126
}

0 commit comments

Comments
 (0)