Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2141433pxb; Sun, 31 Oct 2021 08:40:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdZUizCi7Ycy11rxIud8DHOpYUxbMsoR9PDD5Jmdmg55fwUc8Be7lhHmToDHKZfvqkoJmg X-Received: by 2002:a17:907:2d06:: with SMTP id gs6mr30625833ejc.477.1635694833241; Sun, 31 Oct 2021 08:40:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635694833; cv=none; d=google.com; s=arc-20160816; b=r/whvt9xyu4bPsbVWpCfovRGN++xlMU85riL9IPqN/a4inPcGuqxtNZnxvZ2f9d5NA rULNt90XQuWat7hey7ZC0JfHTBTgWcxISlr/KgrwzIGYTGNJ4L6bYjdpsGKxAU2ZYfHG SQRQdPZyNjGFv1ukGMEWpwIzH1slf6zyNpkOxHdqx6G6L8RsaGDyiu7MQUkqlsheKWpA IIAQ8+llvqVtNVDZld1u7d6l0rdhExAgspUQ+9ug07e1HAZb3N0kUsojFXFp7/4TzXLe vAxR8bXKtqIJmIH5+rtCPR70gNy6obnZSpr5oSm3b0TRSQsGgzY6Bz3W2cA3Vy/okM6S z3Sw== 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=/DMyohOWdXPyhg1wQ6EXkgg16+mKidkiCYKLquXwk3o=; b=Nxx5/N78H5BCsWEhvyOBI4mzyLOtU+W7uAIvrDO5AiivuMKYHWDsBrrtwxv8uo9Gbt gTMDY4+hDMZyH1uQj0V3Wqf0FKXFV1jJmYUqvkLzbam30mjQAm7q+uPaoxsQ7+LEsHou XAfDJFkJNxwK82rHiwR2SXLM0ZFEGMIGOBrd2Dv4/ipZ2Bdkb/8b3qTUdWV9sIdt2yfy PHZpkIQrFOhPyi/ppVvFbEWY8SmitMyI+cJIDjTGTlvytLI8yUng2v+FbssMDeGweCFA R5X8jcbJmakwL3zHycimZFpl9vmdxyWbGnK93BcMSEAZIxObA9BWSS253s7wTu9XBL90 VIfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=iOSJ3zT4; 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 gn6si4089721ejc.196.2021.10.31.08.40.09; Sun, 31 Oct 2021 08:40:33 -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=20210112 header.b=iOSJ3zT4; 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 S229898AbhJaPlB (ORCPT + 99 others); Sun, 31 Oct 2021 11:41:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229734AbhJaPlB (ORCPT ); Sun, 31 Oct 2021 11:41:01 -0400 Received: from mail-ua1-x92a.google.com (mail-ua1-x92a.google.com [IPv6:2607:f8b0:4864:20::92a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41244C061714 for ; Sun, 31 Oct 2021 08:38:29 -0700 (PDT) Received: by mail-ua1-x92a.google.com with SMTP id b17so17459031uas.0 for ; Sun, 31 Oct 2021 08:38:29 -0700 (PDT) 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=/DMyohOWdXPyhg1wQ6EXkgg16+mKidkiCYKLquXwk3o=; b=iOSJ3zT4CzRoNn5efFa/M784mUmjitd1sxBCleHNmGY1VnNmg8MRCjTel14ollf2+c aJE14EtUsvImlxR/QznTnF2DxiQkaz2TEwlD/WHF2uP69spnzHiJGPv7NGbqTsjktQDT 0U4Rm3t1t56p9fx5UM94ifmlhvnewPasV3fbi0iiWklDQ4XHzlnOHpiKlXYeb7vt0571 6LkGX2b/AxV49vp5TBxp8DJZa8fwLxvQIgfyTSNl11PESGgAnDUGUiaynA9vF9ytcLKH 2qTK5XvcC7u185IyKcMEJceJPmxppBTZcRUSnk8yEQKPfLrrmHzgWgASlD45wvOjoQJ/ L1hQ== 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=/DMyohOWdXPyhg1wQ6EXkgg16+mKidkiCYKLquXwk3o=; b=dimqAAF5B3TgWtzkvpTYNLZTIRl7Eyrwq7ucFC9SFO9XbqtqVFht2+b/IUorpovBMi 0FyO+VoQ37siFHApgue11wmYBrBJUZZc52YIqvBdWVemXbdDIzzJ1mGdZPkL+pL5VjvA iJlzw/UaiLDbH57EqnIqE4d19nsQSAgB8ogyGUnLs404ODVEcwtrEfM+sXOLa6GTJihr 7Y3LQOftdFNFqtYhEb4zKD7omqN5CN/a9f5RTkNZl5GDxctbKfovtWg+rbnyTlgXVWqN mS01kKS5FRCZleRcnEqKX15PNZt4Feqzd/iFbKQTolqSC/tE3JmbiRdekQIhKfD66Tqr 9r0A== X-Gm-Message-State: AOAM533Wdjl+sP2s+xr2CJRqWyaMR3vYzyGAc1WXyH5Zw9s8SFNiNYCU OuUf7/ZOlMbOQUm95UN4C8EkPyTNVDY= X-Received: by 2002:a67:f50a:: with SMTP id u10mr3929655vsn.56.1635694708265; Sun, 31 Oct 2021 08:38:28 -0700 (PDT) Received: from mail-ua1-f46.google.com (mail-ua1-f46.google.com. [209.85.222.46]) by smtp.gmail.com with ESMTPSA id t76sm1870367vkt.0.2021.10.31.08.38.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 31 Oct 2021 08:38:27 -0700 (PDT) Received: by mail-ua1-f46.google.com with SMTP id x3so27523095uar.13 for ; Sun, 31 Oct 2021 08:38:27 -0700 (PDT) X-Received: by 2002:a67:facc:: with SMTP id g12mr2351426vsq.22.1635694707053; Sun, 31 Oct 2021 08:38:27 -0700 (PDT) MIME-Version: 1.0 References: <20211031045959.143001-1-andrew@daynix.com> <20211031045959.143001-4-andrew@daynix.com> In-Reply-To: From: Willem de Bruijn Date: Sun, 31 Oct 2021 11:37:51 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH 3/4] drivers/net/virtio_net: Added basic RSS support. To: Willem de Bruijn Cc: Andrew Melnychenko , mst@redhat.com, jasowang@redhat.com, davem@davemloft.net, kuba@kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, yuri.benditovich@daynix.com, yan@daynix.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > + hdr_hash = (struct virtio_net_hdr_v1_hash *)(hdr); > > + > > + switch (hdr_hash->hash_report) { > > + case VIRTIO_NET_HASH_REPORT_TCPv4: > > + case VIRTIO_NET_HASH_REPORT_UDPv4: > > + case VIRTIO_NET_HASH_REPORT_TCPv6: > > + case VIRTIO_NET_HASH_REPORT_UDPv6: > > + case VIRTIO_NET_HASH_REPORT_TCPv6_EX: > > + case VIRTIO_NET_HASH_REPORT_UDPv6_EX: > > + rss_hash_type = PKT_HASH_TYPE_L4; > > + break; > > + case VIRTIO_NET_HASH_REPORT_IPv4: > > + case VIRTIO_NET_HASH_REPORT_IPv6: > > + case VIRTIO_NET_HASH_REPORT_IPv6_EX: > > + rss_hash_type = PKT_HASH_TYPE_L3; > > + break; > > + case VIRTIO_NET_HASH_REPORT_NONE: > > + default: > > + rss_hash_type = PKT_HASH_TYPE_NONE; > > + } > > Is this detailed protocol typing necessary? Most devices only pass a bit is_l4. > > +static void virtnet_init_default_rss(struct virtnet_info *vi) > > +{ > > + u32 indir_val = 0; > > + int i = 0; > > + > > + vi->ctrl->rss.table_info.hash_types = vi->rss_hash_types_supported; > > Similar to above, and related to the next patch: is this very detailed > specification of supported hash types needed? When is this useful? It > is not customary to specify RSS to that degree. My bad. This is also implemented by bnxt, for one. I was unaware of this feature.