From patchwork Fri Aug 14 14:29:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 11714659 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 88DAF618 for ; Fri, 14 Aug 2020 14:30:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6119320866 for ; Fri, 14 Aug 2020 14:30:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nbd.name header.i=@nbd.name header.b="mhjA14Nk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728724AbgHNOaC (ORCPT ); Fri, 14 Aug 2020 10:30:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728540AbgHNOaA (ORCPT ); Fri, 14 Aug 2020 10:30:00 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DA62C061384 for ; Fri, 14 Aug 2020 07:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject :To:From:Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=AGbdO2LUfT4if2bFjcraqTuuPdT/SIAjiJ8pIO7ZExI=; b=mhjA14NkGQMzBF64rWUJQ54EHt 1g6iOP3lYJAQm+8M0mDpMFIi9mBMfrVNbImPTbmctO8KYcNBC6d4osEFZUk9C3/k/+kjNa5+pTl/6 ahEihsUb+yjwVrVpuq9hPqSDtXGYSBcZ0z2Sic0JYct5JO7zo2Um8HmJOrG4U9Vy28PM=; Received: from p54ae996c.dip0.t-ipconnect.de ([84.174.153.108] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.89) (envelope-from ) id 1k6aiV-0002wm-2t for backports@vger.kernel.org; Fri, 14 Aug 2020 16:29:59 +0200 From: Felix Fietkau To: backports@vger.kernel.org Subject: [PATCH v2 1/2] backports: add netif_receive_skb_list Date: Fri, 14 Aug 2020 16:29:57 +0200 Message-Id: <20200814142958.7773-1-nbd@nbd.name> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org It is needed for mac80211 Signed-off-by: Felix Fietkau --- backport/backport-include/linux/netdevice.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h index edb0aaf33cde..fc69c2165e38 100644 --- a/backport/backport-include/linux/netdevice.h +++ b/backport/backport-include/linux/netdevice.h @@ -372,6 +372,18 @@ static inline int _bp_netdev_upper_dev_link(struct net_device *dev, macro_dispatcher(netdev_upper_dev_link, __VA_ARGS__)(__VA_ARGS__) #endif +#if LINUX_VERSION_IS_LESS(4,19,0) +static inline void netif_receive_skb_list(struct list_head *head) +{ + struct sk_buff *skb, *next; + + list_for_each_entry_safe(skb, next, head, list) { + skb_list_del_init(skb); + netif_receive_skb(skb); + } +} +#endif + #if LINUX_VERSION_IS_LESS(5,0,0) static inline int backport_dev_open(struct net_device *dev, struct netlink_ext_ack *extack) { From patchwork Fri Aug 14 14:29:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 11714661 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 D8A45739 for ; Fri, 14 Aug 2020 14:30:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AF4AD20885 for ; Fri, 14 Aug 2020 14:30:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nbd.name header.i=@nbd.name header.b="OBmMhORo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728540AbgHNOaC (ORCPT ); Fri, 14 Aug 2020 10:30:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728678AbgHNOaB (ORCPT ); Fri, 14 Aug 2020 10:30:01 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB275C061385 for ; Fri, 14 Aug 2020 07:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: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=47NQBxQLnpdrQKXE7oLFByq3314aUGWArUsu59KGKoE=; b=OBmMhORo0xmmlkaA+TfWbgCfKs cSbl8gjPSkBh3lJGWuLS+x1DlFjsNIdimE67YU0/wK33I781M/qSLpIlbcXokHbyMGM8kFCfehfw0 tKzljU6Hv6BPj2SeCAJvITQvtT7XjUURUeFCvcWI51BeSIM4CNtLg8SdMSKNgN7mOnKY=; Received: from p54ae996c.dip0.t-ipconnect.de ([84.174.153.108] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.89) (envelope-from ) id 1k6aiV-0002wm-8q for backports@vger.kernel.org; Fri, 14 Aug 2020 16:29:59 +0200 From: Felix Fietkau To: backports@vger.kernel.org Subject: [PATCH v2 2/2] backports: add skb_list_del_init Date: Fri, 14 Aug 2020 16:29:58 +0200 Message-Id: <20200814142958.7773-2-nbd@nbd.name> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200814142958.7773-1-nbd@nbd.name> References: <20200814142958.7773-1-nbd@nbd.name> MIME-Version: 1.0 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org It is needed for mac80211 Signed-off-by: Felix Fietkau --- backport/backport-include/linux/skbuff.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h index 3ed990d0d2ef..7b825630d391 100644 --- a/backport/backport-include/linux/skbuff.h +++ b/backport/backport-include/linux/skbuff.h @@ -384,6 +384,12 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb) { skb->next = NULL; } + +static inline void skb_list_del_init(struct sk_buff *skb) +{ + __list_del_entry(&skb->list); + skb_mark_not_on_list(skb); +} #endif /* 4.19.10 <= x < 4.20 */ #endif