Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256488
b: refs/heads/master
c: b23b545
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Jul 17, 2011
1 parent 9024f02 commit 4c42b98
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 30 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 47ec132a40d788d45e2f088545dea68798034dab
refs/heads/master: b23b5455b6458920179a1f27513ce42e70d11f37
1 change: 0 additions & 1 deletion trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ struct netdev_hw_addr_list {
struct hh_cache {
u16 hh_len;
u16 __pad;
int (*hh_output)(struct sk_buff *skb);
seqlock_t hh_lock;

/* cached hardware header; allow for machine alignment needs. */
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/net/neighbour.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,13 @@ static inline int neigh_hh_output(struct hh_cache *hh, struct sk_buff *skb)
} while (read_seqretry(&hh->hh_lock, seq));

skb_push(skb, hh_len);
return hh->hh_output(skb);
return dev_queue_xmit(skb);
}

static inline int neigh_output(struct neighbour *n, struct sk_buff *skb)
{
struct hh_cache *hh = &n->hh;
if (hh->hh_len)
if ((n->nud_state & NUD_CONNECTED) && hh->hh_len)
return neigh_hh_output(hh, skb);
else
return n->output(skb);
Expand Down
25 changes: 2 additions & 23 deletions trunk/net/core/neighbour.c
Original file line number Diff line number Diff line change
Expand Up @@ -720,15 +720,9 @@ EXPORT_SYMBOL(neigh_destroy);
*/
static void neigh_suspect(struct neighbour *neigh)
{
struct hh_cache *hh;

NEIGH_PRINTK2("neigh %p is suspected.\n", neigh);

neigh->output = neigh->ops->output;

hh = &neigh->hh;
if (hh->hh_len)
hh->hh_output = neigh->ops->output;
}

/* Neighbour state is OK;
Expand All @@ -738,15 +732,9 @@ static void neigh_suspect(struct neighbour *neigh)
*/
static void neigh_connect(struct neighbour *neigh)
{
struct hh_cache *hh;

NEIGH_PRINTK2("neigh %p is connected.\n", neigh);

neigh->output = neigh->ops->connected_output;

hh = &neigh->hh;
if (hh->hh_len)
hh->hh_output = dev_queue_xmit;
}

static void neigh_periodic_work(struct work_struct *work)
Expand Down Expand Up @@ -1215,18 +1203,9 @@ static void neigh_hh_init(struct neighbour *n, struct dst_entry *dst)
/* Only one thread can come in here and initialize the
* hh_cache entry.
*/
if (hh->hh_len)
goto end;

if (dev->header_ops->cache(n, hh, prot))
goto end;

if (n->nud_state & NUD_CONNECTED)
hh->hh_output = dev_queue_xmit;
else
hh->hh_output = n->ops->output;
if (!hh->hh_len)
dev->header_ops->cache(n, hh, prot);

end:
write_unlock_bh(&n->lock);
}

Expand Down
6 changes: 3 additions & 3 deletions trunk/net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,9 @@ static int rt_cache_seq_show(struct seq_file *seq, void *v)
dst_metric(&r->dst, RTAX_RTTVAR)),
r->rt_key_tos,
-1,
(r->dst.neighbour ?
(r->dst.neighbour->hh.hh_output ==
dev_queue_xmit) : 0),
(r->dst.neighbour &&
(r->dst.neighbour->nud_state & NUD_CONNECTED)) ?
1 : 0,
r->rt_spec_dst, &len);

seq_printf(seq, "%*s\n", 127 - len, "");
Expand Down

0 comments on commit 4c42b98

Please sign in to comment.