Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1546305pxb; Fri, 18 Feb 2022 09:58:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJwPJimQEPw5Gvp0VT0N+ZBxS+NOz6OJSbdHGGuoic2RHcJHg+5ZTpU/LXIWcO2g4FMp6Iet X-Received: by 2002:aa7:d591:0:b0:411:6c4f:1725 with SMTP id r17-20020aa7d591000000b004116c4f1725mr9363897edq.342.1645207097906; Fri, 18 Feb 2022 09:58:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645207097; cv=none; d=google.com; s=arc-20160816; b=lwI+1TbKKma2dc9+cMeld+t0xE+0aF9JdaD/KGLYbQUAvjq4Qun1qvaxUJ8j+OdJIz ik5cfm09GNVMusDl+vpZxnwNOsSnUBRdI4Z61BNz5p81koeExRWDTVpId4faTr/2x+M7 LfSY2uolwoYRAJNcihnTqjjppvRZdEFq62TQ8m+Uc6hN3coflBywtcxvh3WuZst263yV 9Rj4pG54QfehqtoBRBfwqR2VkXSADeMtqI75GhMvODbDXvX9yUhDKHJcIjWN3VqLho3b 1+J98F+C1PHPCbkjm8jXVhAPyloLULCvSHYIZ0W6ttFq6ytcSnmIUItS9GCU6Gqm/frV 2now== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ZlNKOu+PC57cWSc9B8bT89/4L+VjMA7vIqhUEFRfco4=; b=Vy0NM2FPA7mTCNZAij17B0vbkkg8d03ttL9MHssfWs7AzApbAYt8sB3pl5N8wTra0u PJErocb+xkrNNy0jx6vlyZR8/8TyopEl2+6yyPj4aHCovKWiCF7sZbUw7gJiad87tLEC xV53l6LnRjIK32c5nqAjALDzcycBr3sKEXSwXCVpIcWT52C/hWpegp8iLjJnah1SNNLV L/28Z4KLsmBzaF3RUlvbQWQR/CuwJtPFrs4EEf5Mh5QSWhoNsMvk1sjdfKMn8lsnPG9L y0fGJVJq0V7dAzql43i9hcw5btfqXkVvWg422zm3xiYDjlCa/xvF/b6/hYbOMlSPbrKU M/tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=A5pZd2Cb; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b13si8295073edz.444.2022.02.18.09.57.55; Fri, 18 Feb 2022 09:58:17 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=A5pZd2Cb; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237125AbiBRPoQ (ORCPT + 99 others); Fri, 18 Feb 2022 10:44:16 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:40888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232042AbiBRPoP (ORCPT ); Fri, 18 Feb 2022 10:44:15 -0500 Received: from mail-ua1-x92b.google.com (mail-ua1-x92b.google.com [IPv6:2607:f8b0:4864:20::92b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 849F318B15F for ; Fri, 18 Feb 2022 07:43:58 -0800 (PST) Received: by mail-ua1-x92b.google.com with SMTP id 102so2288151uag.6 for ; Fri, 18 Feb 2022 07:43:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZlNKOu+PC57cWSc9B8bT89/4L+VjMA7vIqhUEFRfco4=; b=A5pZd2CbfalKIrQ8Zz9VDALtD8d0Ppxdsa3oKI8TWnym/Jq71tJqV/zLFLqHw1TCfL Jnb30zQNSzXZ520Ak7J0JDNC/yND2NIuEY+vYEYpzNHBAkEi5q7SGZ8gyd9SsseC3DUY 4+/oN3cZhkbPvFl9P/+iAQVAV5+ACUKiF29y3QzCzJL1zk+CKI/GCDooNzXIfjuuNg0A eNm7aEjnd2GPMbwdT0IA4nFSMUGbecguG8fpB25GkrFoZFY0VAbtO6MNcK9k4M/7zksj tPQmGRwkwaxPerUdlxUj43PPiQfW7/crp2j6XSzi261L87ckszK0zb24UvQVZAc0WeD8 sYSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZlNKOu+PC57cWSc9B8bT89/4L+VjMA7vIqhUEFRfco4=; b=bBZUS5Cq0DBHR3zZPSauf/zS7/giIc/dwuVSKUlA3Gtg4rumwdQQyPGqCTitkIWnba NzZU1gHBTI8V/WaMR8aFUGCBDaSYtpcnRqYfY/yWCbbKil7AiBO/swwT2YXO8edufaci y+m4M4nQzrXNQOj3xdUU4gZBxXDlDzRzu6A6kT4uP5jUUvM1Zvw0y+qSlMLiFDSNm8Z2 naLwozoKWfbCqp1gXOYwGVT3N+B/Bi83h9Ps8Qoo1/3v5Blo7diJTzAHKrs+hHeEYDTB 26R/wM8ag5HJMXf+Iggk5bczHDQvuss/PBRGOg62ch/66WJXuaYqBOzOBgDS19kXk4jF L5ew== X-Gm-Message-State: AOAM530N4rQe8zKuAubCWS1Nufy22rkCi6zpzJwGv/B9sIq2HwT8iJQW nV0fuJi4B/4iI/iA5zx4aAZgu63kemc= X-Received: by 2002:ab0:13ad:0:b0:340:22f4:574d with SMTP id m42-20020ab013ad000000b0034022f4574dmr3188642uae.102.1645199037571; Fri, 18 Feb 2022 07:43:57 -0800 (PST) Received: from mail-vk1-f181.google.com (mail-vk1-f181.google.com. [209.85.221.181]) by smtp.gmail.com with ESMTPSA id n8sm1437313vsl.8.2022.02.18.07.43.56 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Feb 2022 07:43:56 -0800 (PST) Received: by mail-vk1-f181.google.com with SMTP id j17so4701969vkd.12 for ; Fri, 18 Feb 2022 07:43:56 -0800 (PST) X-Received: by 2002:a05:6122:788:b0:331:2063:3645 with SMTP id k8-20020a056122078800b0033120633645mr3858580vkr.10.1645199036123; Fri, 18 Feb 2022 07:43:56 -0800 (PST) MIME-Version: 1.0 References: <20220208181510.787069-1-andrew@daynix.com> <20220208181510.787069-3-andrew@daynix.com> In-Reply-To: From: Willem de Bruijn Date: Fri, 18 Feb 2022 08:43:20 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 2/4] drivers/net/virtio_net: Added basic RSS support. To: Andrew Melnichenko Cc: Willem de Bruijn , Network Development , virtualization , LKML , "David S. Miller" , Jakub Kicinski , Jason Wang , "Michael S. Tsirkin" , Yan Vugenfirer , Yuri Benditovich Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 17, 2022 at 12:05 PM Andrew Melnichenko wrote: > > Hi all, > > On Mon, Feb 14, 2022 at 12:09 AM Willem de Bruijn > wrote: > > > > > > > @@ -3113,13 +3270,14 @@ static int virtnet_probe(struct virtio_device *vdev) > > > > > u16 max_queue_pairs; > > > > > int mtu; > > > > > > > > > > - /* Find if host supports multiqueue virtio_net device */ > > > > > - err = virtio_cread_feature(vdev, VIRTIO_NET_F_MQ, > > > > > - struct virtio_net_config, > > > > > - max_virtqueue_pairs, &max_queue_pairs); > > > > > + /* Find if host supports multiqueue/rss virtio_net device */ > > > > > + max_queue_pairs = 1; > > > > > + if (virtio_has_feature(vdev, VIRTIO_NET_F_MQ) || virtio_has_feature(vdev, VIRTIO_NET_F_RSS)) > > > > > + max_queue_pairs = > > > > > + virtio_cread16(vdev, offsetof(struct virtio_net_config, max_virtqueue_pairs)); > > > > > > > > Instead of testing either feature and treating them as somewhat equal, > > > > shouldn't RSS be dependent on MQ? > > > > > > No, RSS is dependent on CTRL_VQ. Technically RSS and MQ are similar features. > > > > RSS depends on having multiple queues. > > > > What would enabling VIRTIO_NET_F_RSS without VIRTIO_NET_F_MQ do? > > RSS would work. What does that mean, exactly? RSS is load balancing, does that not require multi-queue?