From nobody Sat Mar 11 17:19:46 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PYqRQ5DWrz3xs9s; Sat, 11 Mar 2023 17:19:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PYqRQ4h3gz3nDT; Sat, 11 Mar 2023 17:19:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678555186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8/6GE4HV1SaNhi4fYLi3ys3SKRpHj+Pq5LqmxVBKX+g=; b=o66OBMRtmaYFrPx8ov8kH1ECzWITGJZGihrrKEyVB4gZ4ddlLkJ+QSI3aJOBeF2RDZMOca VsiQnCQJs7P88nKzZ95D/rbxaIt8ueKw2/yDATklBYy5LoghdE5RqDPD5/jEmDnDEliXmw hUQEdhxZBc6ugII4I1kvUeifMvovJqbdG/RGzvaSMdi4efdb1TS7REqbo/iHo5CujD0skD omY3bmBDwSbVq/Xj7hq12cwGCD+39emdX872uGza6wKRugsQR2xG4GqPrzdaN8rfGcOtuf Uux0hFahwnsm7FvwefSMZ1By5T+dwTfNT/POySkXJJEZvJv9wiZsglG0HWmkIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678555186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8/6GE4HV1SaNhi4fYLi3ys3SKRpHj+Pq5LqmxVBKX+g=; b=S7qEi9VNLpfVG7fYK7v8oMMYr44yfNqs4sJMavrA1uy9uNJstGsZdn9ukk1/KgoFE7MYl7 yAPfqbs0VVMGsVNQQt0jm6wD2E3UfL5QY+3b+UXaxewNUA/cqzJhE/vgInpCLMRWdF5lRm b8/vsznHrBHQ57OWs0iDIvwFRnn0Hof8XkP2X1wV2oz2kdBgdOz4283IFwQVDXd3iJ1WLH 0rDL86T4TVnLo1D+V9D5QrZuG1b0BjYz/Hphgj3HeoqmDoAvUS4ZGf9p5+pR9CrTkzJyuE d5WXh1jHqHF33TfUZ8h8af+5N50o+QKZ616OY6AhvruRvnWO66U4OnPYLTdCUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678555186; a=rsa-sha256; cv=none; b=Y4J9x8jqkSt7JyU24nJ9o8/P2Fuk3600k2tciFPHJjvh9JDXVaOO367gBkvRZil0so6CLM 2jGUbVENE7HKfz3H7p7bF5Qpc+cId4k0LKJ+eySx2SD21khhkJGXvyEVdY/mTehdKY2xPq zZQAorKBxTweMUT+ydE99vvE+buoaai8jrtA9umiaxw2+7OIGuqJb+f83Z4+x66t4/iHzv uiML9ilBABMcfoUL/fksdESTmOhpxRHeACkW/XIsC7OEWgwS21ydMQJ7BDBEj7YsIV8prf GPBkmI5mnFaL3hmgn9drIbu4MIMTtr5FJPv/HAfeZM9RXMWePBQA+WcHdb1TIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PYqRQ3jcQzdlL; Sat, 11 Mar 2023 17:19:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32BHJkv5038560; Sat, 11 Mar 2023 17:19:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32BHJkU2038559; Sat, 11 Mar 2023 17:19:46 GMT (envelope-from git) Date: Sat, 11 Mar 2023 17:19:46 GMT Message-Id: <202303111719.32BHJkU2038559@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vincenzo Maffione Subject: git: 22bf2a479f68 - main - netmap: get rid of WNA() macro List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vmaffione X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 22bf2a479f68d5a5b8c002a9103d95f3c7547067 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by vmaffione: URL: https://cgit.FreeBSD.org/src/commit/?id=22bf2a479f68d5a5b8c002a9103d95f3c7547067 commit 22bf2a479f68d5a5b8c002a9103d95f3c7547067 Author: Vincenzo Maffione AuthorDate: 2023-03-11 17:19:01 +0000 Commit: Vincenzo Maffione CommitDate: 2023-03-11 17:19:40 +0000 netmap: get rid of WNA() macro MFC after: 7 days --- sys/dev/netmap/netmap_generic.c | 4 ---- sys/dev/netmap/netmap_kern.h | 9 ++++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/sys/dev/netmap/netmap_generic.c b/sys/dev/netmap/netmap_generic.c index 038d6efc33f5..77c56c74df65 100644 --- a/sys/dev/netmap/netmap_generic.c +++ b/sys/dev/netmap/netmap_generic.c @@ -1034,10 +1034,6 @@ generic_netmap_dtor(struct netmap_adapter *na) nm_prinf("Native netmap adapter for %s restored", prev_na->name); } NM_RESTORE_NA(ifp, prev_na); - /* - * netmap_detach_common(), that it's called after this function, - * overrides WNA(ifp) if na->ifp is not NULL. - */ na->ifp = NULL; nm_prinf("Emulated netmap adapter for %s destroyed", na->name); } diff --git a/sys/dev/netmap/netmap_kern.h b/sys/dev/netmap/netmap_kern.h index b4c7e4c83f6b..c34733f912fd 100644 --- a/sys/dev/netmap/netmap_kern.h +++ b/sys/dev/netmap/netmap_kern.h @@ -110,8 +110,6 @@ #define NM_ATOMIC_TEST_AND_SET(p) (!atomic_cmpset_acq_int((p), 0, 1)) #define NM_ATOMIC_CLEAR(p) atomic_store_rel_int((p), 0) -#define WNA(_ifp) if_getnetmapadapter(_ifp) - struct netmap_adapter *netmap_getna(if_t ifp); #define MBUF_REFCNT(m) ((m)->m_ext.ext_count) @@ -1690,13 +1688,14 @@ extern int netmap_generic_txqdisc; /* * NA returns a pointer to the struct netmap adapter from the ifp. - * WNA is os-specific and must be defined in glue code. + * The if_getnetmapadapter() and if_setnetmapadapter() helpers are + * os-specific and must be defined in glue code. */ -#define NA(_ifp) ((struct netmap_adapter *)WNA(_ifp)) +#define NA(_ifp) (if_getnetmapadapter(_ifp)) /* * we provide a default implementation of NM_ATTACH_NA/NM_DETACH_NA - * based on the WNA field. + * based on the if_setnetmapadapter() setter function. * Glue code may override this by defining its own NM_ATTACH_NA */ #ifndef NM_ATTACH_NA