lkml.org 
[lkml]   [2009]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/3] macvlan: Reflect macvlan packets meant for other macvlan devices
Date
On Wednesday 18 November 2009, Eric Dumazet wrote:
> > - skb->dev = dev;
> > - skb->pkt_type = PACKET_HOST;
> > + skb->protocol = eth_type_trans(skb, dev);
> > + eth = eth_hdr(skb);
> >
> > - netif_rx(skb);
> > - return NULL;
> > + skb_dst_drop(skb);
>
> Why do you drop dst here ?
>
> It seems strange, since this driver specifically masks out IFF_XMIT_DST_RELEASE
> in its macvlan_setup() :
>
> dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
>
> If we really want to drop dst, it could be done by caller, if IFF_XMIT_DST_RELEASE
> was not masked in macvlan_setup().
>

That must be my fault, it is the only change I did to Eric B's patch when
forward-porting to 2.6.32. The original patch did

skb->protocol = eth_type_trans(skb, dev);
eth = eth_hdr(skb);
dst_release(skb->dst);
skb->dst = NULL;
skb->mark = 0;

and I tried to convert that in the same way that other drivers did, but I
have to admit that I did not understand the mechanics of IFF_XMIT_DST_RELEASE.

Arnd <><


\
 
 \ /
  Last update: 2009-11-18 10:51    [W:0.121 / U:0.904 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site