[ovs-dev] [PATCH v3 2/3] netdev: netdev_send accepts multiple packets

Daniele Di Proietto ddiproietto at vmware.com
Fri Jun 13 16:14:50 UTC 2014


Thanks for the suggestions Ben.

I posted a v4 few days later, but since I need to apply this change I’ll post a v5 as soon as possible.

Daniele

On Jun 13, 2014, at 9:10 AM, Ben Pfaff <blp at nicira.com> wrote:

> On Fri, Jun 06, 2014 at 05:13:14PM -0700, Daniele Di Proietto wrote:
>> The netdev_send function has been modified to accept multiple packets, to
>> allow netdev providers to amortize locking and queuing costs.
>> This is especially true for netdev-dpdk.
>> 
>> Later commits exploit the new API.
>> 
>> Signed-off-by: Daniele Di Proietto <ddiproietto at vmware.com>
> 
> If I'm reading the patch right (it has conflicts against current
> master), then netdev_linux_send() has a special case that transforms
> ENOBUFS into EAGAIN but then it replaces it immediately with ENOBUFS
> from errno:
>            /* The Linux AF_PACKET implementation never blocks waiting for room
>             * for packets, instead returning ENOBUFS.  Translate this into
>             * EAGAIN for the caller. */
>            if (errno == ENOBUFS) {
>                error = EAGAIN;
>            } else if (errno == EINTR) {
>                continue;
>            }
>            error = errno;
>            break;
> If I understand the intent, I'd probably write that as:
>            /* The Linux AF_PACKET implementation never blocks waiting for room
>             * for packets, instead returning ENOBUFS.  Translate this into
>             * EAGAIN for the caller. */
>            error = errno == ENOBUFS ? EAGAIN : errno;
>            if (error == EINTR) {
>                continue;
>            }
>            break;
> 
> That jumped out at me because it was the site of a conflict, but I
> didn't really read the read.  I'd appreciate a rebase and repost




More information about the dev mailing list