git: 15dc713ceb57 - main - netmap: vtnet: add support for netmap offsets

Shawn Webb shawn.webb at hardenedbsd.org
Wed Apr 7 21:46:25 UTC 2021


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 at FreeBSD.org>
> AuthorDate: 2021-04-07 21:32:20 +0000
> Commit:     Vincenzo Maffione <vmaffione at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/dev-commits-src-all/attachments/20210407/2107b259/attachment.sig>


More information about the dev-commits-src-all mailing list