From patchwork Tue Aug 29 09:11:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hawkins Jiawei X-Patchwork-Id: 1827153 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=hBYHw+S/; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RZhWZ2dJsz1yfX for ; Tue, 29 Aug 2023 19:11:54 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaul9-0000FP-18; Tue, 29 Aug 2023 05:11:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qaul5-0000Ea-RG for qemu-devel@nongnu.org; Tue, 29 Aug 2023 05:11:35 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qaul0-0000Tz-Vj for qemu-devel@nongnu.org; Tue, 29 Aug 2023 05:11:35 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-68a440a8a20so3586464b3a.3 for ; Tue, 29 Aug 2023 02:11:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693300289; x=1693905089; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=32RrB/6DxRP4jj8jAR19Pzbha4yomQnSmFzk8B1lmWs=; b=hBYHw+S/ueDSwuXbvTE000YocUsUiXKBheDek7kTDvb0fKqGVgCnyfmhMAIaMo9+cI egsUqsb/JOW6VHssGJ6aZLuZ7MUfabOmGfFyO6stBjmay0zsgyVx0edfc4/tYUyGQmxN SkqhsXFYWiYCjJfDqF/vStfFvIqRUqIwhy5d8HQsFghnvp8JbS9+i0JhdaS08fQgXomJ QzbIy/I4TzS3Xv04cOi4SsJfm3g7qvVBQ+/0u2Gq/5FyACVR6Cg3oqq2BIylIKx8BCTg 1HbnSwo8KfKrFAoF4467gWcN3/3h0EZgDtC24AaJevJfQrqfxsaihXmYT50LwELj+C2W 0WwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693300289; x=1693905089; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=32RrB/6DxRP4jj8jAR19Pzbha4yomQnSmFzk8B1lmWs=; b=UymUmdqcI/lMszFuUyoBqxdBy6enKq2YbFW38BinITRHmmyMr2r13fRLNzGBA+Lrtj t5r/DCInHlRGGJ0YTlFB0nbjZ/q87/2+P/cL/2smtu5qbc/St7JsmOVPecN2QPJksDDK Bx/mSrY5E/LPZDiJwnRwn+fHZlWpG/tfcLk1WeLZYTOZuvOkr42/T+qZModHRfYRZL+q +p7k9D/1H20CBrd7dTTINbeypQHKB9uJ5UFdy5QKkayejxrR1AzFHGLAX/CV98FTNlD0 GxsIzvOLZSLYJAr5RynbB9b0KEct2pvnzOVYjjYeJgx36/RcLQIRctnnyuCW2h1Ify8I jBYw== X-Gm-Message-State: AOJu0YwVRvVw8cIajEeWwyswB3Gs1D/IDX4+UpiCZi5LiUJaycxrPNsT iezq8O5xULEXKaWc6PypMvc= X-Google-Smtp-Source: AGHT+IEUsPgDj6UWVxkKnrJcyVTErFrjexPEC8AZkP5ZHD9EV0cmSPJNjTEIzVBb+X+EMkrlfQPkOw== X-Received: by 2002:a05:6a20:430d:b0:14c:a2e1:65ec with SMTP id h13-20020a056a20430d00b0014ca2e165ecmr13908010pzk.38.1693300288433; Tue, 29 Aug 2023 02:11:28 -0700 (PDT) Received: from localhost ([183.242.254.166]) by smtp.gmail.com with ESMTPSA id c21-20020aa78c15000000b0068c023b6a80sm8315049pfd.148.2023.08.29.02.11.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Aug 2023 02:11:28 -0700 (PDT) From: Hawkins Jiawei To: jasowang@redhat.com, mst@redhat.com, eperezma@redhat.com Cc: qemu-devel@nongnu.org, yin31149@gmail.com, 18801353760@163.com Subject: [PATCH v3 1/3] vdpa: Add SetSteeringEBPF method for NetClientState Date: Tue, 29 Aug 2023 17:11:15 +0800 Message-Id: <30509e3c3b07bcadd95d5932aeb16820cb022902.1693299194.git.yin31149@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=yin31149@gmail.com; helo=mail-pf1-x431.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org At present, to enable the VIRTIO_NET_F_RSS feature, eBPF must be loaded for the vhost backend. Given that vhost-vdpa is one of the vhost backend, we need to implement the SetSteeringEBPF method to support RSS for vhost-vdpa, even if vhost-vdpa calculates the rss hash in the hardware device instead of in the kernel by eBPF. Although this requires QEMU to be compiled with `--enable-bpf` configuration even if the vdpa device does not use eBPF to calculate the rss hash, this can avoid adding the specific conditional statements for vDPA case to enable the VIRTIO_NET_F_RSS feature, which reduces code maintainbility. Suggested-by: Eugenio PĂ©rez Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index b29f84f54c..11f89e7032 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -238,6 +238,12 @@ static void vhost_vdpa_cleanup(NetClientState *nc) } } +/** Dummy SetSteeringEBPF to support RSS for vhost-vdpa backend */ +static bool vhost_vdpa_set_steering_ebpf(NetClientState *nc, int prog_fd) +{ + return true; +} + static bool vhost_vdpa_has_vnet_hdr(NetClientState *nc) { assert(nc->info->type == NET_CLIENT_DRIVER_VHOST_VDPA); @@ -400,6 +406,7 @@ static NetClientInfo net_vhost_vdpa_info = { .has_vnet_hdr = vhost_vdpa_has_vnet_hdr, .has_ufo = vhost_vdpa_has_ufo, .check_peer_type = vhost_vdpa_check_peer_type, + .set_steering_ebpf = vhost_vdpa_set_steering_ebpf, }; static int64_t vhost_vdpa_get_vring_group(int device_fd, unsigned vq_index, @@ -1241,6 +1248,7 @@ static NetClientInfo net_vhost_vdpa_cvq_info = { .has_vnet_hdr = vhost_vdpa_has_vnet_hdr, .has_ufo = vhost_vdpa_has_ufo, .check_peer_type = vhost_vdpa_check_peer_type, + .set_steering_ebpf = vhost_vdpa_set_steering_ebpf, }; /* From patchwork Tue Aug 29 09:11:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hawkins Jiawei X-Patchwork-Id: 1827155 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=mxkPHqnz; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RZhX12yCXz1yfX for ; Tue, 29 Aug 2023 19:12:17 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaulA-0000GU-FR; Tue, 29 Aug 2023 05:11:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qaul9-0000FY-4S for qemu-devel@nongnu.org; Tue, 29 Aug 2023 05:11:39 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qaul5-0000VG-IX for qemu-devel@nongnu.org; Tue, 29 Aug 2023 05:11:37 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-68c3b9f85b7so1857938b3a.2 for ; Tue, 29 Aug 2023 02:11:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693300294; x=1693905094; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Znge5YwLhXoq+d+egkc4N829QLJubVUwOvAAm5uLYB0=; b=mxkPHqnzDeAaSzpmYTB70rOaYTa8io1SZV5QWmc2eUtwL5GJi5OYd12AFaTNy0pXAE 2HUT9jmJuwM2Udkh/OOsO3Q+Qwig5YteHlVs1vJXOjteUCzotr28vk4SaYI6Y8BRJrEm gWmcKpYo+IDViLCnsyu6i6RF9XvdQ6diLfVRwXoRhulUrl/3FN3DJK72V1RHgVUxTkpn YKMkAIYb0UfnZYuzhc/UuJtYqT77g3n3vW9DatuLwg2CJfoz7mCR4jtrLOiMVndv7bQs ZZO0dFxRGY5HXWSEsjxHgxK38nq+GK7B+K49SDusWpqc4a+44PfXC/Hrhcx+Bwv8u8EQ pp7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693300294; x=1693905094; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Znge5YwLhXoq+d+egkc4N829QLJubVUwOvAAm5uLYB0=; b=SdOdnQYRA3uwsE+IXk4MUQlKzHBDPar3UE8+1HQKpWwpVrsEj1qqgtZxCsehMxNL/k yQxCsJAmO3x6dDrXSB5GNRRms9zWt1iaJaQHdGcu+S9f8oK2aufcd8Yc/kGjuE/lW9qM NK+x4vjp5gmLpU6qHX41W0XVOY/2IGYNYB4GlJaUgw5my0yqpfLqbE0W4Pre7OHhbMgT lxIKBugMWybLPHIAErzQZcQIXoSV+UAZN3bI5SGDqSyRTNT7RSVdD2oetYL+IaHDyCJm CkWFlXyfNL7fFKC/yvDReE7YrPTmgmyR8uLz81Q1nIg1181F/ygWSjNFPl9mG2xXgOwv X/0g== X-Gm-Message-State: AOJu0Ywfp61D1mk3r2VjQqPMURa5newGU/4ojDVRfUzsK4aYDlvqChZZ yhAHUaO6E8Ro1gmioAu1nDs= X-Google-Smtp-Source: AGHT+IG7rprK0vCNCMMXcjYq/Ikg5frW1LKrOyzoXHyafK+ZhqZjlY0kJW4oxUMW+ZAgPzJU73T3nQ== X-Received: by 2002:a05:6a20:244f:b0:133:215e:7230 with SMTP id t15-20020a056a20244f00b00133215e7230mr25558338pzc.55.1693300293911; Tue, 29 Aug 2023 02:11:33 -0700 (PDT) Received: from localhost ([183.242.254.166]) by smtp.gmail.com with ESMTPSA id x19-20020a170902821300b001bbf7fd354csm8837672pln.213.2023.08.29.02.11.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Aug 2023 02:11:33 -0700 (PDT) From: Hawkins Jiawei To: jasowang@redhat.com, mst@redhat.com, eperezma@redhat.com Cc: qemu-devel@nongnu.org, yin31149@gmail.com, 18801353760@163.com Subject: [PATCH v3 2/3] vdpa: Restore receive-side scaling state Date: Tue, 29 Aug 2023 17:11:16 +0800 Message-Id: <47b17e160ba4e55b24790b7d73b22d2b437ebe3c.1693299194.git.yin31149@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=yin31149@gmail.com; helo=mail-pf1-x430.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This patch reuses vhost_vdpa_net_load_rss() with some refactorings to restore the receive-side scaling state at device's startup. Signed-off-by: Hawkins Jiawei --- v3: - resolve conflict with updated patch "Vhost-vdpa Shadow Virtqueue Hash calculation Support" v2: https://lore.kernel.org/all/af33aa80bc4ef0b2cec6c21b9448866c517fde80.1691926415.git.yin31149@gmail.com/ - Correct the feature usage to VIRTIO_NET_F_HASH_REPORT when loading the hash calculation state v1: https://lore.kernel.org/all/93d5d82f0a5df71df326830033e50358c8b6be7a.1691766252.git.yin31149@gmail.com/ net/vhost-vdpa.c | 54 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 11f89e7032..85547b7bbb 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -839,17 +839,28 @@ static int vhost_vdpa_net_load_rss(VhostVDPAState *s, const VirtIONet *n, cfg.hash_types = cpu_to_le32(n->rss_data.hash_types); - /* - * According to VirtIO standard, "Field reserved MUST contain zeroes. - * It is defined to make the structure to match the layout of - * virtio_net_rss_config structure, defined in 5.1.6.5.7.". - * - * Therefore, we need to zero the fields in struct virtio_net_rss_config, - * which corresponds the `reserved` field in - * struct virtio_net_hash_config. - */ - memset(&cfg.indirection_table_mask, 0, - sizeof_field(struct virtio_net_hash_config, reserved)); + if (do_rss) { + /* + * According to VirtIO standard, "Number of entries in indirection_table + * is (indirection_table_mask + 1)". + */ + cfg.indirection_table_mask = cpu_to_le16(n->rss_data.indirections_len - + 1); + cfg.unclassified_queue = cpu_to_le16(n->rss_data.default_queue); + cfg.max_tx_vq = cpu_to_le16(n->curr_queue_pairs); + } else { + /* + * According to VirtIO standard, "Field reserved MUST contain zeroes. + * It is defined to make the structure to match the layout of + * virtio_net_rss_config structure, defined in 5.1.6.5.7.". + * + * Therefore, we need to zero the fields in + * struct virtio_net_rss_config, which corresponds the `reserved` field + * in struct virtio_net_hash_config. + */ + memset(&cfg.indirection_table_mask, 0, + sizeof_field(struct virtio_net_hash_config, reserved)); + } table = g_malloc_n(n->rss_data.indirections_len, sizeof(n->rss_data.indirections_table[0])); @@ -886,6 +897,7 @@ static int vhost_vdpa_net_load_rss(VhostVDPAState *s, const VirtIONet *n, r = vhost_vdpa_net_load_cmd(s, out_cursor, in_cursor, VIRTIO_NET_CTRL_MQ, + do_rss ? VIRTIO_NET_CTRL_MQ_RSS_CONFIG : VIRTIO_NET_CTRL_MQ_HASH_CONFIG, data, ARRAY_SIZE(data)); if (unlikely(r < 0)) { @@ -920,13 +932,19 @@ static int vhost_vdpa_net_load_mq(VhostVDPAState *s, return r; } - if (!virtio_vdev_has_feature(&n->parent_obj, VIRTIO_NET_F_HASH_REPORT)) { - return 0; - } - - r = vhost_vdpa_net_load_rss(s, n, out_cursor, in_cursor, false); - if (unlikely(r < 0)) { - return r; + if (virtio_vdev_has_feature(&n->parent_obj, VIRTIO_NET_F_RSS)) { + /* load the receive-side scaling state */ + r = vhost_vdpa_net_load_rss(s, n, out_cursor, in_cursor, true); + if (unlikely(r < 0)) { + return r; + } + } else if (virtio_vdev_has_feature(&n->parent_obj, + VIRTIO_NET_F_HASH_REPORT)) { + /* load the hash calculation state */ + r = vhost_vdpa_net_load_rss(s, n, out_cursor, in_cursor, false); + if (unlikely(r < 0)) { + return r; + } } return 0; From patchwork Tue Aug 29 09:11:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hawkins Jiawei X-Patchwork-Id: 1827156 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=iC6qYZEn; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RZhX32Q9Mz1yfX for ; Tue, 29 Aug 2023 19:12:19 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qaulY-0000eG-RL; Tue, 29 Aug 2023 05:12:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qaulK-0000JV-Uv for qemu-devel@nongnu.org; Tue, 29 Aug 2023 05:11:55 -0400 Received: from mail-oi1-x233.google.com ([2607:f8b0:4864:20::233]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qaulA-0000WD-HJ for qemu-devel@nongnu.org; Tue, 29 Aug 2023 05:11:47 -0400 Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-3a9b41ffe11so2662202b6e.2 for ; Tue, 29 Aug 2023 02:11:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693300298; x=1693905098; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EdC04DKJRg0k0TroStlEZWBXnoc/i7QdqwqQNziTZT0=; b=iC6qYZEnSi+ojVW6gOk3Wow5cQB1qQ/BJUXcO3DPboksWeYDoZIyta64X67Rk192bF 6GQDxjU1nTqhEco7E/OWptSqVgWr4oX6FcRsSmgSzA2H2V4gYh5aTU0It1QT53Vu/JW5 ZCLW3V1mAm6ILhQZT+O1LA/AiUSAxvqhefqXdwZ7PeIKz6s8ULOJhJPSd0dmUk1Ix6ml ZWaQsAIyZA4rIqRVnUzyEQm8cpPx+SKlr2sktby/jkEVLTsPeaYJB+aBF26skbPCS82O Z7zWLIpBbduO5DHoX5W3mhd24PguYQXxm3UpVSHFEedfyoVTv3Fo/vGXwXBNZUdJ5dsx o0dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693300298; x=1693905098; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EdC04DKJRg0k0TroStlEZWBXnoc/i7QdqwqQNziTZT0=; b=LmceJVjI+ZIkawE1AFqi02M+9gjtPxrID2uesmiTaTEHXYyP19PLdDntElQTw2o9oX f5B7tMFRLUOJ42Bk5tzpIUTo+KyVCmsStjkJ0ujZWcnWx1wJ001+WXtbxkkm6FV2YkfL 6Dm6NADXvU7tUw674SgiolmAsCkwMWW1GhoqcPokvZibQ6lNMskqNuoV4eI680qqbA4g 9i4oPMQf7dmOn7QfKsO9S3pZafVFpWVkiU4NOMcO9BT6A7zGmh/E6RQ6HBhj5tf6Fj9e VlM7Tu0ohr7U2WN1jvwOXXyCdHLT5O8bX8ec03+RzsLI7vzgN6eK/dyUc12UVK8zoh12 nO3Q== X-Gm-Message-State: AOJu0YwUOmrQ+mY4BUnbGwZhy4pDux4QI9yzPNODmEA8BEEQiPRqspQ2 e1UPYyM5d51ZIdY6KG0GgEY= X-Google-Smtp-Source: AGHT+IHCu7Lxlq5PU5yHR9cQQ7MImnIiopTkEgJpHYEh5VnvEr2MMbzgmfmyOqKFu3Xdd6imIGEt5w== X-Received: by 2002:a05:6808:901:b0:3a1:e17a:b3fb with SMTP id w1-20020a056808090100b003a1e17ab3fbmr15557601oih.1.1693300298334; Tue, 29 Aug 2023 02:11:38 -0700 (PDT) Received: from localhost ([183.242.254.166]) by smtp.gmail.com with ESMTPSA id x5-20020a62fb05000000b0068bff979c2csm7989156pfm.82.2023.08.29.02.11.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Aug 2023 02:11:37 -0700 (PDT) From: Hawkins Jiawei To: jasowang@redhat.com, mst@redhat.com, eperezma@redhat.com Cc: qemu-devel@nongnu.org, yin31149@gmail.com, 18801353760@163.com Subject: [PATCH v3 3/3] vdpa: Allow VIRTIO_NET_F_RSS in SVQ Date: Tue, 29 Aug 2023 17:11:17 +0800 Message-Id: <2d2a378291bfac4144a0c0c473cf80415bb580b3.1693299194.git.yin31149@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::233; envelope-from=yin31149@gmail.com; helo=mail-oi1-x233.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Enable SVQ with VIRTIO_NET_F_RSS feature. Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 85547b7bbb..13da60aeda 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -119,6 +119,7 @@ static const uint64_t vdpa_svq_device_features = /* VHOST_F_LOG_ALL is exposed by SVQ */ BIT_ULL(VHOST_F_LOG_ALL) | BIT_ULL(VIRTIO_NET_F_HASH_REPORT) | + BIT_ULL(VIRTIO_NET_F_RSS) | BIT_ULL(VIRTIO_NET_F_RSC_EXT) | BIT_ULL(VIRTIO_NET_F_STANDBY) | BIT_ULL(VIRTIO_NET_F_SPEED_DUPLEX);