From patchwork Fri Oct 21 21:38:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Thomson X-Patchwork-Id: 2828 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director11.mail.ord1d.rsapps.net ([172.31.255.6]) by backend30.mail.ord1d.rsapps.net with LMTP id n8KgL1SsU2NfDgAAIUCqbw (envelope-from ) for ; Sat, 22 Oct 2022 04:39:48 -0400 Received: from proxy7.mail.iad3b.rsapps.net ([172.31.255.6]) by director11.mail.ord1d.rsapps.net with LMTP id YOrgLlSsU2OtLAAAvGGmqA (envelope-from ) for ; Sat, 22 Oct 2022 04:39:48 -0400 Received: from smtp13.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy7.mail.iad3b.rsapps.net with LMTPS id OHBXKFSsU2MtMAAAQkQ5tQ (envelope-from ) for ; Sat, 22 Oct 2022 04:39:48 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp13.gate.iad3b.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dkim=fail (signature verification failed) header.d=fastmail.com.au; dkim=fail (signature verification failed) header.d=messagingengine.com; dmarc=fail (p=none; dis=none) header.from=johnthomson.fastmail.com.au X-Suspicious-Flag: YES X-Classification-ID: 15f4f3f4-51e5-11ed-8f2e-5254001dfc40-1-1 Received: from [216.105.38.7] ([216.105.38.7:43878] helo=lists.sourceforge.net) by smtp13.gate.iad3b.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id DD/93-14931-45CA3536; Sat, 22 Oct 2022 04:39:48 -0400 Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1omA2D-0003sC-RK; Sat, 22 Oct 2022 08:39:13 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1omA2B-0003s4-Ms for openvpn-devel@lists.sourceforge.net; Sat, 22 Oct 2022 08:39:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=DGXvHcO5+gg7DtnkglN7Ks3LOZNmZTBK6G9vEBt6EJY=; b=KaTeBb1XiBLVg9umtbuVIl2MFa Y4YxX2s/wMr3c6CAxF/5Z3RDNtFs5412WuD7OJ/fAj9F+0sIxN5WshuKha20sF4dUCEhIDO5j2LU3 hIecQLKTvOk7ThPkcPWRBEzrpFeHNJ++nfMREKoptDRegb4lgOX9L71S0rDdlyUs+N/0=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=DGXvHcO5+gg7DtnkglN7Ks3LOZNmZTBK6G9vEBt6EJY=; b=bb3wezBWkSZBc9TlOc+hUJ1I5n ig93dUcKy1TdJRaXso0rmiOuuhSyI29yIMQt6a2Eje6aoC/GmFJS2gZzVVL/5Cl98oqbI4IDdkhca yhDwGiRkGe0bpNWX/2sRJyT+mbUVJYfTWb2oVMw/3BNy9fIn9vpBNP700uwFFMNPjWlc=; Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1omA25-00DD8h-Aw for openvpn-devel@lists.sourceforge.net; Sat, 22 Oct 2022 08:39:11 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 451625C00D2; Sat, 22 Oct 2022 04:38:57 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sat, 22 Oct 2022 04:38:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com.au; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1666427937; x= 1666514337; bh=DGXvHcO5+gg7DtnkglN7Ks3LOZNmZTBK6G9vEBt6EJY=; b=E n/wvQxstuVMTeQRBnHjBI4kniEHbmAyK9FvkqEJYZdFFKquEfKylymseQ0+fHaqJ Glc2wNPH4YfoUrlH+TSn4Z1Pu2cO6/jzyibeQEcXHj8zgAeLBTLSDIRRHKjln7EF f2QPmNnLrhM9Pa+/1jToncvCjmfMTU6OzzTb1SiOlChqsOOHTU/cMhiUiYxCO8CP 42sGK1kb48dM+2fqtJCkTptDUXZTKikcnU8wWPp8abt8sq9r6N3GTpjAYUFo0Dd4 hQqrM3jYnkW0V9T7E4V0kmJoc1NfOlu+zx5sNmrEYKkFXukjpXcMrhU75Q7PRqd5 E3razFomuUlCO2z0rTcpw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1666427937; x=1666514337; bh=DGXvHcO5+gg7D tnkglN7Ks3LOZNmZTBK6G9vEBt6EJY=; b=mySNh99S4DOo88DYnk5pJioS474qt hTkAw0JdZZGbchQ1BtUQEdf/JDQ17DUD3L//WyNnQivGSo5KDBS+XwMxztjnDVA/ EXw4L2XT1HahZDiLdse+P6Sp/l4wGqmI92TfdXOPmiTW/pOXR8wv9agWJsy5rrfB b+bnw905UJcP+b45DqG9Hfwb1hLbD3kqBiR1fnJmttq9Oev2GVpVJQFHlEIgsVGS 46mEgGFGLdmnyb98fJoxANPOWBI0iT2Gw/HA7faazyteUjvlkLdYGKKjl/uvmmFP +NyFNeqJNGsP/kWFrsb/GBsv+6DhnMGmefRHdcDhGvuHROii2EezTO+oQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrgedttddgtdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpeflohhhnhcuvfhhohhmshhonhcuoehgihhtsehjohhhnhht hhhomhhsohhnrdhfrghsthhmrghilhdrtghomhdrrghuqeenucggtffrrghtthgvrhhnpe ffteegtddtfedvvdfhieefvddvueevgeehvdeiffdugeduudduheduhfejkefhveenucff ohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepghhithesjhhohhhnthhhohhmshhonhdrfhgrshhtmhgr ihhlrdgtohhmrdgruh X-ME-Proxy: Feedback-ID: ic081425d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 22 Oct 2022 04:38:55 -0400 (EDT) From: John Thomson To: openvpn-devel@lists.sourceforge.net, a@unstable.cc Date: Sat, 22 Oct 2022 18:38:42 +1000 Message-Id: <20221022083842.4093941-1-git@johnthomson.fastmail.com.au> X-Mailer: git-send-email 2.37.2 In-Reply-To: <8f4f2e11-6418-58ac-0fd5-f9a19450102a@unstable.cc> References: <8f4f2e11-6418-58ac-0fd5-f9a19450102a@unstable.cc> MIME-Version: 1.0 X-Spam-Report: Spam detection software, running on the system "util-spamd-1.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Linux 5.19 replaces netif_tx_napi_add, but maintains a definition to the new function in: 58caed3dacb4 ("netdev: reshuffle netif_napi_add() APIs to allow dropping weigh") [0] Linux 6.1 removes netif_tx_napi_add in c3f760ef1287 ("net: remove netif_tx_napi_add()") [1] Content analysis details: (-0.8 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: fastmail.com.au] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [66.111.4.27 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1omA25-00DD8h-Aw Subject: [Openvpn-devel] [PATCH v2] ovpn-dco: fix kernel 6.1 compile issue in ovpn_peer_create X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox Linux 5.19 replaces netif_tx_napi_add, but maintains a definition to the new function in: 58caed3dacb4 ("netdev: reshuffle netif_napi_add() APIs to allow dropping weigh") [0] Linux 6.1 removes netif_tx_napi_add in c3f760ef1287 ("net: remove netif_tx_napi_add()") [1] [0]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=58caed3dacb4354a25a1aa8d2febc3e9648ba1f4 [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c3f760ef128789252e7c4f10d3c1721422dceba9 Signed-off-by: John Thomson --- v2: Do not throw ifdefs into the middle of the code compile tested only: openwrt toolchain aarch64: kernel v6.1rc1, kernel 5.10 --- drivers/net/ovpn-dco/peer.c | 2 +- linux-compat.h | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/ovpn-dco/peer.c b/drivers/net/ovpn-dco/peer.c index 5838286..8fc619c 100644 --- a/drivers/net/ovpn-dco/peer.c +++ b/drivers/net/ovpn-dco/peer.c @@ -88,7 +88,7 @@ static struct ovpn_peer *ovpn_peer_create(struct ovpn_struct *ovpn, u32 id) } /* configure and start NAPI */ - netif_tx_napi_add(ovpn->dev, &peer->napi, ovpn_napi_poll, + netif_napi_add_tx_weight(ovpn->dev, &peer->napi, ovpn_napi_poll, NAPI_POLL_WEIGHT); napi_enable(&peer->napi); diff --git a/linux-compat.h b/linux-compat.h index 3fb0208..b5af7e9 100644 --- a/linux-compat.h +++ b/linux-compat.h @@ -104,4 +104,12 @@ static inline void dev_sw_netstats_rx_add(struct net_device *dev, unsigned int l #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0) */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 0) +/** + * commit 58caed3dacb4 renamed to netif_napi_add_tx_weight, + * commit c3f760ef1287 removed netif_tx_napi_add + */ +#define netif_napi_add_tx_weight netif_tx_napi_add +#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 0) */ + #endif /* _NET_OVPN_DCO_LINUX_COMPAT_H_ */