Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp358371rwb; Fri, 4 Aug 2023 14:03:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG93sXQA8xa9xHE+cD5dvJgCXTuFgTFy+leXUgn73jKDVvs/m1W6yFPsAJmvNZ3loG5j3do X-Received: by 2002:aa7:c1d1:0:b0:522:38f9:4d5b with SMTP id d17-20020aa7c1d1000000b0052238f94d5bmr2292201edp.18.1691183004300; Fri, 04 Aug 2023 14:03:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691183004; cv=none; d=google.com; s=arc-20160816; b=ZnzAnwyfLZPZJCWnVXMo1DN2bHl4dlbkAw5oW84Y83n+ZU9KsAHsBV0LM6dOa+f6PN Cuu/pjI6xqlqLk+jOnyXLiwHrqoikbLA7u8lcShlIE1yRLOHh7YQwP/sq7hnTWwsfZjv FOcR0dWqFo0/9oVhgov3Qnj8b7xySBiz/rH90HKJkYntZlZ9sz+rK6sx2puiPqMx7c+U oxLRwTTUfpjNxcQmHFUAbkvLPxDuE+OwPyWcOLzunjQ/SChz5gf7OKamOu8yHw4lZCNR QI3Uy1BboSqEUQUWKlMZO2tZbKcf1FER4OoBa/tujx/Clv3IlFial6R0aO6ktmp/+bSW aPkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=J76ifngeXXoA39M8XAsH3ZkqxcnPy+HybQB/57AEyHU=; fh=gRj6zRvInrSipAeoTYz4eiKPznVAXxlTRNft35XPezM=; b=PiTZ1UDVl9YwFVPnUxugGBJ9D6LHmIAs5t6ydc/HWGBhrpJ6J01dbAnG4kKxQHKzPF HrxNQCZeHGRWMDFr9t6DEwsnTLEg2V4FVqhpOuDAB2izbtphTx1oTEqlPKGySZSv4Ldq f9YG0GCPasiOXra/Yrlk4/aM96LVvWr0U/wh+M5ns450BmDi50Dmh88S/aSw+0CH1lf8 EbP6vBk78IpxWQUUP3f1T89xlaXEMZZos4RCRUUQuwJIOqJrP7siXdWmWYSRFkuGVTD6 mg/sADlUm3EgmyadYawORQ/EXliLp6joAxd88bxy3rNx+XpAj4cwJFw+ADd6sz7zy36x ZShw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RMwCQ3Vn; 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 bc20-20020a056402205400b0052328e72ed1si10551edb.598.2023.08.04.14.02.48; Fri, 04 Aug 2023 14:03:24 -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=RMwCQ3Vn; 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 S229478AbjHDUpI (ORCPT + 99 others); Fri, 4 Aug 2023 16:45:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbjHDUpH (ORCPT ); Fri, 4 Aug 2023 16:45:07 -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 96C2E4C2D for ; Fri, 4 Aug 2023 13:45:06 -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 276B1620B6 for ; Fri, 4 Aug 2023 20:45:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC365C433C8; Fri, 4 Aug 2023 20:45:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691181905; bh=8ywDJqkGVQloG5UrT53vJCwzkueyvL2Zdl1L+cadkP4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=RMwCQ3Vnw71xzrZuJ/jJ94o18ySfq5CXdxO1zj2Uwkwmzuuh5dSZoPMbRPleTSsVr QqirqQcnS7O3+eFxn+npGzlKeiueik5fE5S48AJJ/u5GlXUEeAXzagw0ms3ZtVt+Ip 6FakjKhPwGAYikmH6Ba+/1XW5JlnjElhXooIHPyBom3rSgNij/74pHAVMOT7azjwXG XH//lz4B//oNKeQZ+EGKHLHu9vxS3vSZS4uAmtxKMZ1+5qKZ0LPPXFAEy7oDhCqfY+ NdmkaDMvD4hjBCH9dIfhW6xHL5tLnZILsVTWXytFTzkLdiPjS3JovqEjaN02okZZ8y eZksZXtoEPR/g== Date: Fri, 4 Aug 2023 22:44:59 +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 , Kees Cook , Richard Gobert , Yunsheng Lin , "open list:NETWORKING DRIVERS" , open list , "open list:XDP (eXpress Data Path)" Subject: Re: [RFC Optimizing veth xsk performance 03/10] veth: add support for send queue Message-ID: References: <20230803140441.53596-1-huangjie.albert@bytedance.com> <20230803140441.53596-4-huangjie.albert@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230803140441.53596-4-huangjie.albert@bytedance.com> 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, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 Thu, Aug 03, 2023 at 10:04:29PM +0800, huangjie.albert wrote: ... > @@ -69,11 +74,25 @@ struct veth_rq { > struct page_pool *page_pool; > }; > > +struct veth_sq { > + struct napi_struct xdp_napi; > + struct net_device *dev; > + struct xdp_mem_info xdp_mem; > + struct veth_sq_stats stats; > + u32 queue_index; > + /* this is for xsk */ > + struct { > + struct xsk_buff_pool __rcu *pool; > + u32 last_cpu; > + }xsk; nit: '}xsk;' -> '} xsk;' Please consider running checkpatch.pl ...