| Message ID | 20221022083842.4093941-1-git@johnthomson.fastmail.com.au |
|---|---|
| State | Accepted |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net>
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 <openvpn-devel-bounces@lists.sourceforge.net>)
for <patchwork@openvpn.net>; 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 <openvpn-devel-bounces@lists.sourceforge.net>)
for <patchwork@openvpn.net>; 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 <openvpn-devel-bounces@lists.sourceforge.net>)
for <patchwork@openvpn.net>; 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
<openvpn-devel-bounces@lists.sourceforge.net>)
(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 <openvpn-devel-bounces@lists.sourceforge.net>)
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 <git@johnthomson.fastmail.com.au>) 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: <xms:IaxTY_QJPKMUZmvbaGUktbPxaHcnws9XFKZjmzoHxjVWf-0qowRsgg>
<xme:IaxTYwyRZ35fcX7X5LPSGWJ48qRN6REFY_27L4UQWEGtC_ppCXEMFHmm7EGlmzpJb
rLcrbCSV5djkDGbEg>
X-ME-Received:
<xmr:IaxTY03i2fSoXI9z57W9ATiT2m2OO_3QneZDm0kYDY3loEGvbuh-kpOD88BqJKDUGYJgnEmXE_aLG9nO3H_2JoT-YOWVT-qttXZ4LHUB1J_b_hPJIaRjPeL6JM0VTdo>
X-ME-Proxy-Cause:
gggruggvucftvghtrhhoucdtuddrgedvfedrgedttddgtdeiucetufdoteggodetrfdotf
fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke
ertdertddtnecuhfhrohhmpeflohhhnhcuvfhhohhmshhonhcuoehgihhtsehjohhhnhht
hhhomhhsohhnrdhfrghsthhmrghilhdrtghomhdrrghuqeenucggtffrrghtthgvrhhnpe
ffteegtddtfedvvdfhieefvddvueevgeehvdeiffdugeduudduheduhfejkefhveenucff
ohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrg
hrrghmpehmrghilhhfrhhomhepghhithesjhhohhhnthhhohhmshhonhdrfhgrshhtmhgr
ihhlrdgtohhmrdgruh
X-ME-Proxy: <xmx:IaxTY_D09as2M2SxEItkj8AY1AJ4ZQUfPywWfJ7wskijOpci6sh-sw>
<xmx:IaxTY4iuTFuN1nylvLeBo2NkNw3_KK07mqEE5oWIZz3vhVwvjM-pyA>
<xmx:IaxTYzocuxqwZvYddGGBvNejOOMnHGWy5XDZRXdXjwYj8XHvUks2nw>
<xmx:IaxTY0au3H9yF4mnByvrs_2Zk7ZkWp0k_QgGgtrucm0loFDyXLYLTA>
Feedback-ID: ic081425d:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
22 Oct 2022 04:38:55 -0400 (EDT)
From: John Thomson <git@johnthomson.fastmail.com.au>
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: <openvpn-devel.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive:
<http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel>
List-Post: <mailto:openvpn-devel@lists.sourceforge.net>
List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>,
<mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: openvpn-devel-bounces@lists.sourceforge.net
X-getmail-retrieved-from-mailbox: Inbox
|
| Series |
[Openvpn-devel,v2] ovpn-dco: fix kernel 6.1 compile issue in ovpn_peer_create
|
|
Commit Message
John Thomson
Oct. 21, 2022, 9:38 p.m. UTC
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 <git@johnthomson.fastmail.com.au>
---
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(-)
Comments
Hi, On 22/10/2022 10:38, John Thomson wrote: > 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 <git@johnthomson.fastmail.com.au> Thanks a lot for this! Your patch has been applied to the master branch with a few minor style fixes. > --- > v2: Do not throw ifdefs into the middle of the code > > compile tested only: openwrt toolchain aarch64: kernel v6.1rc1, kernel 5.10 Out of curiosity: are you using the openvpn-dev feed for openwqrt? (https://github.com/OpenVPN/openvpn-dev-openwrt) Cheers,
On Sat, 22 Oct 2022, at 13:38, Antonio Quartulli wrote: > Hi, > > On 22/10/2022 10:38, John Thomson wrote: >> 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 <git@johnthomson.fastmail.com.au> > > Thanks a lot for this! > Your patch has been applied to the master branch with a few minor style > fixes. Thank you for the help and quick turnaround. I really should have found all the #if LINUX_VERSION_CODE in linux-compat myself the first time⦠Sorry > >> --- >> v2: Do not throw ifdefs into the middle of the code >> >> compile tested only: openwrt toolchain aarch64: kernel v6.1rc1, kernel 5.10 > > Out of curiosity: are you using the openvpn-dev feed for openwqrt? > (https://github.com/OpenVPN/openvpn-dev-openwrt) Not yet, only just learned of it. I was walking through building all the Openwrt kernel modules with kernel 6.1rc1 and came across ovpn-dco in the Openwrt packages feed. Cheers,
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_ */