Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4304145rwb; Sun, 13 Nov 2022 03:27:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf6NH/nPomh3odQiGMnKumLP12ZxcRhixTaLISaTZAavvQxwnuCRRcdDxxhTAVD/FoJvn2bR X-Received: by 2002:a17:906:4113:b0:7aa:97c7:2bfe with SMTP id j19-20020a170906411300b007aa97c72bfemr7300426ejk.196.1668338848135; Sun, 13 Nov 2022 03:27:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668338848; cv=none; d=google.com; s=arc-20160816; b=MJKs+iOxcLP0OihUMoU1fppnaS81T7WDZqkV5+HLjb2l9b+erm/XY1g9CNBNwC6RUn ZIm+GFUjdnHMMrM/9svopkQoSewtKEasUYCxpM11Wzwn8m/DBdiUM3tl9DzQ63hQ+Tfx DqVmtro0P6BXwUofc3cAGWKRDqmI28BHRyP6F35ds2EAAW50dKC0zMsFLRvRVavfqqHH Tv7SGXYkqwS8+xP4ld2WX1BtgUDjEJhw7NEM2/fkEOzG0KvLRACIdoI7cjD1ZZrlgfne d+WNA1FBV488cu4V6gm9rFk7OsuynnwfD0Ojl54hjRQwu74twpKL9IPuYk5bGlU/I9Zz a+Qg== 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=34+D+hR4RB56ybE7JmTpXcAb0ejoA8iZSlkD1LA6UGk=; b=cw22r848ctZR3HWzZuF49gihxbuPE7giFtY6vqbEUdjfGdkikE4BIhbhcpEJ6EehnV /3COOkI0yUQkDN49SKsPOlPQrikc46zI5Pe4UvOhZhkes9aUSD9X8GGGtcYC+EOTUS4O cz9wUf/xytluJJYy+ApElRUrKEzGd3ZacVHqZuSMOBcBDRk1mEwgtffRAgDXOUksY5qk wa0w+irsGgtadn4o7FihJdUusLhNNTzOE7yDr6hoH5N9h8SofmwqnJmV3yuM+K6Q5d01 ns35cXEA1PSa1N8Deh7mOdxwqtw7KhiuH6DSt7IOOYnUzu+KzUHOfVyf+3c7dPVxGGT8 FaWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=ViZYmyYY; 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 t26-20020a50ab5a000000b0045cafc51fbfsi6839986edc.525.2022.11.13.03.27.03; Sun, 13 Nov 2022 03:27:28 -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=ViZYmyYY; 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 S235194AbiKMLMU (ORCPT + 90 others); Sun, 13 Nov 2022 06:12:20 -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 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. 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(-) -- 2.38.0