From owner-dev-commits-src-main@freebsd.org Wed Apr 7 22:14:10 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E33435C6B8E; Wed, 7 Apr 2021 22:14:10 +0000 (UTC) (envelope-from vmaffione@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FFzFZ6305z4sWK; Wed, 7 Apr 2021 22:14:10 +0000 (UTC) (envelope-from vmaffione@freebsd.org) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: vmaffione) by smtp.freebsd.org (Postfix) with ESMTPSA id BA0662B9E7; Wed, 7 Apr 2021 22:14:10 +0000 (UTC) (envelope-from vmaffione@freebsd.org) Received: by mail-pj1-f53.google.com with SMTP id o18so49239pjs.4; Wed, 07 Apr 2021 15:14:10 -0700 (PDT) X-Gm-Message-State: AOAM531gBdNqCwXky0xcgqRGArIT0S3I0lBcqctCDta9XO/Cr3JM11oh 4PzgQyiz+8KzeJA9tMe12cevJSWdcsE6wSBpf+o= X-Google-Smtp-Source: ABdhPJxozCRO4X33h+MNYGZGvjyUMOoXBTObHMDNmf3unY8u+fTjqAARriNAIseZEPGP6fhmXOJN+XJCIsqhKXHCLOY= X-Received: by 2002:a17:90a:5a41:: with SMTP id m1mr5333964pji.186.1617833649794; Wed, 07 Apr 2021 15:14:09 -0700 (PDT) MIME-Version: 1.0 References: <202104072142.137LgrJC015011@gitrepo.freebsd.org> <20210407214622.gsedn2cuuj7mblq2@mutt-hbsd> <20210407220730.6z6j2ejytu3j67ik@mutt-hbsd> In-Reply-To: <20210407220730.6z6j2ejytu3j67ik@mutt-hbsd> From: Vincenzo Maffione Date: Thu, 8 Apr 2021 00:13:57 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 15dc713ceb57 - main - netmap: vtnet: add support for netmap offsets To: Shawn Webb Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2021 22:14:11 -0000 Oh, I'm sorry. That's just to silence the compiler because of the unused variable addr. We only need the paddr output value in that context. On Thu, Apr 8, 2021, 12:07 AM Shawn Webb wrote: > No, just the one line: (void)addr; > > On Wed, Apr 07, 2021 at 11:58:45PM +0200, Vincenzo Maffione wrote: > > 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 > 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 > > > > AuthorDate: 2021-04-07 21:32:20 +0000 > > > > Commit: Vincenzo Maffione > > > > 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 > > > > > -- > Shawn Webb > Cofounder / Security Engineer > HardenedBSD > > > https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc >