On Tue, 15 Aug 2006 00:22:20 +0200 Thomas Graf <[EMAIL PROTECTED]> wrote:
> * Stephen Hemminger <[EMAIL PROTECTED]> 2006-08-14 14:20 > > --- net-2.6.19.orig/net/core/neighbour.c > > +++ net-2.6.19/net/core/neighbour.c > > @@ -1160,19 +1164,24 @@ int neigh_resolve_output(struct sk_buff > > if (!neigh_event_send(neigh, skb)) { > > int err; > > struct net_device *dev = neigh->dev; > > + unsigned short type = ntohs(skb->protocol); > > + > > if (dev->hard_header_cache && !dst->hh) { > > - write_lock_bh(&neigh->lock); > > + write_seqlock_bh(&neigh->lock); > > if (!dst->hh) > > neigh_hh_init(neigh, dst, dst->ops->protocol); > > - err = dev->hard_header(skb, dev, ntohs(skb->protocol), > > + err = dev->hard_header(skb, dev, type, > > neigh->ha, NULL, skb->len); > > - write_unlock_bh(&neigh->lock); > > + write_sequnlock_bh(&neigh->lock); > > } else { > > - read_lock_bh(&neigh->lock); > > - err = dev->hard_header(skb, dev, ntohs(skb->protocol), > > - neigh->ha, NULL, skb->len); > > - read_unlock_bh(&neigh->lock); > > + unsigned seq; > > + do { > > + seq = read_seqbegin(&neigh->lock); > > + err = dev->hard_header(skb, dev, type, > > + neigh->ha, NULL, > > skb->len); > > + } while (read_seqretry(&neigh->lock, seq)); > > Don't you need to pull in order to undo the push that probably > happened in dev->hard_header()? Probably just record the headroom() and undo that? - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html