From patchwork Sun Nov 13 11:15:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Horatiu Vultur X-Patchwork-Id: 13041514 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06D53C4332F for ; Sun, 13 Nov 2022 11:12:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235182AbiKMLMT (ORCPT ); Sun, 13 Nov 2022 06:12:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232676AbiKMLMS (ORCPT ); Sun, 13 Nov 2022 06:12:18 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEBB9FCCC; Sun, 13 Nov 2022 03:12:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1668337939; x=1699873939; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=J9ony0CQq5d3iyH5sLi8OTPUU5tzF0QxE8ldp/fcBvg=; b=ViZYmyYYGqDQtipZY7xoaKe4zvj3FFX+KbzMV1+yJDq0YFpW6D1GnCaz g1Z7DrASeC3Ys+tlxa8m9AwHyqRcqI+lz9KkVYcN1IVHeBVT/quImcBB4 Xa6fE/jx1faAZOLaBaRkmBLlZdzVC7ayuc1rxKQuos3CuVfzrVtPVI32Z ZAOk/BOHPjUks3WnivWjJI/hKWHieGYHaXkr+ybCcyyxIt1PF47iBX62p x2/Fh2mGiSK8DaIl+sS2IfKxLBEILtGqi8SFGIhojMEWK1691O1LeUNn7 zqYoCcehQ9Mj7/xz1gzGGzhlQNgX4CQ4IH0h5iDCb8YIDbNa6B+T8l/Yb Q==; X-IronPort-AV: E=Sophos;i="5.96,161,1665471600"; d="scan'208";a="188767032" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 13 Nov 2022 04:12:18 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Sun, 13 Nov 2022 04:12:16 -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; Sun, 13 Nov 2022 04:12:14 -0700 From: Horatiu Vultur To: , , CC: , , , , , , , , , , Horatiu Vultur Subject: [PATCH net-next 0/5] net: lan966x: Extend xdp support Date: Sun, 13 Nov 2022 12:15:54 +0100 Message-ID: <20221113111559.1028030-1-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.38.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@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. 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 | 183 ++++++++++++++---- .../ethernet/microchip/lan966x/lan966x_main.c | 5 +- .../ethernet/microchip/lan966x/lan966x_main.h | 15 ++ .../ethernet/microchip/lan966x/lan966x_xdp.c | 41 +++- 4 files changed, 200 insertions(+), 44 deletions(-)