From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 548B1A0C45 for ; Fri, 3 Dec 2021 16:09:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 490D04270F; Fri, 3 Dec 2021 16:09:23 +0100 (CET) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mails.dpdk.org (Postfix) with ESMTP id 8A2304270F for ; Fri, 3 Dec 2021 16:09:22 +0100 (CET) Received: by mail-wm1-f48.google.com with SMTP id i8-20020a7bc948000000b0030db7b70b6bso5119354wml.1 for ; Fri, 03 Dec 2021 07:09:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7/sd/8Xf+6lCWwI0LR8fwBn6VONbdMXGR0D/KQtG67Y=; b=eWzEX3Vf+0KHEiIHNfiymhyoDvoSVgTKaTT1YHSMQUqVTF7Wf7N7w2zz2gW9+I5O8Q M2SnHtT9IhgWyK1AkzfFaIvRDpNmNTBUpIUpKDaYA+OAsGApSW5aIrpbCH9ACLLN/hwM vhhm+k4bMLdvSIlPZ+00lvWIY4P9xgxrULZ04g1Vss3o9I72lWF9OEF7c7TZbBX7x6xM TKDRjRykpdwcpxNDgC8FjD4vGXU5u7XrwslMOdDvo9VpDavmpy90ib/fHJwCVrojIQ7R bZRr6DyJyNF2/X0t0FOzcFqSBmNLhNOj5wMYj1yXv9vrbumLoGE3qcT8pRHbmrquw1wP GFzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7/sd/8Xf+6lCWwI0LR8fwBn6VONbdMXGR0D/KQtG67Y=; b=A8rwUwuMvg6it0xKgAYJXma4DbwZfLXAOVva9wfvyc709ONyXXG95Zccj5K9641N6+ RpxnE5A24k+79IKcGfroHoxBm/CuFpW/8PTJBYUyQlZOEVEmnG/gFGv9KJR7kqiOHNTD S8HFWZnS5mQubTG3DblJU9A6J8DcxfZP3d/uZ9PzDBbqh/OBq6fyTYh95iOdrYFH4Sp4 XqizQI/tFkEOyir6fS+BgZTjestk7hFnPncrYh/udvZ8G8RgRI0KrWu1do6wOhpP8yTX 2yKP/BgV30IUS0C0RA+O+xyeqRgXdPI2Ona9DD4AsMIFP9Alj6pC4HVEQPViqJXlOCzz p9mA== X-Gm-Message-State: AOAM531N2Nyr9K32JX6YNPLGt8xr4xtD+JTQevyOsVcleI6whT8fx42M D8bKHgrgQgXhjlmaLTsbX5iAcq548EkNjw== X-Google-Smtp-Source: ABdhPJwd3Z0SSIb5zMXXpmMMvmRd0/OjxWp+1ghDX2g5yAvfzKVTm5XcXpe6xAsK071s9h6380quJQ== X-Received: by 2002:a7b:c8c8:: with SMTP id f8mr15835736wml.49.1638544161756; Fri, 03 Dec 2021 07:09:21 -0800 (PST) Received: from DESKTOP-U5LNN3J.localdomain (89-79-181-52.dynamic.chello.pl. [89.79.181.52]) by smtp.gmail.com with ESMTPSA id h2sm2777232wrz.23.2021.12.03.07.09.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Dec 2021 07:09:21 -0800 (PST) From: Michal Krawczyk To: stable@dpdk.org Cc: christian.ehrhardt@canonical.com, Michal Krawczyk , Igor Chauskin , Shai Brandes Subject: [PATCH 19.11 3/4] net/ena: advertise scattered Rx capability Date: Fri, 3 Dec 2021 16:08:58 +0100 Message-Id: <20211203150859.3933-3-mk@semihalf.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211203150859.3933-1-mk@semihalf.com> References: <20211203150859.3933-1-mk@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org [ upstream commit e2a6d08bef489215ebb77b1d3033875ada757cfa ] ENA can't be forced to always pass single descriptor for the Rx packet. Even if the passed buffer size is big enough to hold the data, we can't make assumption that the HW won't use extra descriptor because of internal optimizations. This assumption may be true, but only for some of the FW revisions, which may differ depending on the used AWS instance type. As the scattered Rx support on the Rx path already exists, the driver just needs to announce DEV_RX_OFFLOAD_SCATTER capability by turning on the rte_eth_dev_data::scattered_rx option. Fixes: 1173fca25af9 ("ena: add polling-mode driver") Cc: stable@dpdk.org Signed-off-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Shai Brandes --- drivers/net/ena/ena_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 5f15d55d4..62c15f3c9 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -1937,8 +1937,14 @@ static int ena_dev_configure(struct rte_eth_dev *dev) dev->data->dev_conf.txmode.offloads |= DEV_TX_OFFLOAD_MULTI_SEGS; + /* Scattered Rx cannot be turned off in the HW, so this capability must + * be forced. + */ + dev->data->scattered_rx = 1; + adapter->tx_selected_offloads = dev->data->dev_conf.txmode.offloads; adapter->rx_selected_offloads = dev->data->dev_conf.rxmode.offloads; + return 0; } @@ -1985,6 +1991,7 @@ static uint64_t ena_get_rx_port_offloads(struct ena_adapter *adapter) port_offloads |= DEV_RX_OFFLOAD_RSS_HASH; port_offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME; + port_offloads |= DEV_RX_OFFLOAD_SCATTER; return port_offloads; } -- 2.25.1