From: Murphy Yang Date: Mon, 29 Mar 2021 08:28:45 +0000 (+0000) Subject: net/ixgbe: fix RSS RETA being reset after port start X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8b628c22b38f7a81b6cba677aaabd140d8583ae5;p=dpdk.git net/ixgbe: fix RSS RETA being reset after port start If one calls ‘rte_eth_dev_rss_reta_update’ with ixgbe before starting the device (but after setting everything else), then RSS RETA configuration will be zero after starting the device. This patch gives a notification if the port not started. Bugzilla ID: 664 Fixes: 249358424eab ("ixgbe: RSS RETA configuration") Cc: stable@dpdk.org Signed-off-by: Murphy Yang Acked-by: Haiyue Wang --- diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index be9c438c10..31faff066c 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -5013,11 +5013,19 @@ ixgbe_dev_rss_reta_update(struct rte_eth_dev *dev, uint32_t reta, r; uint16_t idx, shift; struct ixgbe_adapter *adapter = dev->data->dev_private; + struct rte_eth_dev_data *dev_data = dev->data; struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); uint32_t reta_reg; PMD_INIT_FUNC_TRACE(); + if (!dev_data->dev_started) { + PMD_DRV_LOG(ERR, + "port %d must be started before rss reta update", + dev_data->port_id); + return -EIO; + } + if (!ixgbe_rss_update_sp(hw->mac.type)) { PMD_DRV_LOG(ERR, "RSS reta update is not supported on this " "NIC.");