[ovs-dev] [PATCH] ofproto-dpif: Use send_packet() instead of netdev_send().
jesse at nicira.com
Wed Nov 2 16:32:39 PDT 2011
On Mon, Oct 31, 2011 at 4:46 PM, Ben Pfaff <blp at nicira.com> wrote:
> On Sat, Oct 22, 2011 at 07:55:24PM -0700, Jesse Gross wrote:
>> netdev_send() directly sends a packet using Linux mechanisms, skipping
>> our kernel module. Several upper layer abstractions are built on top of
>> the kernel module, so this means that we loose stats, sFlow, etc. on
>> these packets. This changes bonding, LACP, and STP to use send_packet()
>> as CFM does, which uses the standard kernel mechanisms and provides a
>> single place that needs to be updated.
> It seems reasonable in concept. In practice I dislike callbacks where
> other mechanisms are practically available, so I'd prefer to have
> bond_send_learning_packet() just compose a packet for the caller to
> send. Presumably it would return either an ofpbuf to send (or null if
> none is to be sent) and the 'aux' value of the slave to send it on. I
> guess its name might better change to something like
> bond_compose_learning_packet() in that case.
> Such a function would only return NULL if bond->active_slave is NULL,
> so we might as well eliminate that case by adding &&
> bond->active_slave to may_send_learning_packets().
All of that sounds reasonable. I'll send out an updated patch.
More information about the dev