Message ID | 20221115214456.1456856-1-horatiu.vultur@microchip.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2955373wru; Tue, 15 Nov 2022 13:47:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf52rwojUEPiAjq+Np6HoxYQZmNP7/sUmTf7kncsZkmbZ7w2dioK5rLCJHGVHvbCP/jWy+kV X-Received: by 2002:a05:6402:1208:b0:461:9667:1b4d with SMTP id c8-20020a056402120800b0046196671b4dmr16415024edw.239.1668548844242; Tue, 15 Nov 2022 13:47:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668548844; cv=none; d=google.com; s=arc-20160816; b=TrQ5xhXdpSfEgf8CGlzmWzs8vPxlbS8H3Z8OFq9UGKxxHWCnNFVF6CQP08uP0m8pzv 792q34yHYuum3rOrulSjtbMax8xl87oudDjmP+kcDYLkBNKPC+VW7EjEGE4yEbGUsvMu I+MfOgrOi4e8YfD8bfqrFdIEHIiaLrEmOiTitp2K89P/IQdLgAm57N/j3+4dQbIaXfg8 DQJ2d1xMCWHrjgRY7s0UQztccGTOtwj2VWJxkHEacz4mC0IxefBDYri+crUgca+P5Lym VNRgRRn2ZIiteY8zMbzhyfoJstSRBz5II5yZj9wOcGysyOrM+wWK7Ty8BXGErLhi5RZP +wHQ== 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 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.46.43; Tue, 15 Nov 2022 13:47:24 -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 <rfc822;maxim.cournoyer@gmail.com> + 99 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <horatiu.vultur@microchip.com> To: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <bpf@vger.kernel.org> CC: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>, <ast@kernel.org>, <daniel@iogearbox.net>, <hawk@kernel.org>, <john.fastabend@gmail.com>, <alexandr.lobakin@intel.com>, <UNGLinuxDriver@microchip.com>, Horatiu Vultur <horatiu.vultur@microchip.com> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749600272734861487?= X-GMAIL-MSGID: =?utf-8?q?1749600272734861487?= |
Series |
net: lan966x: Extend xdp support
|
|
Message
Horatiu Vultur
Nov. 15, 2022, 9:44 p.m. UTC
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(-)