Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp102597pxv; Wed, 21 Jul 2021 16:57:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpyi+3Cs7Uo3LWtqfOG+BYtnn1jgH7IuqYDLgVFfxMWN87/6mqzPet+NcGKbughpS+XJ0Q X-Received: by 2002:a02:85a5:: with SMTP id d34mr32610561jai.132.1626911857727; Wed, 21 Jul 2021 16:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626911857; cv=none; d=google.com; s=arc-20160816; b=rrT2lU8mql3gp8KC+n2RCyKkDLLiD+tF3lQdaFzXKIQZCtYcCQX/TFQhKSrqcVmXNK 8+ZhjRtTCbwBBhLAzAGRHsjNWzomIYJzbhS0CCTTpIaBmTmuSatX1crr7+0nNC+9I7Sc iUXMPqJoMWKAgxaRUsLJe78iPTcyqsryCJGTyYK/FnjxQcSBXdam3PxkXzRtaqh0EQRq 0R/3d0YfvPcehseF3iGY4Qmzu/DcQB3TYiKuEcqZeQborrK+Id5uX8P2VBQuQq9EDS+t rRSSY7yqk1SoV+Gg52lCOM4l4N9ldHsmzMcE2WIzLcvbTAVbtvjX6qw4TKsbA0g3wOli nrnA== 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:date:subject:cc:to:from :dkim-signature; bh=8zeB9SdYIGad3GftpPhXNeuDOVvPqv+DJPqmbH0vpUQ=; b=YJ1jP0UGABp6Gy21gQxqnlNZIjqSVtNWAoNxCW3y4KDJ5Op0J/oLiWJolSyj0xFbPI EvyjK5KjfyXgBtFozG+MMquYcMSNGISiNPbbVtNoxBQBw4I8NoIyKcaFZj9BLFlyCyz9 m+EUL3ucJ7Ang9dDqJriWB4GKjn33HEFX4T8r5eLuAtJyzsE7VAkkyRvMBkA6EfZboaU uqTP8EjKDnffBefIt8Wq+v80aiZfdgrnmnleeqqVWKOPnAL+wVqw9QhjmcKvzzOhr0e0 mDjShbp/0GZK3uw3JMJWUvMIseu08EtGlKTh0HnCRwSjnjTclBj8gOFkt//BowqhC8Wb XNeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=QiGRi6Jh; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r17si30155090iov.104.2021.07.21.16.57.26; Wed, 21 Jul 2021 16:57:37 -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=@gmx.net header.s=badeba3b8450 header.b=QiGRi6Jh; 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=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229908AbhGUXPa (ORCPT + 99 others); Wed, 21 Jul 2021 19:15:30 -0400 Received: from mout.gmx.net ([212.227.17.22]:48009 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbhGUXP1 (ORCPT ); Wed, 21 Jul 2021 19:15:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1626911757; bh=8zeB9SdYIGad3GftpPhXNeuDOVvPqv+DJPqmbH0vpUQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=QiGRi6Jh6eLwK2syCOZSMxr/vMGhbW0PcxujKeJiLdENYtFHJWxW1GlKwaX+k7zs8 daDUVIDIWJKUpqc7Zm9QLtlJ9ywdhhFAZD75vV19gOOpQIzF0PE2K7Y6lrCPSBNoIO /3r9IdZy3IrsfJgFpRWN5x8TP6ThBHTge97YHClQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([149.172.237.67]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MfpSb-1lQdo20hKL-00gIod; Wed, 21 Jul 2021 23:56:51 +0200 From: Lino Sanfilippo To: woojung.huh@microchip.com, olteanv@gmail.com Cc: UNGLinuxDriver@microchip.com, andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Lino Sanfilippo Subject: [PATCH v2 1/2] net: dsa: ensure linearized SKBs in case of tail taggers Date: Wed, 21 Jul 2021 23:56:41 +0200 Message-Id: <20210721215642.19866-2-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210721215642.19866-1-LinoSanfilippo@gmx.de> References: <20210721215642.19866-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:mUIOwjeXZDD68etj9mBr6MrnFG4lg1jEYtOkP3DA14joz2fY37k 1zgYb4+R0rj65ECSE3yX1R7l8ydwDDZsFEE/om+kwVbBW1iwDH/iK7qaqCe8/127jpdqp/9 2i7XiJSX5N3neJyaM6wUWAVTgxASajUarjFiwRpGG2VEAdmAGq3W3lUu+QvPe0T9KMjC2xS rUlm6+0F/PZnud5mT8zjw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:vDn73y4plaM=:+5o4aSgaIj/zyUSbyjJhFb MEG6LF2GXoh00HXel2z0Mb8jtmhNbNE4FIqfFN1Fa3w7IZ0eGpSSY2g0lE//srUa196jzceGo T8JuJ8J7UPTccSGLwJ8uUM37FyVK206USKCKe4aLjlf7qVXNJay8BVh6hCqwXbUtUlMtk5Jr7 lLN26DchTNxw78Db0MSmLpdG9DCg9EE/Vh67BuNixdLZIjhvxXWWkBvKYqklRKSTdEzf2vC2P zJ4JraMAC79EjKXR9/joziu4c0DFXOBR/mM7SxnRCCGg/jFShZBQZ8SaXFgRhGYWm23cspVmE dIRixll1VjJUlJ1GMjE01ml4UIIK1bRAzly8xJOqV+rpZ7jio0qk0WAnlsWPtpYIaIK5ckByr IK9H7OO8s0u//7aODOZUzlfXC+28hdpMo6nxWVYP4r2ybT64QctPxB/BD0s3VQN3w4LR1v2w3 TYHrq+2Co1+MtQf92944i0nhZIh9bnenuCbpIZF4+IZIbukLj2vqCeSuuFsLBQfw+VxyU8Dia BJtsWz17UWDHF3DLwnCzBo+SmGuoeOF8EfZv8/19kKlpyzZQQH547shWq727HJdCGPt30+U1v YjOQ9V91hf/79OeF42upEsJu1749oBmofJDqY2BIMAAl7JA16aNpTWnZGF+kVBNXtQN7V7WyV 28YIEKlhgA0EncssHwMOoZDmer7v4sbdncYJNFCDvHl/U5pYrfbpNj4+paw4s6UMK/JzotQGf vjEY1IUevtpSRDyXj8lCz1Obs8x/lVqzLxnpBUwfHNi3kP1yUkVzSMhdzMLEkFydvPYeBU1Ng b6HS6GR/HZYj9D2BPLxAD1UJtvOS6v9kjhG9HZn5Lz5N29bMzg+bDIQRmY6TgAu0AAt07LE5g HvBcvMNX9Ljau5acsi2U+/ZOJDH7ZCQVz4EBh6QSyymMYwpd7Nj2h5cpICuYFUxRrdcw5jFnl up6p6xM3GCY9eRtPkNp3WYFXPiBON/kRDQCeRBWNddImU6tkzHcwKeliOG0fdxYkSVMCBSvfY SG7QYz4NAn/0COIYPdre2wkYrJ+fPH0z5/83GJ1XUt+J0I5rDSV3AMRAJeYvVvRomhov+8EUg qCDcqaifgfC9xqUnvODdSr90nmVjPrQ9dw8CMlPPkP190qBTDr1nShoEg== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org VGhlIGZ1bmN0aW9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