From patchwork Thu Feb 15 13:31:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: edwin.brossette@6wind.com X-Patchwork-Id: 136833 X-Patchwork-Delegate: bruce.richardson@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3109143B13; Thu, 15 Feb 2024 14:32:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B25BD40689; Thu, 15 Feb 2024 14:32:08 +0100 (CET) Received: from mail-lj1-f226.google.com (mail-lj1-f226.google.com [209.85.208.226]) by mails.dpdk.org (Postfix) with ESMTP id 9F36C402DF for ; Thu, 15 Feb 2024 14:32:06 +0100 (CET) Received: by mail-lj1-f226.google.com with SMTP id 38308e7fff4ca-2d208d0b282so8193681fa.0 for ; Thu, 15 Feb 2024 05:32:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; t=1708003926; x=1708608726; darn=dpdk.org; 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=9KouvX3S+EwFRrjILKKo+nwiDkLNdUEdi0JwG3yxlag=; b=RQofJKN2UjcvESBiiPSc2Vf4QnR3IAbogFC/AtaL/1Zko/V3W/c4lwjmShM3GJ8txd ZxYd+XewmayvfjgltpWww8mUgXohQ1mrJFC3Tcb2zLjOf6zQNcxCV4apuHCfQ9ZPTR8Z sy2+R0XqMLzK2HsrwUzeLI1htMxoNyTG+a3AJ5QIiAy+wvKc8ZntapfLgqfmDWAA76hB IXDYNcLfyG91rkhVKQLYyxcKHU+LedVVsZUMzw0yqMkeJmmhjbo5y79EoH34swUJ0EYh uccUIjbVnYF5N/D92s7O8K0oUmoQ8nsZFtleWRNg+Fo04x+e0xtYXqKHRhOL0bwI3vWT jxww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708003926; x=1708608726; 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=9KouvX3S+EwFRrjILKKo+nwiDkLNdUEdi0JwG3yxlag=; b=L7euuG2sVgBYM0lI5n2EutOZx6TBl4oZIV3usbw3jElJEsdtP84fGH7WKnPotTD8BP GCJyOAGbvmb0uQCLmby+w9xB2YZcVORTnY10JQupDHz812vIBQdh9eKw+PIrjMEBcdgX Rz6ta0a2VHHSldNoVWyA2IsmYop7hW47tdcpj13ZhsIHUGJ+m3hqfdbP83cpee+u9vjF 9M3jYD3TKDzbwdm1dUqw2O1GfB1qIYMUuzHvWX3/x3bcclNiyVUhrIJ7IsTCMM+Q+TmW NJDs/8mJdX88y9xP2e2ND4kH0pfXklHNV9Xmd6ofeZRYytLynsWjqm+5HtPlnqqGPz3z Uqpg== X-Gm-Message-State: AOJu0YxUbZ0nfVTiit6novkVSYWLbBA0dLc79xBnz2HVVei8bHNyfjcY WbuiT/DpVtJYgjl06SbdEK0vmEmj1Gr9YIANl4QYMk31HXwf7l4PAMxVasE9XInebA8GoVF5dOF abVKMbMCBEtevg7bFdeAD4e/z0grdFU0jv4PkDPiE X-Google-Smtp-Source: AGHT+IHhmaOBj/hYIMY/DyEHrIG6FtLcv3pa64sE9B1HZ2a2w53WUrQq03+I03BZT2FOAEw+s0Fx/FQyofy9 X-Received: by 2002:a2e:9198:0:b0:2d0:cfe6:4364 with SMTP id f24-20020a2e9198000000b002d0cfe64364mr1383450ljg.36.1708003925933; Thu, 15 Feb 2024 05:32:05 -0800 (PST) Received: from smtpservice.6wind.com ([185.13.181.2]) by smtp-relay.gmail.com with ESMTP id u14-20020a056000038e00b0033b1cbcab4dsm63577wrf.103.2024.02.15.05.32.05 for ; Thu, 15 Feb 2024 05:32:05 -0800 (PST) X-Relaying-Domain: 6wind.com Received: from dio.dev.6wind.com (dio.dev.6wind.com [10.17.1.86]) by smtpservice.6wind.com (Postfix) with ESMTP id AD6E7602FD; Thu, 15 Feb 2024 14:32:05 +0100 (CET) From: edwin.brossette@6wind.com To: dev@dpdk.org Cc: olivier.matz@6wind.com, Edwin Brossette Subject: [PATCH] net/ixgbevf: fix RSS init for x550 nics Date: Thu, 15 Feb 2024 14:31:45 +0100 Message-Id: <20240215133145.181302-1-edwin.brossette@6wind.com> X-Mailer: git-send-email 2.35.0.4.g44a5d4affccf In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Edwin Brossette Different Intel nics with the igxbe pmd do not handle RSS in the same way when working with virtualization. While some nics like Intel 82599ES only have a single RSS table in the device and leave all rss features to be handled by the pf, some other nics like x550 let the vf handle RSS features. This can lead to different behavior when rss is enabled depending on the model of nic used. In particular, it occurred that ixgbevf_dev_rx_init() do not initiate rss parameters at device init, even if the multi-queue mode option is set in the device configuration (ie: RTE_ETH_MQ_RX_RSS is set). Note that this issue went unnoticed until now, probably because some nics do not really have support for RSS in virtualization mode. Thus, depending on the nic used, we can we find ourselves in a situation where RSS is not configured despite being enabled. This will cause serious performance issues because the RSS reta will be fully zeroed, causing all packets to go only in the first queue and leaving all the others empty. By looking at ixgbe_reta_size_get(), we can see that only X550 nic models have a non zero reta size set in vf mode. Thus add a call to ixgbe_rss_configure() for these cards in ixgbevf_dev_rx_init() if the option to enable RSS is set. Fixes: f4d1598ee14f ("ixgbevf: support RSS config on x550") Signed-off-by: Edwin Brossette Acked-by: Vladimir Medvedkin --- drivers/net/ixgbe/ixgbe_rxtx.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index 537aa2f68de8..0aa968f7e258 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -5873,6 +5873,25 @@ ixgbevf_dev_rx_init(struct rte_eth_dev *dev) IXGBE_PSRTYPE_RQPL_SHIFT; IXGBE_WRITE_REG(hw, IXGBE_VFPSRTYPE, psrtype); + /* Initialize the rss for x550_vf cards if enabled */ + switch (hw->mac.type) { + case ixgbe_mac_X550_vf: + case ixgbe_mac_X550EM_x_vf: + case ixgbe_mac_X550EM_a_vf: + switch (dev->data->dev_conf.rxmode.mq_mode) { + case RTE_ETH_MQ_RX_RSS: + case RTE_ETH_MQ_RX_DCB_RSS: + case RTE_ETH_MQ_RX_VMDQ_RSS: + ixgbe_rss_configure(dev); + break; + default: + break; + } + break; + default: + break; + } + ixgbe_set_rx_function(dev); return 0;