[ovs-dev] [PATCH] datapath: set the skb 'pkt_type' field

Tadaaki Nagao nagao at stratosphere.co.jp
Mon Sep 10 08:51:42 UTC 2012


Hi Jesse,

In "Re: [ovs-dev] [PATCH] datapath: set the skb 'pkt_type' field",
    Jesse Gross <jesse at nicira.com> wrote:
> On Fri, Sep 7, 2012 at 5:23 AM, Tadaaki Nagao <nagao at stratosphere.co.jp> wrote:
> > The datapath doesn't set the skb 'pkt_type' field for packets received
> > from the userspace, and thus their pkt_type is always PACKET_HOST even
> > for Ethernet broadcast and multicast packets.  Though there don't seem
> > to be many users of pkt_type in the Linux kernel, I encountered a
> > third-party driver that relies on that field.  This patch fixes this
> > issue.
> >
> > Signed-off-by: Tadaaki Nagao <nagao at stratosphere.co.jp>
> 
> Can you please elaborate what the driver does with the field?  Is this
> on transmit?  At the very least, I can't send this patch upstream with
> the existing commit message because out-of-tree drivers aren't
> supported so you'll have to provide justification that this is the
> right thing to do in general.

Thanks for the comment!
In our case, a tunnel driver that our partner company wrote works as a
bridge for multiple peer tunnel endpoints, and it looks at the pkt_type
field on transmit to copy and deliver broadcast packets to all its peers.
That said, I understand that'd not be enough as justification.  I'll think
over it again.

> The primary use of pkt_type is on receive and we currently call
> eth_type_trans() when packets are received on internal devices.  For
> transmitted packets there are a number of cases where the packet type
> can change - MAC modification/tunneling in OVS or pretty much anywhere
> a packet is transmitted in the rest of Linux so don't think this patch
> is sufficient there.

Thanks! I'll see where are the more appropriate places to fill the field.

Thanks,
Tadaaki Nagao <nagao at stratosphere.co.jp>
Stratosphere Inc.



More information about the dev mailing list