Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7528202rwb; Tue, 15 Nov 2022 13:48:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf4bJ0GOwANkEdx8eLbHNKzNVQHMB8xZp3wZ1eqvyO2sZnAKkmrykT6NWg2t4w9D/e//t/Di X-Received: by 2002:a50:d4d1:0:b0:467:6ffe:e94c with SMTP id e17-20020a50d4d1000000b004676ffee94cmr15172105edj.417.1668548916674; Tue, 15 Nov 2022 13:48:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668548916; cv=none; d=google.com; s=arc-20160816; b=VtE/f1/XrbTL5O0EdGmeV6u7IONScPwt/7D8pSKEIRdaxxbo8tSN2iMdMkIg5TBFJU FdQMsKMVe8CqUKkgIe6dn+l1EpCrYujoa6Asye5sGdf2lZSkfwQAK7QJbeVrZ62IE2BY IvHN8Vxxvck0Rnc+19aEthgiJx4gqhnWTsTofJJEs/1BJytiMjrViWZEozv0OAZ6ykcN /vm6xjT6bjZ0ylNjskAw9+m+/M++r9EDbS/oa/bxlTrRmaMZa3GGOgN5eBMOh4oeZj7k +74tTlV1sXwXrAGNcuxd9QfaKcsC/e7+TlQcwBmF7tSjU5E2K5ow5H8PDsbrROE8kL7I 3l5Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=wE1CZRzB+4dFUt2vWA72WzHzLuirbxPepJaZ3QxbUqQ=; b=mSTK/zQ4I6qRE7oWGezy/G38r5jwt86M5jRSp9RoDtC1wUafiKBqQxsPVSjaY2aPkf UfFuJeUfWAXhU80TMWSC240iipebY5ocyXLJkdfWMFGcqehqBAY/omtLgqAKVOrjPTsv DbqWV3uhPf9Rubbk6hVPPvcVfFrfb2W6eGqCrgDGHViPXbhlNvMPEB8W4wMGjtF4b1/D MNNQrgDSig7DdR+e92uKlT9oSHBQIonhURaQHEb0+XLsxRP4gE4RBtT+0FIx2acr26Dy S51TbdnTQ733TPqhxmDPpsskQaNWbwMvQTpEzF2qcOp3EDEj83d7PzJBQSD6qhCuyDjD KxLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b="ylteita/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l22-20020a170906795600b0078316f0b5f8si13848806ejo.88.2022.11.15.13.48.14; Tue, 15 Nov 2022 13:48:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b="ylteita/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232203AbiKOVk0 (ORCPT + 91 others); Tue, 15 Nov 2022 16:40:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231697AbiKOVkX (ORCPT ); Tue, 15 Nov 2022 16:40:23 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0075FC0; Tue, 15 Nov 2022 13:40:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1668548422; x=1700084422; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=kwDjaYV376eo+k6PnCx6gQO5TgRlJXK0NEAZ3XOfsgo=; b=ylteita//j1FXdoaHsWm/uGpI40PTSgJoFyTs9efSJeHykrxJbXo6VSa HqHhpF9+SfmdCHdzbjyc/iFCAcNdx+RNskmN6Hc42tqpD113NAaawnZif zG3OZbmZrMZoaHlT7R0FKMzKbe+waXSzaN8GGIS5gQdvRdBkcU6b4nD6G iUty33i+2cGZMhC3tNKsm0pBNz3vGTSuaddtJcqkt5qD8sPk3++ssZfum 4TsJ4vrvzg8DPRNiLvYTfM98rpmqgR9ja7TavYI7zl9JGBRIbzK8HZjcc Lqupxuga6NZfeKdAvPGjk56HdroMJ5y1B82ndXOiQs3GbwLJrny+kon3G Q==; X-IronPort-AV: E=Sophos;i="5.96,167,1665471600"; d="scan'208";a="189162886" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 15 Nov 2022 14:40:21 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Tue, 15 Nov 2022 14:40:21 -0700 Received: from soft-dev3-1.microsemi.net (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Tue, 15 Nov 2022 14:40:18 -0700 From: Horatiu Vultur To: , , CC: , , , , , , , , , , Horatiu Vultur Subject: [PATCH net-next v2 0/5] net: lan966x: Extend xdp support Date: Tue, 15 Nov 2022 22:44:51 +0100 Message-ID: <20221115214456.1456856-1-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.38.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Extend the current support of XDP in lan966x with the action XDP_TX and XDP_REDIRECT. The first patch introduced a headroom for all the received frames. This is needed when the XDP_TX and XDP_REDIRECT is added. The next 2 patches, just introduced some helper functions that can be reused when is needed to transmit back the frame. The last 2 patches introduce the XDP actions XDP_TX and XDP_REDIRECT. v1->v2: - use skb_reserve of using skb_put and skb_pull - make sure that data_len doesn't include XDP_PACKET_HEADROOM Horatiu Vultur (5): net: lan966x: Add XDP_PACKET_HEADROOM net: lan966x: Introduce helper functions net: lan966x: Add len field to lan966x_tx_dcb_buf net: lan966x: Add support for XDP_TX net: lan966x: Add support for XDP_REDIRECT .../ethernet/microchip/lan966x/lan966x_fdma.c | 177 ++++++++++++++---- .../ethernet/microchip/lan966x/lan966x_main.c | 5 +- .../ethernet/microchip/lan966x/lan966x_main.h | 15 ++ .../ethernet/microchip/lan966x/lan966x_xdp.c | 39 +++- 4 files changed, 195 insertions(+), 41 deletions(-) -- 2.38.0