From patchwork Wed Oct 9 21:12:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11182207 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 68A4517D4 for ; Wed, 9 Oct 2019 21:21:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5355E21929 for ; Wed, 9 Oct 2019 21:21:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731072AbfJIVVL (ORCPT ); Wed, 9 Oct 2019 17:21:11 -0400 Received: from mx2a.mailbox.org ([80.241.60.219]:11899 "EHLO mx2a.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729535AbfJIVVL (ORCPT ); Wed, 9 Oct 2019 17:21:11 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2a.mailbox.org (Postfix) with ESMTPS id 928A8A1C9B; Wed, 9 Oct 2019 23:12:39 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id OOFKpvIzb0KG; Wed, 9 Oct 2019 23:12:36 +0200 (CEST) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 2/2] backports: xfrm: Add skb_ext_reset() Date: Wed, 9 Oct 2019 23:12:07 +0200 Message-Id: <20191009211207.29212-2-hauke@hauke-m.de> In-Reply-To: <20191009211207.29212-1-hauke@hauke-m.de> References: <20191009211207.29212-1-hauke@hauke-m.de> MIME-Version: 1.0 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org skb_ext_reset() was added in upstream commit 174e23810cd3 ("sk_buff: drop all skb extensions on free and skb scrubbing") and is now used by mac80211_hwsim. skb_ext_reset() replaced the old call to secpath_reset() in mac80211_hwsim and other places and it also does similar things than this function. Juts call the old secpath_reset() on older kernel versions. This was added to net/xfrm.h and not linux/skbuff.h because secpath_reset() is only available in net/xfrm.h in the upstream kernel and this is not included in linux/skbuff.h. Signed-off-by: Hauke Mehrtens --- backport/backport-include/net/xfrm.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 backport/backport-include/net/xfrm.h diff --git a/backport/backport-include/net/xfrm.h b/backport/backport-include/net/xfrm.h new file mode 100644 index 00000000..7e55984b --- /dev/null +++ b/backport/backport-include/net/xfrm.h @@ -0,0 +1,14 @@ +#ifndef __BACKPORT_NET_XFRM_H +#define __BACKPORT_NET_XFRM_H +#include_next +#include + +#if LINUX_VERSION_IS_LESS(5,4,0) +#define skb_ext_reset LINUX_BACKPORT(skb_ext_reset) +static inline void skb_ext_reset(struct sk_buff *skb) +{ + secpath_reset(skb); +} +#endif + +#endif /* __BACKPORT_NET_XFRM_H */