Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3520997pxf; Mon, 15 Mar 2021 11:23:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyD4zHNuS3D5M4b7/fCZlZWRmGTpx6oumAxjr+RLUZWyFvrHs9UsWU6ihjSZ55QZ52VlTkr X-Received: by 2002:a05:6402:c11:: with SMTP id co17mr32228314edb.246.1615832628131; 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=Mb6kl83NvFh/hh273XQ+Nd1FvE05MpriCzAdMHTqd8Hy57xzDS4qk57Td7l6CAkBv+ aFYTWsFk9ob/wO3iKl9uRg9x0l9pImOi2/R9sqVqDpiLZdWeBTWuzLhYPmdHdR7/sX0l jkzT1caeJNu/Gl9lmIOPKmGx11nJqBebrZKBrRTnRolMcJI4EDGOhjCiQ0sqEP3nY0Q1 YwLThxLUMu4Z6EeKSMurHxjUVl0jBY0NESUg3GU3TU/mWYEHwaIYEPqQrHPKbqQgrFSY pklb1j2G2yPbZ8BimtAJA2XwVOM3ExVYvaFkHvS7dIZy8XvpUKlKNO6qjW/ERQAbf1Iv 0cyA== 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=H/cTFujW6klaJgl/w6tAfNwpJsDHRRajCdr+wVbqvOI=; b=zbRMe1cYUdi+N0gOXwxTbHxosN3T4ea+uKJT1uOdR0F0HqZLCWULTRD1nl++6xv5vk oiEcisyCnHoFstm1o/Q0KZlpV5poi/dsYFH8JPKcZzMW3DqqDDTYisdqHYUJ5tVY3xZG 50Pyjc7MyfoGdBKKJ5sohlVVHoefiiMlMSWr4Ico54qqvdELQ1bC2TFxUbllHFuSqWGd 849WD8s48/qot4WMsKxz58k4zbYOm7uISZnzVmUBNKK2N/a8+SrZj/LnyBh/zDtoIdhV B9Twwnw52e8WrbTY+aSfv8QyiLa597iGY2HKw/NQkqS2h+iUo98/7sb+LMMzbOzO40wL yfDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mTYi4FTc; 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 c14si12637177edn.523.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=mTYi4FTc; 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 S238172AbhCOOWy (ORCPT + 99 others); Mon, 15 Mar 2021 10:22:54 -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 S232933AbhCOOAM (ORCPT ); Mon, 15 Mar 2021 10:00:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DF26364E4D; Mon, 15 Mar 2021 13:59:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816798; bh=iU51+qiRO0O6uZ2xgnCgNrGd4iUnUycf6tBqgeK7pTc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mTYi4FTcCQH0fueKdUWUBZ/ImsU83na3Akpm2DQLxyRAOUiubAGEC+Kubs9SYPrj8 63sxwB2BDdzJ/wLAi+YjNUdVfHBNR4GDetyeFPivROuBPQiNrCuNqF9NrwovTqRuue x4q48KZSkacD+b9gWFib40U5g5i3Tieaxqo9n8S4= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andrew Lunn , Vladimir Oltean , Florian Fainelli , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.10 120/290] net: dsa: tag_edsa: let DSA core deal with TX reallocation Date: Mon, 15 Mar 2021 14:53:33 +0100 Message-Id: <20210315135545.975872489@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 c6c4e1237dfe731644e79fa06d073625f28cd945 ] 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. Note that the VLAN code path needs a smaller extra headroom than the regular EtherType DSA path. That isn't a problem, because this tagger declares the larger tag length (8 bytes vs 4) as the protocol overhead, so we are covered in both cases. Cc: Andrew Lunn Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- net/dsa/tag_edsa.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/net/dsa/tag_edsa.c b/net/dsa/tag_edsa.c index 120614240319..abf70a29deb4 100644 --- a/net/dsa/tag_edsa.c +++ b/net/dsa/tag_edsa.c @@ -35,8 +35,6 @@ static struct sk_buff *edsa_xmit(struct sk_buff *skb, struct net_device *dev) * current ethertype field if the packet is untagged. */ if (skb->protocol == htons(ETH_P_8021Q)) { - 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); @@ -60,8 +58,6 @@ static struct sk_buff *edsa_xmit(struct sk_buff *skb, struct net_device *dev) edsa_header[6] &= ~0x10; } } else { - if (skb_cow_head(skb, EDSA_HLEN) < 0) - return NULL; skb_push(skb, EDSA_HLEN); memmove(skb->data, skb->data + EDSA_HLEN, 2 * ETH_ALEN); -- 2.30.1