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 X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0651CC433DB for ; Tue, 5 Jan 2021 09:34:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ABB1C225AC for ; Tue, 5 Jan 2021 09:34:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728146AbhAEJeF (ORCPT ); Tue, 5 Jan 2021 04:34:05 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:51007 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728085AbhAEJeF (ORCPT ); Tue, 5 Jan 2021 04:34:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609839158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KDRR0z0TUONmOgv9BLItAtpsqP3CgvwXGzYeT1dfz/4=; b=bf1xH8KvDnGykQu0C/o3Wa+gXdSmeQFcYlcaHsy7UKFZ3wWKsW8NVIrqmfnthskML+4Pej sNg6DlL6L8H9EUHFg1N580QDdsh8XSGcoNJo/j256T2L1c75hmH+DEvALfiCDZN4WZfbaK sauM4zdsIybNmTvMS1doiw7j+0Sv1JM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-411-X9SbBh3RMIqosxb8yBjmxw-1; Tue, 05 Jan 2021 04:32:34 -0500 X-MC-Unique: X9SbBh3RMIqosxb8yBjmxw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0CD97801A9E; Tue, 5 Jan 2021 09:32:31 +0000 (UTC) Received: from [10.72.13.192] (ovpn-13-192.pek2.redhat.com [10.72.13.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id EFA7C60873; Tue, 5 Jan 2021 09:32:20 +0000 (UTC) Subject: Re: [PATCH netdev 0/5] virtio-net support xdp socket zero copy xmit To: Xuan Zhuo , netdev@vger.kernel.org Cc: dust.li@linux.alibaba.com, tonylu@linux.alibaba.com, "Michael S. Tsirkin" , "David S. Miller" , Jakub Kicinski , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Magnus Karlsson , Jonathan Lemon , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , "open list:VIRTIO CORE AND NET DRIVERS" , open list , "open list:XDP SOCKETS (AF_XDP)" References: From: Jason Wang Message-ID: Date: Tue, 5 Jan 2021 17:32:19 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On 2021/1/5 下午5:11, Xuan Zhuo wrote: > The first patch made some adjustments to xsk. Thanks a lot for the work. It's rather interesting. > > The second patch itself can be used as an independent patch to solve the problem > that XDP may fail to load when the number of queues is insufficient. It would be better to send this as a separated patch. Several people asked for this before. > > The third to last patch implements support for xsk in virtio-net. > > A practical problem with virtio is that tx interrupts are not very reliable. > There will always be some missing or delayed tx interrupts. So I specially added > a point timer to solve this problem. Of course, considering performance issues, > The timer only triggers when the ring of the network card is full. This is sub-optimal. We need figure out the root cause. We don't meet such issue before. Several questions: - is tx interrupt enabled? - can you still see the issue if you disable event index? - what's backend did you use? qemu or vhost(user)? > > Regarding the issue of virtio-net supporting xsk's zero copy rx, I am also > developing it, but I found that the modification may be relatively large, so I > consider this patch set to be separated from the code related to xsk zero copy > rx. That's fine, but a question here. How is the multieuque being handled here. I'm asking since there's no programmable filters/directors support in virtio spec now. Thanks > > Xuan Zhuo (5): > xsk: support get page for drv > virtio-net: support XDP_TX when not more queues > virtio-net, xsk: distinguish XDP_TX and XSK XMIT ctx > xsk, virtio-net: prepare for support xsk > virtio-net, xsk: virtio-net support xsk zero copy tx > > drivers/net/virtio_net.c | 643 +++++++++++++++++++++++++++++++++++++++----- > include/linux/netdevice.h | 1 + > include/net/xdp_sock_drv.h | 10 + > include/net/xsk_buff_pool.h | 1 + > net/xdp/xsk_buff_pool.c | 10 +- > 5 files changed, 597 insertions(+), 68 deletions(-) > > -- > 1.8.3.1 >