From patchwork Fri Jun 30 08:54:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hawkins Jiawei X-Patchwork-Id: 13297833 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 35532EB64DD for ; Fri, 30 Jun 2023 08:55:32 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qF9ty-0006xN-9Z; Fri, 30 Jun 2023 04:54:50 -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 1qF9tt-0006rm-Hh for qemu-devel@nongnu.org; Fri, 30 Jun 2023 04:54:45 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qF9ts-0007na-3k for qemu-devel@nongnu.org; Fri, 30 Jun 2023 04:54:45 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1b7db2e162cso8983685ad.1 for ; Fri, 30 Jun 2023 01:54:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688115282; x=1690707282; 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=ONeskzGL/DTHGYmmfSl7dJNnhbhkYuZqmU9JCoLRDgk=; b=r9R9h1SpBayP0FJczs+/IxSx1Ae+w9LFHnj+QVL1V3gMGorkasc6iX66q1DsUIq6+h gijXYJuXDz7XURUQu3RoExC0XWbCPOHc5IP3pj7AMvJ/YAy+jbEn+5NRr7/labeuvwIA R5XGuTvlPNTjr2rkC/tkzJzjin0Yg+3FXqQ8/UqxT4755dfsHJIbV8C1qeJCyftJNRGW xwnYsRSCyUjD3je9rUvEzryczeI5LXkypV63Ui+IUjJ7OyJPin2IUeQK2MBBlkmiFhhB msGsXlEE8FBeMv9bvXJiy7nBFXU5r0AFmoPkjHvJTyi+sgsuyUaz43HssRT8hWFmXsqJ jteA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688115282; x=1690707282; 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=ONeskzGL/DTHGYmmfSl7dJNnhbhkYuZqmU9JCoLRDgk=; b=jyJPcQojlMMosp+FZFl6sZ/sD/vjR9eo11YGnnTaS8VUNkGLBS4w11zidKP/OYGUPL W5BRDK2YUU16/b/YDyUfLQf1uApHgsCf2NvZOwYcXj6xlAYC93XVea3lP22peUuV8Oux jAjPUVa2lQkuS2EoS6ns+hqokWC+7NV1TC2n7LA6mJqkxKxMVWqeby3wkT87pwy8sXZf 5Q4piz4WnwMi2NbEFs246G7mcp7F1cWvJxPRlGJXVsC7l3u/GggSDIs4lhSHNkcWA6bI kkMqidXyMeK4/qt+QAoSWJUOTemfQ1TMiM2IGHvf6d42lq2476pO57rsmboWiDU4LOg+ 4cmw== X-Gm-Message-State: ABy/qLaZkfzPcBXuteiwQoO0buBQwtGgwtxVS6XYUU+TRyYIVE3o9eJe pWh2vsG9mE9/hUSFWo0doD4lJ7mvv+uetzSf X-Google-Smtp-Source: APBJJlGrnpXLXVRU5e6Vo+TD1Ee9CsYLW0njt8CEUDTqCApKgST8h6T2pWV6zVm9DXdxHWxAMiJYNA== X-Received: by 2002:a17:902:f54e:b0:1b8:5406:a34 with SMTP id h14-20020a170902f54e00b001b854060a34mr1637512plf.24.1688115282356; Fri, 30 Jun 2023 01:54:42 -0700 (PDT) Received: from localhost ([159.226.94.115]) by smtp.gmail.com with ESMTPSA id g4-20020a170902868400b001b53953f314sm10350594plo.23.2023.06.30.01.54.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jun 2023 01:54:42 -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 v2 1/2] vdpa: delete duplicated VIRTIO_NET_F_RSS in vdpa_feature_bits Date: Fri, 30 Jun 2023 16:54:35 +0800 Message-Id: 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::629; envelope-from=yin31149@gmail.com; helo=mail-pl1-x629.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, T_SCC_BODY_TEXT_LINE=-0.01 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org This entry was duplicated on referenced commit. Removing it. Fixes: 402378407dbd ("vhost-vdpa: multiqueue support") Signed-off-by: Hawkins Jiawei Reviewed-by: Philippe Mathieu-Daudé --- net/vhost-vdpa.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index e19ab063fa..0479988a79 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -74,7 +74,6 @@ const int vdpa_feature_bits[] = { VIRTIO_NET_F_CTRL_RX_EXTRA, VIRTIO_NET_F_CTRL_VLAN, VIRTIO_NET_F_CTRL_MAC_ADDR, - VIRTIO_NET_F_RSS, VIRTIO_NET_F_MQ, VIRTIO_NET_F_CTRL_VQ, VIRTIO_F_IOMMU_PLATFORM, From patchwork Fri Jun 30 08:54:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hawkins Jiawei X-Patchwork-Id: 13297834 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9A758EB64D7 for ; Fri, 30 Jun 2023 08:55:32 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qF9u6-00075Y-3U; Fri, 30 Jun 2023 04:54:59 -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 1qF9tw-0006xF-PR for qemu-devel@nongnu.org; Fri, 30 Jun 2023 04:54:50 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qF9tv-0007ns-6M for qemu-devel@nongnu.org; Fri, 30 Jun 2023 04:54:48 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-6726d5d92afso1001514b3a.1 for ; Fri, 30 Jun 2023 01:54:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688115286; x=1690707286; 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=G/vyj3NRZa1WG7OO1XkwYenz6SSrmEcJIYzbyS3qPZ8=; b=M3bKKw8CPFCcm6oY7dhCingKOUURtT7tfdpeGUL/yDiiPrGE+IVowQySG2ezfmVWvf wFDB9IE+aXetzlDKC5ONH4HRogAtuTjcLg5a88flQectF5gTL9xMYyWfQlbVbN6Fn5WX g/s69z/97ca1/yTDpdUZftwSUnvjHrWC0C58JNu4fSNoa9vkBFrGzLKv2VHQibH18Mhh eQxHGRtRghYuWYT+pItQcPFDTL9AkVPHyFCF1SZZl06avspwK5D/s2ndgBqtdOcSAvrM RDRF/6xcC0Lkau4gzlVfHWCMk6OdPydMD1f4hZnkIT0jB2vsyNQ4sd7yuHZsxoa6se+5 tq9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688115286; x=1690707286; 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=G/vyj3NRZa1WG7OO1XkwYenz6SSrmEcJIYzbyS3qPZ8=; b=LflR0OqVLtwkGw81Eq+ZQ1E5S1Noq7/S4UhVxW4LfnLPfms3h2n2eGPhMgVnjo68Vt YO/ABC8j1Bc8/5Kwhxe/IEOtxPGuidQE2vg81cQHzDAODwgZrdTUwC40EhM9+2/AbWdo j28QSHld3NgHfhX1z724TbA0NFREYAZ+NBmE7n01dGKuD7lxvKdpfFc41to5xbBzx7St cIG8wpPSwlDNYd6ljyRZyqGIpZkUREKSzmpVritpvKE1Qi1mcCA0XJP3IgRnWUs0QxIt fp7Nn0YyLPj1/e3mFMoghZDPWHNAGBVWANpyQ+qFtofhLJFg4Grip6lPVCroj0MADZV6 rBsQ== X-Gm-Message-State: AC+VfDzlqWumXZNBdHj+PAvYKHqTuyLxYbC0/LBMTamxjjEzrUIoL/aJ ekDz81VgCK/ja7woCwTNo+g= X-Google-Smtp-Source: ACHHUZ6Sf/wUd5eHPHVBOxxDwZNsGKikA+7YGv9x9zq4tm2cRvYnbBkZ3bTzS7yGo5sVwXqZhaR/Cg== X-Received: by 2002:a05:6a00:2d8d:b0:67f:6d90:8fb with SMTP id fb13-20020a056a002d8d00b0067f6d9008fbmr11061494pfb.13.1688115285650; Fri, 30 Jun 2023 01:54:45 -0700 (PDT) Received: from localhost ([159.226.94.115]) by smtp.gmail.com with ESMTPSA id g6-20020aa78746000000b006749c22d079sm8188303pfo.167.2023.06.30.01.54.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jun 2023 01:54:45 -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 v2 2/2] vdpa: order vdpa_feature_bits array Date: Fri, 30 Jun 2023 16:54:36 +0800 Message-Id: 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::435; envelope-from=yin31149@gmail.com; helo=mail-pf1-x435.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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, T_SCC_BODY_TEXT_LINE=-0.01, UPPERCASE_50_75=0.008 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org This patch reorganizes the vdpa_feature_bits array in ascending order based on its value to avoid future duplicates. Signed-off-by: Hawkins Jiawei Reviewed-by: Philippe Mathieu-Daudé --- v2: - resolve conflicts with the master branch v1: https://lists.nongnu.org/archive/html/qemu-devel/2023-06/msg01585.html net/vhost-vdpa.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 0479988a79..db7f1241af 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -50,15 +50,12 @@ typedef struct VhostVDPAState { bool started; } VhostVDPAState; +/* The array is sorted in ascending order based on its value */ const int vdpa_feature_bits[] = { - VIRTIO_F_NOTIFY_ON_EMPTY, - VIRTIO_RING_F_INDIRECT_DESC, - VIRTIO_RING_F_EVENT_IDX, - VIRTIO_F_ANY_LAYOUT, - VIRTIO_F_VERSION_1, VIRTIO_NET_F_CSUM, VIRTIO_NET_F_GUEST_CSUM, VIRTIO_NET_F_CTRL_GUEST_OFFLOADS, + VIRTIO_NET_F_MTU, VIRTIO_NET_F_GSO, VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6, @@ -69,19 +66,24 @@ const int vdpa_feature_bits[] = { VIRTIO_NET_F_HOST_ECN, VIRTIO_NET_F_HOST_UFO, VIRTIO_NET_F_MRG_RXBUF, - VIRTIO_NET_F_MTU, + VIRTIO_NET_F_STATUS, + VIRTIO_NET_F_CTRL_VQ, VIRTIO_NET_F_CTRL_RX, - VIRTIO_NET_F_CTRL_RX_EXTRA, VIRTIO_NET_F_CTRL_VLAN, - VIRTIO_NET_F_CTRL_MAC_ADDR, + VIRTIO_NET_F_CTRL_RX_EXTRA, VIRTIO_NET_F_MQ, - VIRTIO_NET_F_CTRL_VQ, + VIRTIO_NET_F_CTRL_MAC_ADDR, + VIRTIO_F_NOTIFY_ON_EMPTY, + VIRTIO_F_ANY_LAYOUT, + VIRTIO_RING_F_INDIRECT_DESC, + VIRTIO_RING_F_EVENT_IDX, + VIRTIO_F_VERSION_1, VIRTIO_F_IOMMU_PLATFORM, VIRTIO_F_RING_PACKED, VIRTIO_F_RING_RESET, - VIRTIO_NET_F_RSS, VIRTIO_NET_F_HASH_REPORT, - VIRTIO_NET_F_STATUS, + VIRTIO_NET_F_RSS, + /* VHOST_INVALID_FEATURE_BIT should always be the last entry */ VHOST_INVALID_FEATURE_BIT };