Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Nov 2017 21:19:12 -0800
From:      "K. Macy" <kmacy@freebsd.org>
To:        Vincenzo Maffione <v.maffione@gmail.com>
Cc:        "Joseph H. Buehler" <jhpb@cox.net>, "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   Re: netmap scatter/gather?
Message-ID:  <CAHM0Q_NHHOZZ7Tss8FMvHJzOGp1Uhg91apQcJw5sv-jUh-bVDQ@mail.gmail.com>
In-Reply-To: <CAHM0Q_OUd=q3EwLHQ_g-h=%2B-xghNUGbxO0mzAWiBa0Ph3bWpaA@mail.gmail.com>
References:  <5A01ED27.60900@cox.net> <CA%2B_eA9hEiw9cWR5e_JtRGpG70woS5KxJpyCo0P4fu2Q6T9BibA@mail.gmail.com> <CAHM0Q_OUd=q3EwLHQ_g-h=%2B-xghNUGbxO0mzAWiBa0Ph3bWpaA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 11, 2017 at 8:30 PM, K. Macy <kmacy@freebsd.org> wrote:
> On Tue, Nov 7, 2017 at 9:32 AM, Vincenzo Maffione <v.maffione@gmail.com> wrote:
>> Hi,
>>   In general netmap adapters (i.e. netmap ports) may support NS_MOREFRAG.
>> But in practice this is mainly supported on VALE ports.
>> So if you don't want to add the missing support by yourself you can simply
>> change the netmap buffer size by tuning the sysctl dev.netmap.buf_size, and
>> increase it to 9600.
>>
>
> When doing vxlan that allows me to avoid copies on encap, but I don't
> see any mechanism to avoid a (second) copy on decap where what I'd
> like to do is to indicate to VALE that the packet starts at a certain
> offset. Am I missing something?

It looks like if you'd just change NETMAP_BUF to take an offset as
well it would mostly just work if I could pass on offset in
netmap_slot:

            idx = ring->slot[i].buf_idx;
            d->hdr.slot = &ring->slot[i];
            d->hdr.buf = (u_char *)NETMAP_BUF(ring, idx);

->
            idx = ring->slot[i].buf_idx;
            off = ring->slot[i].buf_off; /* new */
            d->hdr.slot = &ring->slot[i];
            d->hdr.buf = (u_char *)NETMAP_BUF(ring, idx, off);


>
>
> Thanks.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHM0Q_NHHOZZ7Tss8FMvHJzOGp1Uhg91apQcJw5sv-jUh-bVDQ>