From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF494440D; Tue, 17 Oct 2023 02:02:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from out30-118.freemail.mail.aliyun.com (out30-118.freemail.mail.aliyun.com [115.124.30.118]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAAF59B; Mon, 16 Oct 2023 19:02:34 -0700 (PDT) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=xuanzhuo@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0VuL7N1T_1697508151; Received: from localhost(mailfrom:xuanzhuo@linux.alibaba.com fp:SMTPD_---0VuL7N1T_1697508151) by smtp.aliyun-inc.com; Tue, 17 Oct 2023 10:02:31 +0800 Message-ID: <1697508125.07194-1-xuanzhuo@linux.alibaba.com> Subject: Re: [PATCH net-next v1 13/19] virtio_net: xsk: tx: virtnet_free_old_xmit() distinguishes xsk buffer Date: Tue, 17 Oct 2023 10:02:05 +0800 From: Xuan Zhuo To: Jakub Kicinski Cc: netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Paolo Abeni , "Michael S. Tsirkin" , Jason Wang , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , virtualization@lists.linux-foundation.org, bpf@vger.kernel.org References: <20231016120033.26933-1-xuanzhuo@linux.alibaba.com> <20231016120033.26933-14-xuanzhuo@linux.alibaba.com> <20231016164434.3a1a51e1@kernel.org> In-Reply-To: <20231016164434.3a1a51e1@kernel.org> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: On Mon, 16 Oct 2023 16:44:34 -0700, Jakub Kicinski wrote: > On Mon, 16 Oct 2023 20:00:27 +0800 Xuan Zhuo wrote: > > @@ -305,9 +311,15 @@ static inline void virtnet_free_old_xmit(struct virtnet_sq *sq, bool in_napi, > > > > stats->bytes += xdp_get_frame_len(frame); > > xdp_return_frame(frame); > > + } else { > > + stats->bytes += virtnet_ptr_to_xsk(ptr); > > + ++xsknum; > > } > > stats->packets++; > > } > > + > > + if (xsknum) > > + xsk_tx_completed(sq->xsk.pool, xsknum); > > } > > sparse complains: > > drivers/net/virtio/virtio_net.h:322:41: warning: incorrect type in argument 1 (different address spaces) > drivers/net/virtio/virtio_net.h:322:41: expected struct xsk_buff_pool *pool > drivers/net/virtio/virtio_net.h:322:41: got struct xsk_buff_pool > [noderef] __rcu *pool > > please build test with W=1 C=1 OK. I will add C=1 to may script. Thanks. > -- > pw-bot: cr