From patchwork Thu Apr 1 02:11:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ong Boon Leong X-Patchwork-Id: 12176849 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95928C433B4 for ; Thu, 1 Apr 2021 02:09:40 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 124026108F for ; Thu, 1 Apr 2021 02:09:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 124026108F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=mcOIWuiT42r09+l2QNoeEeJd70F7GjB38PWEUt/Bu4Q=; b=WPvFOUJNvsgd8ipFQ7hrgh/vkQ zU1vzmBWLsBJyJAW7Y2MHPwoQYm5iPpzofxyoq/mYZyuxXx6j/Cq+b87I/t0/ROJYOXPPwXOI7ukN VZCR4fTCkDw98MlYWrkpIjGvyZ9vvFMl1SixL2h79h5guvSiq0WJ9T7DdQ/86YLKbRA8QU8sP/hYe L5nNQZ8XSFXepGTrfQHJC/bVLu64qLZb1CuBWVJy+v2RNZZMfVXHYGCResT7xZz92AbHOxMJ+riz8 BoK8Glg+hTAtTCBAVkQzQc9Y7s4gQMaY2cXo1h6wQVO7KK48ckj9TxG4moG4tJ70zY/MU4bg7zgCn pz4xiDIA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRmkJ-008Bx6-Lj; Thu, 01 Apr 2021 02:07:43 +0000 Received: from mga07.intel.com ([134.134.136.100]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRmkD-008BwB-QE for linux-arm-kernel@lists.infradead.org; Thu, 01 Apr 2021 02:07:40 +0000 IronPort-SDR: 9icDkwJ/8stRaC9cKwahoGea8TAZboMsQI0uUKeSDUqcKOhEfF0cz7bSLIqa3cqsNGvKybz/wt zA67ftO+pmLg== X-IronPort-AV: E=McAfee;i="6000,8403,9940"; a="256117390" X-IronPort-AV: E=Sophos;i="5.81,295,1610438400"; d="scan'208";a="256117390" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Mar 2021 19:07:35 -0700 IronPort-SDR: ePneGV3mI4UPzr+IRRbvKpXyIARqNnqPyq9j3+RUSTUg4WOex6YemwffIcuVEaXdT+lKIlcIi3 PyMFBUhizDBQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,295,1610438400"; d="scan'208";a="528004184" Received: from glass.png.intel.com ([10.158.65.59]) by orsmga004.jf.intel.com with ESMTP; 31 Mar 2021 19:07:30 -0700 From: Ong Boon Leong To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Jakub Kicinski , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend Cc: Maxime Coquelin , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Ong Boon Leong Subject: [PATCH net-next v4 0/6] stmmac: Add XDP support Date: Thu, 1 Apr 2021 10:11:11 +0800 Message-Id: <20210401021117.13360-1-boon.leong.ong@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210401_030738_252428_5BF3E551 X-CRM114-Status: GOOD ( 11.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, This is the v4 patch series for adding XDP native support to stmmac. Changes in v4: 5/6: Move TX clean timer setup to the end of NAPI RX process and group it under stmmac_finalize_xdp_rx(). Also, fixed stmmac_xdp_xmit_back() returns STMMAC_XDP_CONSUMED if XDP buffer conversion to XDP frame fails. 6/6: Move xdp_do_flush(0 into stmmac_finalize_xdp_rx() and combine the XDP verdict of XDP TX and XDP REDIRECT together. I retested the patch series on the 'xdp2' and 'xdp_redirect' related to changes above and found the result to be satisfactory. History of previous patch series: v3: https://patchwork.kernel.org/project/netdevbpf/cover/20210331154135.8507-1-boon.leong.ong@intel.com/ v2: https://patchwork.kernel.org/project/netdevbpf/list/?series=457757 v1: https://patchwork.kernel.org/project/netdevbpf/list/?series=457139 It will be great if community can help to test or review the v4 series and provide me any input if any. Thank you very much, Boon Leong Ong Boon Leong (6): net: stmmac: set IRQ affinity hint for multi MSI vectors net: stmmac: make SPH enable/disable to be configurable net: stmmac: arrange Tx tail pointer update to stmmac_flush_tx_descriptors net: stmmac: Add initial XDP support net: stmmac: Add support for XDP_TX action net: stmmac: Add support for XDP_REDIRECT action drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac.h | 35 +- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 539 +++++++++++++++--- .../net/ethernet/stmicro/stmmac/stmmac_xdp.c | 40 ++ .../net/ethernet/stmicro/stmmac/stmmac_xdp.h | 12 + 5 files changed, 547 insertions(+), 80 deletions(-) create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_xdp.c create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_xdp.h