Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3521003pxf; Mon, 15 Mar 2021 11:23:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4TBGHyRvXdJdCNs8DOmTlMlzu2QWgrzhQ6Tk42e3WTZTYhK/O/KPinAb7J1G/hc6FsfE/ X-Received: by 2002:a50:f113:: with SMTP id w19mr30927207edl.226.1615832628645; Mon, 15 Mar 2021 11:23:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832628; cv=none; d=google.com; s=arc-20160816; b=kThwusgcXBDIQ8sWlXpzyOjAKlJv6M8Qop4zcspXHshnhru7mVocDdleF7fX4z92FQ ITY8Tp9fbOsqCmLt13o2e2JTVXp/b/kJ7zcnb0qjsiY/rAqbqCGBD+9BLubvEvLZd2uq LzgV1p2qfe+/wnCxGZTL5c7k6ATIBR0rOchJu3nwmRTma01xDE4dEi1Yu+7s7hBa/6qQ mhAu8bLGj3YsOutlyolgPjpYu9Op2A+ki92Owm06c+oDX0VHwRgy+tj9o0N9iF3zg0R/ DYM+C6xbMLzYU2lcGiu47N2a1Aj2sUS1Mrd75Pn2dyXLcqShJ0v3n6gGSXiijHsY8yE/ W77Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NYVoGddNnSR/sD4dK1POWlw7Cqzm5ErnFRerbRyL35M=; b=Hkw4ydxrYhuDXbhS7hPQAmMbUZmzDhdDUJYQWNbrcEYdtTCjk2MxvQLDxn0lOT9orf UBVR3qssfgZWnsxcO6nA75A71x/orHLVSl5FqXLj6mfPFDkoUN2biCQQd5dBBEUhgJjM GKNklA6mk2uzDg3VDPwqhBFtRHTi4zOQoPsGAHhcHouCSTweKdin6GgTXpE/bC5zzeev fBHqeKnx+Sef32u8fH0mStujf4M9VjJY39pU+dI5Gg3imjAYmAiNUI9zWV/nrNqvl6EY xmQihAD40y0LXu/ZwaOFwvPUgBCDd2tWpsHJU0r5MiVTfmOQoD+T1ZIVzinQYXL/VPW5 KG8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=P5oz5fCU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f3si11563939ejd.252.2021.03.15.11.23.26; Mon, 15 Mar 2021 11:23:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=P5oz5fCU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238399AbhCOOXK (ORCPT + 99 others); Mon, 15 Mar 2021 10:23:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:34900 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231713AbhCOOAP (ORCPT ); Mon, 15 Mar 2021 10:00:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7EF0064F4A; Mon, 15 Mar 2021 14:00:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816801; bh=RFrcURexPVc/7XiA8umAE8xd45I932cHo1tF9FoaQUE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P5oz5fCU+ChCodFYzUVOANYouwnKTZeEmoZDgQ7LIgj/uddt/KLx1ntF/+ozMUsvg cu4WuZjFzriy48jS/PN2SiDINNSCIeAEZEluLV6r447A+9W0c8nbRa2yXBbrhgGMXT uBtbWN0q0WZx4YbG6Ob59rYCMVMIuqa8bgoS9mMA= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vladimir Oltean , Florian Fainelli , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.10 122/290] net: dsa: tag_dsa: let DSA core deal with TX reallocation Date: Mon, 15 Mar 2021 14:53:35 +0100 Message-Id: <20210315135546.040050935@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Vladimir Oltean [ Upstream commit 952a06345015867e3bd37f8d9045fc1429637d43 ] Now that we have a central TX reallocation procedure that accounts for the tagger's needed headroom in a generic way, we can remove the skb_cow_head call. Similar to the EtherType DSA tagger, the old Marvell tagger can transform an 802.1Q header if present into a DSA tag, so there is no headroom required in that case. But we are ensuring that it exists, regardless (practically speaking, the headroom must be 4 bytes larger than it needs to be). Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- net/dsa/tag_dsa.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/net/dsa/tag_dsa.c b/net/dsa/tag_dsa.c index 0b756fae68a5..63d690a0fca6 100644 --- a/net/dsa/tag_dsa.c +++ b/net/dsa/tag_dsa.c @@ -23,9 +23,6 @@ static struct sk_buff *dsa_xmit(struct sk_buff *skb, struct net_device *dev) * the ethertype field for untagged packets. */ if (skb->protocol == htons(ETH_P_8021Q)) { - if (skb_cow_head(skb, 0) < 0) - return NULL; - /* * Construct tagged FROM_CPU DSA tag from 802.1q tag. */ @@ -41,8 +38,6 @@ static struct sk_buff *dsa_xmit(struct sk_buff *skb, struct net_device *dev) dsa_header[2] &= ~0x10; } } else { - if (skb_cow_head(skb, DSA_HLEN) < 0) - return NULL; skb_push(skb, DSA_HLEN); memmove(skb->data, skb->data + DSA_HLEN, 2 * ETH_ALEN); -- 2.30.1