Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1405542pxu; Fri, 16 Oct 2020 11:05:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyybSR3g9Uj1KFu+UJ6pQE0MCyRL4M4sRhuxgnoEPtXEAsenc7Dof0+AKDkVbRHAORVYKLd X-Received: by 2002:a05:6402:d06:: with SMTP id eb6mr5246394edb.289.1602871534139; Fri, 16 Oct 2020 11:05:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602871534; cv=none; d=google.com; s=arc-20160816; b=b95y9aG5SZqLHKhjKeAcZkLAFNtLZX75yPgLHqs7THe1WgLkldCcYtDE6I/UBRb3Gw sTvGPvcXiDt8aYvM/KNMLLFHPC64ttmwa7Pp25d33ve9zdArjVclDAgUGfi2sVWtBNMH kfjwJ40MsS/E6EAsYSvODkaln0SMb9iYOMJ+O+qNTptj7fVD9iWS3RqCcqq9J3sBaAf8 GBjfnJVAfVEdqXtTk4h9AOg/YD9wcH6RXzCL11nYfGtfA3bhqnDHxP7KgM71KzMe3THa TFydFMNv7xL3EQKTsYHqnXKuRGViiQP04YNcXQynwMLQ2w5/FKnPugWJWeNsVtu4MxWf I3Rg== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=RJYXPeIK9P5qcU0XakreyrU2YbhgiEiBn2+qOjFQy6c=; b=LjccjySVh35sauukzVFBZWexj51p3oHmyvAmtNY+ybomMKHN5L4Kh8eojGHstXYohB bTvKhxz+7sS2gptQrYHRnleKc01ddIwx9pnq5xKgx0sjoi/kmtnVgQDQydM54RN60yAU RhgDLj+T9EDXsPpEzsCoGpOwF9vk2E0kZQHp2KvWqoUQLXF5/Q6k36xnq+GdA7xTE0ne 5X+wvfjoV6KdWbAH6wFB6XyTRC6GnvJtH8lPc3OZJK1yhlsBIok5sv6acKMCyY+hjtSV gGJp4Yd+FJ5xlNEeeymb3jzkz3IBGjqIvulfX1QU1ZiWlxbXNNALy4PC2QnqB19d8Y9P KxBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JzNJgBya; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f8si2251897edw.608.2020.10.16.11.05.10; Fri, 16 Oct 2020 11:05:34 -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=@kernel.org header.s=default header.b=JzNJgBya; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390872AbgJPSDO (ORCPT + 99 others); Fri, 16 Oct 2020 14:03:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:48116 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390696AbgJPSDO (ORCPT ); Fri, 16 Oct 2020 14:03:14 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (c-67-180-217-166.hsd1.ca.comcast.net [67.180.217.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3B3FE20829; Fri, 16 Oct 2020 18:03:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602871393; bh=cn9qiIDC7xx1z5X6OBF+/z4VWTz+u/m77dXrjWGJv9A=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JzNJgByay3zUnVlfnPv3zTuKqlmZw2GFLDyiogUwGrsGybB0BEMxRprFd+QlCGSxD huklRduW18G+3A5njBaJeCYtyHRojwIgE2c0swZV52Pw+qVSEn/pNvlLXyhKMsLbsp 8yJPUTSzGNwtsLGcgTTajBaXjXPeCmgO+FcZKVXw= Date: Fri, 16 Oct 2020 11:03:11 -0700 From: Jakub Kicinski To: Vladimir Oltean Cc: Christian Eggers , Kurt Kanzenbach , Woojung Huh , Andrew Lunn , Vivien Didelot , Florian Fainelli , Microchip Linux Driver Support , "David S . Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] net: dsa: ksz: fix padding size of skb Message-ID: <20201016110311.6a43e10d@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20201016155645.kmlehweenqdue6q2@skbuf> References: <20201014161719.30289-1-ceggers@arri.de> <4467366.g9nP7YU7d8@n95hx1g2> <20201016090527.tbzmjkraok5k7pwb@skbuf> <1655621.YBUmbkoM4d@n95hx1g2> <20201016155645.kmlehweenqdue6q2@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 16 Oct 2020 18:56:45 +0300 Vladimir Oltean wrote: > > 3. "Manually" unsharing in dsa_slave_xmit(), reserving enough tailroom > > for the tail tag (and ETH_ZLEN?). Would moving the "else" clause from > > ksz_common_xmit() to dsa_slave_xmit() do the job correctly? > > I was thinking about something like that, indeed. DSA knows everything > about the tagger: its overhead, whether it's a tail tag or not. The xmit > callback of the tagger should only be there to populate the tag where it > needs to be. But reallocation, padding, etc etc, should all be dealt > with by the common DSA xmit procedure. We want the taggers to be simple > and reuse as much logic as possible, not to be bloated. FWIW if you want to avoid the reallocs you may want to set needed_tailroom on the netdev.