Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1214368pxj; Wed, 19 May 2021 00:36:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcxqC7YZ0oTyLJPLh4B+1g/sK+fyqTWY1lLPOlViSVjwbi1QIkhsyatr/9j4Cueqs9oz18 X-Received: by 2002:aa7:d61a:: with SMTP id c26mr12816607edr.351.1621409797964; Wed, 19 May 2021 00:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621409797; cv=none; d=google.com; s=arc-20160816; b=Z2buNeTZyGF4/fykLu32suZdeMPGGTv9N6dzVRxMvA8LzoD35rT5JGYqLKHTCzM06f 5PPQLOCXxjONvEJ3oX5gaK0KuaYS6GjlhdumezV4kwGrt+8DB5IkO4uXfDYn9ttsFMqr n3C0Ue+xc3U39wnqc7edeOUdhGb1KmppSwLnl0ohmQehvmiveq15wx7YSf4rZ943wnlp CHYk/i4w1a+7z//0YLHgawCuQGtj0hL+VbVsl1tck2SzP10ygbouUJnrk0S2dG86e1qu vI20NTNjj2u6eq12KH8Q5NjMsbwgeMAGiAUE6YlaghKMccbh05SC1QcPvgDZoH13Bpp5 EBLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=TNVxp+4uYZU44gvo81BAyFu2mBsVyk6HxBgwuTdRjGw=; b=BJWU5G+uQjyNvlLo9kyajTFhptpD+m2+a4CpO8dTmQIXBjOjUBYwyvUcRT6Uz3XKmM VjMZTwzu6wEvmW7hS1S/U5c9RVOryFp1laoypGWUUcimTf9ubGWACfD+LR5DZ9Snkpfp IIlpIaLaThyYWr5FdUBR0aO4J0mceT9l1RW6bl8A2TgxPE25WdfwkiYakJebFFggd/zE 0DPU9ENudrpTFAups7spIOWS8oFuLVKwpNMc9A99/9jIiWfMtfEVFwxX75G0C9HfHAnX riFhYzkkcKN4qkoUy5niXfwYvAnbYmmT9KNVELTqagdiLdjEXo3OP0ioxCmLD7B0D4gD 3c6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Xb7tt3YS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pw23si13810988ejb.144.2021.05.19.00.35.21; Wed, 19 May 2021 00:36:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Xb7tt3YS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241312AbhEQUZO (ORCPT + 99 others); Mon, 17 May 2021 16:25:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241818AbhEQUZK (ORCPT ); Mon, 17 May 2021 16:25:10 -0400 Received: from mail-vs1-xe35.google.com (mail-vs1-xe35.google.com [IPv6:2607:f8b0:4864:20::e35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C43F9C061756 for ; Mon, 17 May 2021 13:23:52 -0700 (PDT) Received: by mail-vs1-xe35.google.com with SMTP id f15so2467671vsq.12 for ; Mon, 17 May 2021 13:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=TNVxp+4uYZU44gvo81BAyFu2mBsVyk6HxBgwuTdRjGw=; b=Xb7tt3YStfK16ujxVVCoZcExFZ22Uh+FtP8r3MT4LMYX1A5AgkQEaEGiKG5wJH+qdP PeNZ4c6i8DVxyi57luCsqW5Ang2kb43bKhIFOEcYFm/B8/pxVqavwixiTK5k8mW1PvXM f8ipUarjrgWCa6PhRPlYtawPv/yyGxu3TENCGJfGc6r6YdP326WIN+M1FxI5Ie18ylvj c5ONkEc6z+UwtEdeUnoVROVztdfeshg5E4q3VJu1YsYwfEc0Gsi8mBDqlrDwOfmwYbWO xZd4kPYJn8JPLDxoDJ6i7VJUIWRFHKeR00WgLYTTv5UT07AcWjY2IpnpdzAO254m4FmG epkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=TNVxp+4uYZU44gvo81BAyFu2mBsVyk6HxBgwuTdRjGw=; b=hd9rS++37LGpyoCUCavtSZUXGEZulRMVpcP2cpiGpfIkEDMpTW7vhqYPyf7MS9e1mY PiwDA6ZsdKuqG5DPyHyFEqgOerl4fedAZRKknN+LUsC+YBmtznn0ZPNWHy/Ah81PIJPA Xkd4xxI7psS8z4dklTdrjSUQtyiJ+osBUhH7zFJczN+17k14cfeud1ijwm6Wrhw6opWE id3jRE97TAyr/iBaUAKE9qh3YV6Q+hnRkigaXmRuM7td+gYO68jyEenIN3hw/5tE0TPG vEH/6VOe4i0Ob+2WpJA/Fy9hdCfo12UU4DEAgQhUxABNIL2zaA7kwoQYeod2VPxNEBMn rDSw== X-Gm-Message-State: AOAM532BNd1GeAjZQCPIHS/QtkwWQ99Rbah2B0uoiorDpqpKzySHwiX4 Behde3Cx09M89qd/7xZLmxGciG9l2r2aWPBu X-Received: by 2002:a67:ce81:: with SMTP id c1mr2072204vse.28.1621283031663; Mon, 17 May 2021 13:23:51 -0700 (PDT) Received: from mail-vs1-f47.google.com (mail-vs1-f47.google.com. [209.85.217.47]) by smtp.gmail.com with ESMTPSA id m27sm1917686vsj.4.2021.05.17.13.23.49 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 May 2021 13:23:50 -0700 (PDT) Received: by mail-vs1-f47.google.com with SMTP id j13so3793374vsf.2 for ; Mon, 17 May 2021 13:23:49 -0700 (PDT) X-Received: by 2002:a67:fe57:: with SMTP id m23mr2025033vsr.47.1621283029295; Mon, 17 May 2021 13:23:49 -0700 (PDT) MIME-Version: 1.0 References: <56270996-33a6-d71b-d935-452dad121df7@linux.alibaba.com> In-Reply-To: From: Willem de Bruijn Date: Mon, 17 May 2021 16:23:10 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: virtio_net: BQL? To: Dave Taht Cc: Xianting Tian , "Michael S. Tsirkin" , Jason Wang , "David S. Miller" , Jakub Kicinski , virtualization , Linux Kernel Network Developers , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 17, 2021 at 2:44 PM Dave Taht wrote: > > Not really related to this patch, but is there some reason why virtio > has no support for BQL? There have been a few attempts to add it over the years. Most recently, https://lore.kernel.org/lkml/20181205225323.12555-2-mst@redh= at.com/ That thread has a long discussion. I think the key open issue remains "The tricky part is the mode switching between napi and no napi." > On Mon, May 17, 2021 at 11:41 AM Xianting Tian > wrote: > > > > BUG_ON() uses unlikely in if(), which can be optimized at compile time. > > > > Signed-off-by: Xianting Tian > > --- > > drivers/net/virtio_net.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > index c921ebf3ae82..212d52204884 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -1646,10 +1646,9 @@ static int xmit_skb(struct send_queue *sq, struc= t > > sk_buff *skb) > > else > > hdr =3D skb_vnet_hdr(skb); > > > > - if (virtio_net_hdr_from_skb(skb, &hdr->hdr, > > + BUG_ON(virtio_net_hdr_from_skb(skb, &hdr->hdr, > > virtio_is_little_endian(vi->vdev), = false, > > - 0)) > > - BUG(); > > + 0)); > > > > if (vi->mergeable_rx_bufs) > > hdr->num_buffers =3D 0; > > -- > > 2.17.1 > > > > > -- > Latest Podcast: > https://www.linkedin.com/feed/update/urn:li:activity:6791014284936785920/ > > Dave T=C3=A4ht CTO, TekLibre, LLC