[ovs-dev] [PATCH for comment only] Allow datapath to pass packets back to the kernel for non-OVS handling

Jesse Gross jesse at nicira.com
Sat Jan 4 00:01:47 UTC 2014


On Fri, Jan 3, 2014 at 12:47 AM, Chris Luke <chrisy at flirble.org> wrote:
> I just discovered a quirk worth being aware of: The two LLDP daemons
> out there work in a subtly different way.
>
> 'lldpd' uses PF_PACKET with ETH_P_ALL as the prtotocol, meaning
> it captures all layer 2 frames. Same thing with the packet
> capture interface tcpdump uses.
>
> 'open-lldp' uses PF_PACKET with the ETH_P_LLDP protocol specifically,
> meaning it only gets LLDP layer 2 frames.
>
> The kernel handles these two cases differently. All the protocol-
> specific handlers are run *after* the hook we use. All the
> ETH_P_ALL handlers are run *before*.
>
> Meaning: LLDP works for lldpd without any changes to OVS, but doesn't
> work for Open LLDP (though my tweaks do allow it).
>
> However, here's a twist: The ETH_P_ALL case specifically skips
> PACKET_LOOPBACK frames, the protocol specific case does not.
> This inadverently means that when I add a flow allowing LLDP
> it does not get double-delivered to lldpd and it does get
> counted in the flow stats.
>
> I think I would be inclined to argue that lldpd is doing it the
> wrong way, that ETH_P_ALL packet sockets are meant as monitoring
> taps, not protocol handlers.

Hmm, that is interesting that there is a difference. I would be
inclined to agree (and I think open-lldp, which I believe is the same
as lldpad, is the more popular one). The other daemon that I've heard
brought up for this use case is Open FCoE so it would be interesting
to check what that uses as well.



More information about the dev mailing list