Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3522975pxf; Mon, 15 Mar 2021 11:26:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyACnd7lWIn9glO8Zi+bkw3lQFBH+cSHNlxcAAMYYucTve7d2VNn39W/GU42+2FnmsJMj7m X-Received: by 2002:a05:6402:168c:: with SMTP id a12mr31941869edv.344.1615832816055; Mon, 15 Mar 2021 11:26:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832816; cv=none; d=google.com; s=arc-20160816; b=tWQEvLBOJnHnpPUzzx9RU3ajvJr34gvg72qda9Spc2whqY8RdwFvEMmPZz43w8AZYi 7ven60vjkuEMhFg3Tn4YEbS87JcH5NUp5IGPe1JQGqAiP5d1pU9Hm3de0mA6/BI+yocZ ohdMnZLOZIPP7Ssni5ktVH8pxlEiaY6SIws6zlTB4v1N6DATvKYJ+IBfJOe3kSzrxk9U IWGYy6zm4vdY/s14XOxoe9fNzbyy7dACYKAQciy1V/MMQm43AJWelUaoen2w4O32c8RE XsuH+mv6wVRjRINGZJ7G6eKUwmPD1fyFosxK8z0hv7kZFv1AftQw9AwaVXJ47ywBny3o 5c1Q== 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=CbKH0lZYczWZZoMDBVpFOHSWSfR2TA4bWs71O7p1plw=; b=Qs4YjkZ3QoGUnFJPq+rRvkaOJGE8YvYjeT3/9eEBydTNbgJmvLdmvbp3FayMpmj4Hr mlOaWY8KJ/1O7kPOgsHCpONJloTGay9yuXBc6/r77cLfAiBpDoWhGs1g7xIUoKqWKgF/ PTjXjfktI8Qchs2hBGwJjTovLk9HqpwEV1Q4VNZ0CYPZW8VlYKrJckf6fcMJREpP/AMr 5yBOVTi0r2t6YuD/Dh5W+NYTsYsRFDVGLSpfi9TK/RHjC4CWoiZmwEPW5FDtqX9/WlCp ySWmHxb5GPCFy/zZ8w92r8ooRmUWgkS+Bw+O1iTey/GXYTplB9i+5bIKkUNNO0/spdQg Dy6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jBkABgGB; 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 i25si3591003eje.58.2021.03.15.11.26.31; Mon, 15 Mar 2021 11:26:56 -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=jBkABgGB; 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 S232932AbhCOOZH (ORCPT + 99 others); Mon, 15 Mar 2021 10:25:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:35186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232774AbhCOOAT (ORCPT ); Mon, 15 Mar 2021 10:00:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 39A9C64F0D; Mon, 15 Mar 2021 14:00:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816803; bh=A7KzmZ+7cPokMkxJwj/neEjsw5DbcgWD6TSvAQxWBH8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jBkABgGBsuJ1XIFCJuNb70gr3xgzMWNQ1S5DgxaR59BTwGij54LkdGu9qp1vdHIyf jCXDH27MD0J/Vd6gMVJQntVWW7uDquIW5hCFu1MgzQiwlpeigddHAQD9B/ywfTjgk9 Jrre7Jo8EgkL32tFxCfnZx5ax0zPQYGVrUVj7olY= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hauke Mehrtens , Vladimir Oltean , Florian Fainelli , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.10 123/290] net: dsa: tag_gswip: let DSA core deal with TX reallocation Date: Mon, 15 Mar 2021 14:53:36 +0100 Message-Id: <20210315135546.070226001@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 9b9826ae117f211bcbdc75db844d5fd8b159fc59 ] 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. This one is interesting, the DSA tag is 8 bytes on RX and 4 bytes on TX. Because DSA is unaware of asymmetrical tag lengths, the overhead/needed headroom is declared as 8 bytes and therefore 4 bytes larger than it needs to be. If this becomes a problem, and the GSWIP driver can't be converted to a uniform header length, we might need to make DSA aware of separate RX/TX overhead values. Cc: Hauke Mehrtens Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- net/dsa/tag_gswip.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/net/dsa/tag_gswip.c b/net/dsa/tag_gswip.c index 408d4af390a0..2f5bd5e338ab 100644 --- a/net/dsa/tag_gswip.c +++ b/net/dsa/tag_gswip.c @@ -60,13 +60,8 @@ static struct sk_buff *gswip_tag_xmit(struct sk_buff *skb, struct net_device *dev) { struct dsa_port *dp = dsa_slave_to_port(dev); - int err; u8 *gswip_tag; - err = skb_cow_head(skb, GSWIP_TX_HEADER_LEN); - if (err) - return NULL; - skb_push(skb, GSWIP_TX_HEADER_LEN); gswip_tag = skb->data; -- 2.30.1