Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Apr 2021 23:58:45 +0200
From:      Vincenzo Maffione <vmaffione@freebsd.org>
To:        Shawn Webb <shawn.webb@hardenedbsd.org>
Cc:        src-committers <src-committers@freebsd.org>, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 15dc713ceb57 - main - netmap: vtnet: add support for netmap offsets
Message-ID:  <CA%2B_eA9ip2YGwiJFtcC94mAMwnXBdB7uFU=9%2B2-myzBghkvvTgg@mail.gmail.com>
In-Reply-To: <20210407214622.gsedn2cuuj7mblq2@mutt-hbsd>
References:  <202104072142.137LgrJC015011@gitrepo.freebsd.org> <20210407214622.gsedn2cuuj7mblq2@mutt-hbsd>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,
  Do you mean the whole commit? This adds vtnet support for "offsets" in
the netmap buffers. Main use case is that applications can easily zerocopy
push and pop protocol headers from packets.

Cheers,
  Vincenzo

On Wed, Apr 7, 2021, 11:46 PM Shawn Webb <shawn.webb@hardenedbsd.org> wrote:

> Hey Vincenzo,
>
> On Wed, Apr 07, 2021 at 09:42:53PM +0000, Vincenzo Maffione wrote:
> > The branch main has been updated by vmaffione:
> >
> > URL:
> https://cgit.FreeBSD.org/src/commit/?id=15dc713ceb57d0d61c1dc54b1d550da42d250730
> >
> > commit 15dc713ceb57d0d61c1dc54b1d550da42d250730
> > Author:     Vincenzo Maffione <vmaffione@FreeBSD.org>
> > AuthorDate: 2021-04-07 21:32:20 +0000
> > Commit:     Vincenzo Maffione <vmaffione@FreeBSD.org>
> > CommitDate: 2021-04-07 21:32:20 +0000
> >
> >     netmap: vtnet: add support for netmap offsets
> >
> >     Follow-up change to a6d768d845c173823785c71bb18b40074e7a8998.
> >     This change adds support for netmap offsets.
> > ---
> >  sys/dev/netmap/if_vtnet_netmap.h | 16 ++++++++++------
> >  1 file changed, 10 insertions(+), 6 deletions(-)
> >
> > diff --git a/sys/dev/netmap/if_vtnet_netmap.h
> b/sys/dev/netmap/if_vtnet_netmap.h
> > index a05781255218..a423e71331be 100644
> > --- a/sys/dev/netmap/if_vtnet_netmap.h
> > +++ b/sys/dev/netmap/if_vtnet_netmap.h
> > @@ -84,12 +84,14 @@ vtnet_netmap_txsync(struct netmap_kring *kring, int
> flags)
> >               for (; nm_i != head; nm_i = nm_next(nm_i, lim)) {
> >                       /* we use an empty header here */
> >                       struct netmap_slot *slot = &ring->slot[nm_i];
> > +                     uint64_t offset = nm_get_offset(kring, slot);
> >                       u_int len = slot->len;
> >                       uint64_t paddr;
> >                       void *addr = PNMB(na, slot, &paddr);
> >                       int err;
> >
> > -                     NM_CHECK_ADDR_LEN(na, addr, len);
> > +                     (void)addr;
>
> What is this change for?
>
> Thanks,
>
> --
> Shawn Webb
> Cofounder / Security Engineer
> HardenedBSD
>
>
> https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B_eA9ip2YGwiJFtcC94mAMwnXBdB7uFU=9%2B2-myzBghkvvTgg>