Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1309643rwo; Wed, 2 Aug 2023 11:53:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlGcOe2kx5rqvb2kCnbIaKOHJiYWYHpl8ZFN/gqd9zJSuZtLArVXOSMmIArBDn/6RYIbgpwc X-Received: by 2002:a17:906:c1:b0:99b:eeae:23d0 with SMTP id 1-20020a17090600c100b0099beeae23d0mr5320774eji.12.1691002437486; Wed, 02 Aug 2023 11:53:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691002437; cv=none; d=google.com; s=arc-20160816; b=oGjJfCSH2izLlb9903V9xkaZZTyyBZwCAFua/mR+HNQ/mRa2zXx98nm/GeJrUt9bbk UlXgXsznwvVIgDDDzUmXmqadH6vfYob8+UU3GzibY5WoqQnd+K39L4pgaGXfP1zZ8ulL eNDt2SYwk3+5N43GN728ONDYm/4ImFD2+OYsc335RgtzSOtsOn/Lmnb5Z8syD8ie/HHK yiXQUd7Y+xBKhN5Oy1QAEWuv+qnrnG7rDnhnxi4vdmUTIkZ2JUvowl9dJs8vDGTG/Q/p nDp55r9l5k5H0TWgvxKod9i98co9ruPCrivHik/DI19pZLcqtiVPIFFc0UQehW5y7vY4 SFjQ== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=YA2vU1yAxLABvP7DYOe0PfGfns9XvrsGBaAHxEyrYbc=; fh=qAAtp87cDrlHjYXEkdQF4UdWmLwfoPE9p5UrnzEtgMc=; b=uaeQpJEIGVgYbN0a6XIqld/z+b8tgICKOxQGcFas8omkyOPejW7IACFUhWNXg7UZR4 57TbHmjLIFLLkNR9dqpTfq6f7xMsn94j/7KAdtt9XUXEyzoeQMlyn7AhmbXkxQhYJc0I bWrNpsFu3ZzcnFnsF6r2aA1AJ4ncdC0fK+nMKlr295Z7QwJaZE/SojoPlMoEA62f5SQ0 dExvWm5YQaH218Pqh1akWUEZYe30v3cxKUA2Um8Mgx8ZLZdzDqVJQoattoAScvdAjei5 t44H3woIOgmNCtalaiC55lU665U0U03K4KUKwpO7euMETHF0o/4bx/qGsSMhNY6LIY70 OWAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cj3wlW0o; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z22-20020a170906241600b00984713011c1si10414345eja.306.2023.08.02.11.53.33; Wed, 02 Aug 2023 11:53:57 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=cj3wlW0o; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234036AbjHBRrq (ORCPT + 99 others); Wed, 2 Aug 2023 13:47:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234057AbjHBRre (ORCPT ); Wed, 2 Aug 2023 13:47:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3161830C4 for ; Wed, 2 Aug 2023 10:47:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9ADF261A4D for ; Wed, 2 Aug 2023 17:47:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50900C433C7; Wed, 2 Aug 2023 17:47:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690998428; bh=sE6AgUQ0F8B532TRUZLvOvqkjOvFLzeZinak6Pnz2BQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cj3wlW0o4CuBFv2vgVAJKJx0C5RTeD92PotxBduWEsCb2JeCdBxIzPOE0e1kGDABR Ruu2Id3g5aUv4LzY8w+SmaQp4ti4eZ/ETrNKOCg7RsDsAJ+oyoeMMyvQCULrCJDoMn UrZVHWJYRpLHmmNuAhI3BK70A8+dvC1m5LdMTd0wCuunpNqzmQ7NQ+wbMOJkErT2kA tpi0F7OOB6xp8FyK5w4Gs7315AkjZ8B1oKLq1YLnSAAcEk4HBeUSsdq1RNRXo09idd XztNeB9fxfB6g3w08n6s7VYnnTPL5Szu1KttO5DNUX0H0dYMNoqAH1jeYlnnR7oe19 qUT1O6TbWF7IQ== Date: Wed, 2 Aug 2023 10:47:06 -0700 From: Jakub Kicinski To: Wei Fang Cc: davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, shenwei.wang@nxp.com, xiaoning.wang@nxp.com, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com, netdev@vger.kernel.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH V3 net-next] net: fec: add XDP_TX feature support Message-ID: <20230802104706.5ce541e9@kernel.org> In-Reply-To: <20230731060025.3117343-1-wei.fang@nxp.com> References: <20230731060025.3117343-1-wei.fang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Mon, 31 Jul 2023 14:00:25 +0800 Wei Fang wrote: > } else { > - xdp_return_frame(xdpf); > + xdp_return_frame_rx_napi(xdpf); If you implement Jesper's syncing suggestions, I think you can use page_pool_put_page(pool, page, 0, true); for XDP_TX here to avoid the DMA sync on page recycle.