From mboxrd@z Thu Jan 1 00:00:00 1970 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 B0769C001DB for ; Fri, 4 Aug 2023 20:46:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229952AbjHDUqi (ORCPT ); Fri, 4 Aug 2023 16:46:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229775AbjHDUqe (ORCPT ); Fri, 4 Aug 2023 16:46: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 CD98E4EC4 for ; Fri, 4 Aug 2023 13:46:30 -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 6128F61E90 for ; Fri, 4 Aug 2023 20:46:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50CB9C433C7; Fri, 4 Aug 2023 20:46:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691181989; bh=MeJG2vuAuzwQPAdsG0vf4tmGc9lh6I+FFfN9rIwpfm0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=D9tqZdJ30TDBdZpjaI3uDUgJjJV4vCo9oKGYzNfnFLJ4X0rK27qJuVmgenqbdcJM1 OrqYnrLixy3ZCw2rcNFFVW20WKXlS5lWj7jUXR30VQjNFCPj+6JRBFwxYbmlRj4Q10 ZMZti95gpxwYsBAiur8KkXwn204nEJt8MEGjRCIyc3Y3xyrCxZg+CS3seOvZZAO7fI ORlnmyBbgYmEh37ie26N+8g4gj0Rk22K3x2ZMSNA25LrOo/AOzsPm+x5qO/Gnd+EAv RZ47rQLifPaoSV+YNoJLUfgA+e+Zf2jVPmmrUumq/iPh1XxvEIZy4R6MfClwVafHLM PfhGXK21lNmUg== Date: Fri, 4 Aug 2023 22:46:24 +0200 From: Simon Horman To: "huangjie.albert" Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= , Magnus Karlsson , Maciej Fijalkowski , Jonathan Lemon , Pavel Begunkov , Yunsheng Lin , Menglong Dong , Richard Gobert , "open list:NETWORKING DRIVERS" , open list , "open list:XDP (eXpress Data Path)" Subject: Re: [RFC Optimizing veth xsk performance 04/10] xsk: add xsk_tx_completed_addr function Message-ID: References: <20230803140441.53596-1-huangjie.albert@bytedance.com> <20230803140441.53596-5-huangjie.albert@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230803140441.53596-5-huangjie.albert@bytedance.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 03, 2023 at 10:04:30PM +0800, huangjie.albert wrote: ... > index 13354a1e4280..a494d1dcb1c3 100644 > --- a/net/xdp/xsk_queue.h > +++ b/net/xdp/xsk_queue.h > @@ -428,6 +428,17 @@ static inline void __xskq_prod_submit(struct xsk_queue *q, u32 idx) > smp_store_release(&q->ring->producer, idx); /* B, matches C */ > } > > + nit: one blank line is enough > +static inline void xskq_prod_submit_addr(struct xsk_queue *q, u64 addr) > +{ > + struct xdp_umem_ring *ring = (struct xdp_umem_ring *)q->ring; > + u32 idx = q->ring->producer; > + > + ring->desc[idx++ & q->ring_mask] = addr; > + > + __xskq_prod_submit(q, idx); > +} > + > static inline void xskq_prod_submit(struct xsk_queue *q) > { > __xskq_prod_submit(q, q->cached_prod); > -- > 2.20.1 > >