net/ena: v2.7.0 driver release
cover net/ena: v2.7.0 driver release
Hi,
this patchset contains 1 generic feature support (fast mbuf free), one improvement (simplification of the MTU verification), and 1 new device argument which enhances the ENA user's experience by allowing them to disable the LLQ (Low Latency Queue) mode.
Thanks,
Michal
Dawid Gorecki (2):
net/ena: add fast mbuf free support
net/ena: skip MTU verification
Michal Krawczyk (2):
net/ena: add an option to disable LLQ
net/ena: update version to 2.7.0
doc/guides/nics/ena.rst | 9 +++ doc/guides/nics/features/ena.ini | 1 + doc/guides/rel_notes/release_22_07.rst | 9 +++ drivers/net/ena/ena_ethdev.c | 105 ++++++++++++++++++------- drivers/net/ena/ena_ethdev.h | 1 + 5 files changed, 96 insertions(+), 29 deletions(-)
--
2.25.1
PATCH 1/4 net/ena: add fast mbuf free support
From: Dawid Gorecki <[email protected]>
Add support for RTE_ETH_TX_OFFLOAD_MBUF_FAST_FREE offload. It can be enabled if all the mbufs for a given queue belong to the same mempool and their reference count is equal to 1.
--- doc/guides/nics/features/ena.ini | 1 + doc/guides/rel_notes/release_22_07.rst | 7 ++++ drivers/net/ena/ena_ethdev.c | 49 ++++++++++++++++++++++++-- 3 files changed, 55 insertions(+), 2 deletions(-)
doc/guides/nics/features/ena.ini +1 -0
@@ -7,6 +7,7 @@ Link status = Y Link status event = Y Rx interrupt = Y +Fast mbuf free = Y Free Tx mbuf on demand = Y MTU update = Y Scattered Rx = Y
doc/guides/rel_notes/release_22_07.rst +7 -0
@@ -87,6 +87,13 @@ New Features Added an API which can get the device type of vDPA device. + +* **Updated Amazon ena driver.** + + The new driver version (v2.7.0) includes: + + * Added fast mbuf free feature support. + * **Updated Intel iavf driver.** * Added Tx QoS queue rate limitation support.
drivers/net/ena/ena_ethdev.c +47 -2
94 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH 2/4 net/ena: skip MTU verification
In reply to Michal KrawczykFrom: Dawid Gorecki <[email protected]>
Remove MTU verification from ena_mtu_set() and ena_start(). It is done by rte_ethdev already, so there is no reason to repeat it inside the ENA driver.
--- drivers/net/ena/ena_ethdev.c | 25 ------------------------- 1 file changed, 25 deletions(-)
drivers/net/ena/ena_ethdev.c +0 -25
@@ -987,20 +987,6 @@ static int ena_queue_start_all(struct rte_eth_dev *dev,return rc; } -static int ena_check_valid_conf (struct ena_adapter *adapter) -{ -uint32_t mtu = adapter->edev_data->mtu; - -if (mtu > adapter->max_mtu || mtu <ENA_MIN_MTU ) { -PMD_INIT_LOG (ERR , -"Unsupported MTU of %d. Max MTU: %d, min MTU: %d\n" , - mtu, adapter->max_mtu,ENA_MIN_MTU ); -return ENA_COM_UNSUPPORTED ; - } - -return 0 ; -} -static int ena_calc_io_queue_size (struct ena_calc_queue_size_ctx *ctx,bool use_large_llq_hdr)
@@ -1165,13 +1151,6 @@ static int ena_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) ena_dev = &adapter->ena_dev;ena_assert_msg (ena_dev !=NULL ,"Uninitialized device\n" ); -if (mtu > adapter->max_mtu || mtu <ENA_MIN_MTU ) { -PMD_DRV_LOG (ERR , -"Invalid MTU setting. New MTU: %d, max MTU: %d, min MTU: %d\n" , - mtu, adapter->max_mtu,ENA_MIN_MTU ); -return -EINVAL ; - } - rc =ENA_PROXY (adapter, ena_com_set_dev_mtu, ena_dev, mtu);if (rc)PMD_DRV_LOG (ERR ,"Could not set MTU: %d\n" , mtu);
@@ -1193,10 +1172,6 @@ static int ena_start(struct rte_eth_dev *dev)return -EPERM ; } - rc =ena_check_valid_conf (adapter); -if (rc) -return rc; - rc =ena_setup_rx_intr (dev);if (rc)return rc;
Signature · 1 line
2.25.1
PATCH 3/4 net/ena: add an option to disable LLQ
In reply to Michal KrawczykThe PMD attempts to enable the LLQ (Low Latency Queue) whenever it's possible. The LLQ requires the user to enable the Write Combining for the supported igb_uio/vfio-pci modules.
The vfio-pci module officially doesn't support the WC. Moreover, in some Linux distributions, it can be built into the kernel, so any modifications to the vfio-pci module require a full rebuild of the kernel. This can make the configuration process much harder and for some users, that are not interested in the great network performance for their setups, it may be redundant. These users requested to be able to turn off LLQ to avoid the hassle of such a setup.
It's generally not recommended to disable the LLQ, as it won't result in the performance improvement and on the 6th generation AWS instances the lack of LLQ can have a huge negative impact on hardware performance.
The device argument which controls the LLQ is called 'enable_llq` and by default, it's set to 1 (which means that the LLQ is enabled). Setting it to 0 disables the LLQ.
This commit also adds the explicit initialization of the devarg for the 'use_large_llq_hdr'. The PMD_REGISTER_PARAM_STRING() call for the ENA was updated with all the available devargs (including ENA_DEVARG_MISS_TXC_TO, which wasn't added previously).
--- doc/guides/nics/ena.rst | 9 ++++++++ doc/guides/rel_notes/release_22_07.rst | 2 ++ drivers/net/ena/ena_ethdev.c | 29 +++++++++++++++++++++++++- drivers/net/ena/ena_ethdev.h | 1 + 4 files changed, 40 insertions(+), 1 deletion(-)
doc/guides/nics/ena.rst +9 -0
@@ -96,6 +96,15 @@ Configuration information timer service. Setting this parameter to 0 disables this feature. Maximum allowed value is 60 seconds. + * **enable_llq** (default 1) + + Determines whenever the driver should use the LLQ (if it's available) or + not. + + **NOTE: On the 6th generation AWS instances disabling LLQ may lead to a + huge performance degradation. In general disabling LLQ is highly not + recommended!** + **ENA Configuration Parameters** * **Number of Queues**
doc/guides/rel_notes/release_22_07.rst +2 -0
@@ -93,6 +93,8 @@ New Features The new driver version (v2.7.0) includes: * Added fast mbuf free feature support. + * Added ``enable_llq`` device argument for controlling the PMD LLQ + (Low Latency Queue) mode. * **Updated Intel iavf driver.**
drivers/net/ena/ena_ethdev.c +28 -1
@@ -72,6 +72,12 @@ struct ena_stats {* considered as a missing. */ #define ENA_DEVARG_MISS_TXC_TO "miss_txc_to" +/* +* Controls whether LLQ should be used (if available). Enabled by default. +* NOTE: It's highly not recommended to disable the LLQ, as it may lead to a +* huge performance degradation on 6th generation AWS instances. +*/ +#define ENA_DEVARG_ENABLE_LLQ "enable_llq"/* * Each rte_memzone should have unique name.
@@ -1932,6 +1938,14 @@ ena_set_queues_placement_policy(struct ena_adapter *adapter,int rc;u32 llq_feature_mask; +if (!adapter->enable_llq) { +PMD_DRV_LOG (WARNING , +"NOTE: LLQ has been disabled as per user's request. " +"This may lead to a huge performance degradation!\n" ); + ena_dev->tx_mem_queue_type =ENA_ADMIN_PLACEMENT_POLICY_HOST ; +return 0 ; + } + llq_feature_mask =1 <<ENA_ADMIN_LLQ ;if (!(ena_dev->supported_features & llq_feature_mask)) { PMD_DRV_LOG(INFO,
@@ -2127,7 +2141,10 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)snprintf (adapter->name,ENA_NAME_MAX_LEN ,"ena_%d" , adapter->id_number); +/* Assign default devargs values */ adapter->missing_tx_completion_to =ENA_TX_TIMEOUT ; + adapter->enable_llq = true; + adapter->use_large_llq_hdr = false; rc =ena_parse_devargs (adapter, pci_dev->device.devargs);if (rc !=0 ) {
@@ -3478,6 +3495,8 @@ static int ena_process_bool_devarg(const char *key,/* Now, assign it to the proper adapter field. */ if (strcmp (key,ENA_DEVARG_LARGE_LLQ_HDR ) ==0 ) adapter->use_large_llq_hdr = bool_value; +else if (strcmp (key,ENA_DEVARG_ENABLE_LLQ ) ==0 ) + adapter->enable_llq = bool_value;return 0 ; }
@@ -3488,6 +3507,7 @@ static int ena_parse_devargs(struct ena_adapter *adapter,static const char *const allowed_args[] = {ENA_DEVARG_LARGE_LLQ_HDR ,ENA_DEVARG_MISS_TXC_TO , +ENA_DEVARG_ENABLE_LLQ ,NULL , };struct rte_kvargs *kvlist;
@@ -3509,6 +3529,10 @@ static int ena_parse_devargs(struct ena_adapter *adapter, goto exit; rc =rte_kvargs_process (kvlist,ENA_DEVARG_MISS_TXC_TO , ena_process_uint_devarg, adapter); +if (rc !=0 ) + goto exit; + rc =rte_kvargs_process (kvlist,ENA_DEVARG_ENABLE_LLQ , + ena_process_bool_devarg, adapter); exit:rte_kvargs_free (kvlist);
@@ -3727,7 +3751,10 @@ static struct rte_pci_driver rte_ena_pmd = {RTE_PMD_REGISTER_PCI (net_ena, rte_ena_pmd);RTE_PMD_REGISTER_PCI_TABLE (net_ena, pci_id_ena_map);RTE_PMD_REGISTER_KMOD_DEP (net_ena,"* igb_uio | uio_pci_generic | vfio-pci" ); -RTE_PMD_REGISTER_PARAM_STRING (net_ena,ENA_DEVARG_LARGE_LLQ_HDR "=<0|1>" ); +RTE_PMD_REGISTER_PARAM_STRING (net_ena, +ENA_DEVARG_LARGE_LLQ_HDR "=<0|1> " +ENA_DEVARG_ENABLE_LLQ "=<0|1> " +ENA_DEVARG_MISS_TXC_TO "=<uint>" );RTE_LOG_REGISTER_SUFFIX (ena_logtype_init, init,NOTICE );RTE_LOG_REGISTER_SUFFIX (ena_logtype_driver, driver,NOTICE );#ifdef RTE_ETHDEV_DEBUG_RX
drivers/net/ena/ena_ethdev.h +1 -0
@@ -303,6 +303,7 @@ struct ena_adapter {bool trigger_reset; +bool enable_llq;bool use_large_llq_hdr;uint32_t last_tx_comp_qid;
Signature · 1 line
2.25.1
PATCH 4/4 net/ena: update version to 2.7.0
In reply to Michal KrawczykThis release contains changes listed below.
- Fast mbuf free feature support.
- Device argument to disable the LLQ.
- Simplification of the MTU verification.
--- drivers/net/ena/ena_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ena/ena_ethdev.c +1 -1
@@ -21,7 +21,7 @@#include <ena_eth_io_defs.h> #define DRV_MODULE_VER_MAJOR 2 -#define DRV_MODULE_VER_MINOR 6 +#define DRV_MODULE_VER_MINOR 7#define DRV_MODULE_VER_SUBMINOR 0#define __MERGE_64B_H_L (h, l) (((uint64_t)h << 32) | l)
Signature · 1 line
2.25.1
Quoted 10 lines · Michal Krawczyk
Hi,
this patchset contains 1 generic feature support (fast mbuf free), one improvement (simplification of the MTU verification), and 1 new device argument which enhances the ENA user's experience by allowing them to disable the LLQ (Low Latency Queue) mode.
Thanks,
Michal
Quoted 8 lines
Dawid Gorecki (2):
net/ena: add fast mbuf free support
net/ena: skip MTU verificationMichal Krawczyk (2):
net/ena: add an option to disable LLQ
net/ena: update version to 2.7.0
Series applied to dpdk-next-net/main, thanks.