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 1D63C174C0; Thu, 20 Jul 2023 08:21:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48F2E2110; Thu, 20 Jul 2023 01:21:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=NqLEMJC7fYxhCSn83KJr6oToHsj8izdq9tSB9Ugi6bU=; b=2d/fYZrKqw67I24WjJ5lvu/zoc dul2IKATOMlxqldTLbyOVLkP9BV4xjJCJVylu8pcxCXCLllrbpy2Sb0q0ajxJ5xW6U+Urc6uBhx7J W9iV5FEMmaabUufPI+NoOw2c2SDi/JQ73YFg2l8V15JzLVKteaSXww2eHlj6tzh3oa72XEJEto/3o xJRhQtdkTQJPVqy4Wo2g64rdSg/gmbUCsTToZ60C7EALMZk99rsLZNLLMqChUkmWdXyQIg1Mulxyr jBCLilzUwsIeC4O9IswurY59ogK8VJ8vJJkgn9DXtp4CdhMGY1OoC7QAdys/EZ/XnCr4l1UGmYClk ydD/Hqhg==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qMOut-00AHtv-3C; Thu, 20 Jul 2023 08:21:43 +0000 Date: Thu, 20 Jul 2023 01:21:43 -0700 From: Christoph Hellwig To: Jason Wang Cc: Christoph Hellwig , Xuan Zhuo , virtualization@lists.linux-foundation.org, "Michael S. Tsirkin" , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , netdev@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH vhost v11 10/10] virtio_net: merge dma operation for one page Message-ID: References: <20230710034237.12391-1-xuanzhuo@linux.alibaba.com> <20230710034237.12391-11-xuanzhuo@linux.alibaba.com> <1689231087.0744615-2-xuanzhuo@linux.alibaba.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 On Thu, Jul 20, 2023 at 03:41:56PM +0800, Jason Wang wrote: > > Did you actually check that it works though? > > Looks like with swiotlb you need to synch to trigger a copy > > before unmap, and I don't see where it's done in the current > > patch. > > And this is needed for XDP_REDIRECT as well. DMA always needs proper syncs, be that for swiotlb or for cache maintainance, yes.