[dpdk-dev] [PATCH 0/3] bnxt PMD fixes

2023-01-31 Thread Kalesh A P
From: Kalesh AP This patchset contains bnxt PMD bug fixes. Please apply. Kalesh AP (1): net/bnxt: fix Tx queue stats after queue stop and start Mike Baucom (1): net/bnxt: fix Rx queue stats after queue stop and start Venkat Duvvuru (1): net/bnxt: do not corrupt RSS hash value in the mbuf

[dpdk-dev] [PATCH 1/3] net/bnxt: fix Tx queue stats after queue stop and start

2023-01-31 Thread Kalesh A P
From: Kalesh AP The Tx queue stats are being reported incorrectly due to a workaround for ring counters sometimes being reported as zero. When a queue is stopped and started, the ring counter is reset to zero. The workaround interprets the zero as incorrect, and sets the reported ring count as

[dpdk-dev] [PATCH 2/3] net/bnxt: fix Rx queue stats after queue stop and start

2023-01-31 Thread Kalesh A P
From: Mike Baucom The Rx queue stats are being reported incorrectly due to a workaround for ring counters sometimes being reported as zero. When a queue is stopped and started, the ring counter is reset to zero. The workaround interprets the zero as incorrect, and sets the reported ring count a

[dpdk-dev] [PATCH 3/3] net/bnxt: do not corrupt RSS hash value in the mbuf

2023-01-31 Thread Kalesh A P
From: Venkat Duvvuru By clearing mbuf->hash.fdir.id in the data path, the driver is corrupting the RSS hash value populated in the mbuf as they are defined as a union. This patch fixes the problem by removing the code that clears mbuf->hash.fdir.id. Fixes: 17b6c8386d73 ("net/bnxt: fix mark hand

[dpdk-dev] [PATCH 0/8] bnxt PMD fixes

2022-06-15 Thread Kalesh A P
From: Kalesh AP This patchset contains bug fixes in bnxt PMD. Ajit Khaparde (1): net/bnxt: fix switch domain allocation Damodharam Ammepalli (3): net/bnxt: allow Tx only or Rx only configs in PMD net/bnxt: disallow MTU change when device is started net/bnxt: cleanups in MTU set callback

[dpdk-dev] [PATCH 1/8] net/bnxt: remove assert for zero data len in Tx path

2022-06-15 Thread Kalesh A P
From: Somnath Kotur Currently the PMD tries to detect a potential 0 byte DMA by using RTE_VERIFY. But since RTE_VERIFY internally calls rte_panic() it is fatal to the application and some applications want to avoid that. So return an error from the bnxt xmit handler if such a bad pkt is encounter

[dpdk-dev] [PATCH 2/8] net/bnxt: fix switch domain allocation

2022-06-15 Thread Kalesh A P
From: Ajit Khaparde Allocate switch domain after the trusted VF capability is queried from the FW. Currently we are calling the function earlier. Since the switch domain is allocated only for PFs or trusted VF, the current location of code fails to allocate the domain during init. But during clea

[dpdk-dev] [PATCH 3/8] net/bnxt: reduce the verbosity of a log

2022-06-15 Thread Kalesh A P
From: Kalesh AP Broadcom HW drops packets when there are no descriptors available. It does not matter what flag the application specifies in "rx_drop_en" when configuring the Rx ring. Reduce the verbosity of the log to print the status of the "rx_drop_en" when configuring the Rx ring. Signed-of

[dpdk-dev] [PATCH 4/8] net/bnxt: allow Tx only or Rx only configs in PMD

2022-06-15 Thread Kalesh A P
From: Damodharam Ammepalli Currently, we fail the init/probe of pmd if eth_dev->data->nb_tx_queues or eth_dev->data->nb_rx_queues is 0. We are removing this check. Fixes: daef48efe5e5 ("net/bnxt: support set MTU") Cc: sta...@dpdk.org Signed-off-by: Damodharam Ammepalli Reviewed-by: Ajit Khapar

[dpdk-dev] [PATCH 5/8] net/bnxt: fix setting forced speed

2022-06-15 Thread Kalesh A P
From: Kalesh AP The "active_fec_signal_mode" in HWRM_PORT_PHY_QCFG response does not return correct value till the link is up. Driver cannot rely on active_fec_signal_mode while setting forced speed. While setting forced speed of 50G/100G/200G, check if PAM4 speeds are supported for the port fir

[dpdk-dev] [PATCH 6/8] net/bnxt: disallow MTU change when device is started

2022-06-15 Thread Kalesh A P
From: Damodharam Ammepalli With this patch, bnxt_mtu_set_op() will return an error code if the device has already started. The user application will have to take care to bring down device before invoking the mtu_set() Fixes: daef48efe5e5 ("net/bnxt: support set MTU") Cc: sta...@dpdk.org Signed-

[dpdk-dev] [PATCH 7/8] net/bnxt: cleanups in MTU set callback

2022-06-15 Thread Kalesh A P
From: Damodharam Ammepalli Minor cleanup in bnxt_mtu_set_op() to move pre-mature setting of jumbo flag post mtu check and remove a redundant mtu set operation from rxq vnic configs. Fixes: daef48efe5e5 ("net/bnxt: support set MTU") Cc: sta...@dpdk.org Signed-off-by: Damodharam Ammepalli Review

[dpdk-dev] [PATCH 8/8] net/bnxt: fix the check for autoneg enablement in the PHY FW

2022-06-15 Thread Kalesh A P
From: Somnath Kotur The current combination of checks to determine whether autoneg is enabled in the card is a bit convoluted and may become incorrect as well in the future as one of the fields being used - auto_link_speed might become deprecated. Switch to using the 'auto_mode' field obtained fr

[dpdk-dev] [PATCH 1/2] net/bnxt: remove unnecessary check

2022-09-27 Thread Kalesh A P
From: Kalesh AP We are not invoking rte_eth_switch_domain_free currently owing to an unnecessary check. This patch fixes that. Fixes: e2895305a5b5 ("net/bnxt: fix resource cleanup") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- driver

[dpdk-dev] [PATCH 2/2] net/bnxt: fix freeing of representor info memory

2022-09-27 Thread Kalesh A P
From: Kalesh AP Driver allocates "bp->rep_info" inside bnxt_init_rep_info() which is invoked from bnxt_rep_port_probe(). But the memory is freed inside bnxt_uninit_resources(), which is wrong. As a result, after error recovery bp->rep_info will be NULL. The memory should have freed inside bnxt_dr

[dpdk-dev] [PATCH 00/17] bnxt PMD fixes

2022-04-27 Thread Kalesh A P
From: Kalesh AP This patch set contains bug fixes in bnxt PMD. Please apply. Kalesh AP (12): net/bnxt: update HWRM structures net/bnxt: fix device capability reporting net/bnxt: fix to remove an unused macro net/bnxt: fix Rxq configure net/bnxt: fix support for tunnel stateless offload

[PATCH 02/17] net/bnxt: fix device capability reporting

2022-04-27 Thread Kalesh A P
From: Kalesh AP 1. Added two functions bnxt_get_tx_port_offloads() and bnxt_get_rx_port_offloads() to report the device tx/rx offload capabilities to the application. 2. This avoids few duplicate code in the driver and make VF-rep capability the same as VF. 3. This will help in selective

[PATCH 03/17] net/bnxt: fix to remove an unused macro

2022-04-27 Thread Kalesh A P
From: Kalesh AP BNXT_FLAG_UPDATE_HASH is redundant now, remove it. Fixes: 1ebb765090a6 ("net/bnxt: fix config RSS update") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt.h| 1 - drivers/net/bnxt/bnxt_ethde

[PATCH 04/17] net/bnxt: fix Rxq configure

2022-04-27 Thread Kalesh A P
From: Kalesh AP We are currently not handling RX/RSS modes correctly. After launching testpmd with multiple RXQs, if the user tries to set the number of RXQs to 1, driver is not updating the "hash_type" and "hash_mode" values of the VNICs. As a result, driver issues bnxt_vnic_rss_configure() unne

[PATCH 05/17] net/bnxt: fix support for tunnel stateless offloads

2022-04-27 Thread Kalesh A P
From: Kalesh AP The HW only supports tunnel header parsing globally for supported tunnel types. When a function uses one default VNIC to receive both the tunnel and non-tunnel packets, applying the same stateless offload operation to both tunnel and non-tunnel packets can cause problems in certai

[PATCH 06/17] net/bnxt: remove support for COUNT action

2022-04-27 Thread Kalesh A P
From: Somnath Kotur 'Count' action was never really implemented in the legacy/AFM model. But there was some place holder code, remove it so that the user will see a failure when a flow with 'count' action is being created. Signed-off-by: Somnath Kotur Reviewed-by: Kalesh AP --- drivers/net/bn

[PATCH 07/17] net/bnxt: fix RSS action support

2022-04-27 Thread Kalesh A P
From: Kalesh AP Specifying a subset of Rx queues created by the application in the "flow create" command is invalid. User must either specify all Rx queues created or no queues. Also removed a wrong comment as RSS action will not be supported if user or application specifies MARK or COUNT action

[PATCH 08/17] net/bnxt: fix to reconfigure the VNIC's default receive ring

2022-04-27 Thread Kalesh A P
From: Somnath Kotur When an Rx queue is stopped and restarted, as part of that workflow, for cards that have ring groups, we free and reallocate the ring group. This new ring group is not communicated to the VNIC though via HWRM_VNIC_CFG cmd. Fix to issue HWRM_VNIC_CFG cmd on all adapters now in

[PATCH 09/17] net/bnxt: add check for dupliate queue ids

2022-04-27 Thread Kalesh A P
From: Kalesh AP Currently driver does not have a check for duplicate queue ids. User must either specify all Rx queues created or no queues in the flow create command. Repeating the queue index is invalid. Also, moved the check for invalid queue to the beginning of the function. Fixes: 239695f7

[PATCH 10/17] net/bnxt: fix to handle queue stop during RSS flow create

2022-04-27 Thread Kalesh A P
From: Somnath Kotur The programming of the RSS table was not taking into account if any of the queues in the set were stopped prior to the flow creation, hence leading to a vnic RSS config cmd failure thrown by the FW. Fix by programming only the active queues in the RSS action queue set. Fixes:

[PATCH 11/17] net/bnxt: avoid unnecessary endianness conversion

2022-04-27 Thread Kalesh A P
From: Kalesh AP The "active_fec_signal_mode" in HWRM_PORT_PHY_QCFG response is uint8_t. So no need of endianness conversion while parsing response. Also, signal_mode is the first 4bits of "active_fec_signal_mode". Fixes: c23f9ded0391 ("net/bnxt: support 200G PAM4 link") Cc: sta...@dpdk.org Sign

[PATCH 12/17] net/bnxt: fix setting autoneg speed

2022-04-27 Thread Kalesh A P
From: Kalesh AP The "active_fec_signal_mode" in HWRM_PORT_PHY_QCFG response does not return correct value till the link is up. Driver cannot rely on active_fec_signal_mode while setting autoneg speed. While setting autoneg speed, driver is currently checking only "auto_link_speed_mask". Fixed to

[PATCH 14/17] net/bnxt: fix reporting link status when port is stopped

2022-04-27 Thread Kalesh A P
From: Kalesh AP Driver forces link down during port stop. But device is not obliged link down in certain scenarios, even when forced. In that case, subsequent link queries returns link as up. Fixed to return link status as down when port is stopped. Driver is already doing that for VF/NPAR/MH fun

[PATCH 13/17] net/bnxt: force PHY update on certain configurations

2022-04-27 Thread Kalesh A P
From: Kalesh AP Device is not obliged link down in certain scenarios, even when forced. When FW does not allow any user other than the BMC to shutdown the port, bnxt_get_hwrm_link_config() call always returns link up. Force phy update always in that case, else user configuration for speed/autoneg

[PATCH 15/17] net/bnxt: recheck FW readiness if FW is in reset process

2022-04-27 Thread Kalesh A P
From: Kalesh AP If Firmware is still in reset process and returns the error HWRM_ERR_CODE_HOT_RESET_PROGRESS, retry VER_GET command. We have to do it in bnxt_handle_if_change_status(). Fixes: 0b533591238f ("net/bnxt: inform firmware about IF state changes") Cc: sta...@dpdk.org Signed-off-by: Ka

[PATCH 16/17] net/bnxt: fix freeing of VNIC filters

2022-04-27 Thread Kalesh A P
From: Somnath Kotur In bnxt_free_all_filters(), all the filters attached to a vnic are removed. But each of these filters hold a backreference ptr to the vnic and they need to be reset to NULL now. Otherwise, during a normal testpmd quit, as part of dev_close_op(), first bnxt_free_all_filters() i

[PATCH 17/17] net/bnxt: don't wait for link up completion in dev start

2022-04-27 Thread Kalesh A P
From: Somnath Kotur Invoking bnxt_link_update_op() with wait_for_completion set would result in the driver waiting for 10s in case the port link is down to complete port initialization (dev_start_op()). Change it by not waiting for the completion when invoking it in dev_start_op() Signed-off-by:

[dpdk-dev] [PATCH 0/4] bnxt PMD patches

2021-07-12 Thread Kalesh A P
From: Kalesh AP Please apply. Kalesh AP (2): net/bnxt: update HSI structure net/bnxt: inform firmware about host MTU Somnath Kotur (2): net/bnxt: minor refactoring of async handling code net/bnxt: add handler for pause storm event drivers/net/bnxt/bnxt.h|5 + drive

[dpdk-dev] [PATCH 1/4] net/bnxt: update HSI structure

2021-07-12 Thread Kalesh A P
From: Kalesh AP - HWRM version updated to 1.10.2.44 - Added corresponding driver changes for the Admin MTU field name change. Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_hwrm.c | 14 +- drivers/net/bnxt/hsi_struct_def_d

[dpdk-dev] [PATCH 2/4] net/bnxt: inform firmware about host MTU

2021-07-12 Thread Kalesh A P
From: Kalesh AP This enables device firmware to respond appropriately to BMC queries about the driver's configured MTU. Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Lance Richardson --- drivers/net/bnxt/bnxt_ethdev.c | 3 +++ drivers/net/bnxt/bnxt_hwrm.c | 24 +

[dpdk-dev] [PATCH 3/4] net/bnxt: minor refactoring of async handling code

2021-07-12 Thread Kalesh A P
From: Somnath Kotur Store the async event completion data1 and data2 in separate variables at the start of the function before the switch case for the different events so they can be used by any of the event handlers. Signed-off-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- drivers/net/bnx

[dpdk-dev] [PATCH 4/4] net/bnxt: add handler for pause storm event

2021-07-12 Thread Kalesh A P
From: Somnath Kotur FW has been modified to send a new async event when it detects a pause storm. Register for this new event and log it upon receipt. Signed-off-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt.h | 5 + drivers/net/bnxt/bnxt_cpr.c | 19 +++

[dpdk-dev] [PATCH] net/bnxt: fix to clear cached value of stats in clear stats

2021-07-13 Thread Kalesh A P
From: Kalesh AP As part of the workaround put in the commit "219842b9990c", driver caches the last read stats values from the hardware. But this is not cleared during the clear stats operation. This results in showing up stale stats values while reading the stats after the clear operation. Fixes

[dpdk-dev] [PATCH] net/bnxt: remove workaround for default VNIC

2021-07-17 Thread Kalesh A P
From: Kalesh AP On older Wh+ firmware versions, HWRM_FUNC_QCFG returns zero for the parent default vnic. Commit "3fb93bc7c349" added a temporary Wh+-specific workaround in the PMD. This has been fixed in latest firmware and hence removing the workaround. Fixes: 3fb93bc7c349 ("net/bnxt: initializ

[dpdk-dev] [PATCH] net/bnxt: fix null pointer dereferences

2021-07-20 Thread Kalesh A P
From: Kalesh AP Coverity reports that pointer "cpr->cp_ring_struct" may be dereferenced with null value. This patch fixes this. Coverity issue: 372063 Fixes: 5ed30db87fa8 ("net/bnxt: fix missing barriers in completion handling") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Ajit Kh

[dpdk-dev] [PATCH 0/4] bnxt fixes

2022-01-20 Thread Kalesh A P
From: Kalesh AP Please apply. Ajit Khaparde (1): net/bnxt: fix VF resource allocation strategy Kalesh AP (3): net/bnxt: fix check for autoneg enablement net/bnxt: handle ring cleanup in case of error net/bnxt: fix to alloc the memzone per VNIC drivers/net/bnxt/bnxt_hwrm.c | 35 +++

[dpdk-dev] [PATCH 1/4] net/bnxt: fix check for autoneg enablement

2022-01-20 Thread Kalesh A P
From: Kalesh AP HWRM_PORT_PHY_QCFG_OUTPUT response indicates the autoneg speed mask supported by the FW. While enabling autoneg, driver should also check the FW advertised PAM4 speeds supported in auto mode which is set in the HWRM_PORT_PHY_QCFG_OUTPUT response. Fixes: c23f9ded0391 ("net/bnxt: s

[dpdk-dev] [PATCH 2/4] net/bnxt: handle ring cleanup in case of error

2022-01-20 Thread Kalesh A P
From: Kalesh AP In bnxt_alloc_mem(), after bnxt_alloc_async_ring_struct(), any of the functions failure causes an error: bnxt_hwrm_ring_free(): hwrm_ring_free nq failed. rc:1 Fix this by initializing ring->fw_ring_id to INVALID_HW_RING_ID in bnxt_alloc_async_ring_struct(). Fixes: bd0a14c99f65

[dpdk-dev] [PATCH 3/4] net/bnxt: fix to alloc the memzone per VNIC

2022-01-20 Thread Kalesh A P
From: Kalesh AP In case of Thor RSS table size is too big. This could result in memory allocation failure when the supported vnic count is high. Instead of allocating the memzone for all VNICs in one shot, allocate for each VNIC individually. Also, fixed to free the memzone in the uninit path.

[dpdk-dev] [PATCH 4/4] net/bnxt: fix VF resource allocation strategy

2022-01-20 Thread Kalesh A P
From: Ajit Khaparde 1. VFs need a notification queue to handle async messages. But the current logic does not reserve a notification queue leading to initialization failure in some cases. 2. With the current logic, DPDK PF driver reserves only one VNIC to the VFs leading to initialization failure

[dpdk-dev] [PATCH v7 0/4] ethdev: error recovery support

2022-01-28 Thread Kalesh A P
From: Kalesh AP The error recovery solution is a protocol implemented between firmware and bnxt PMD to recover from the fatal errors without a system reboot. There is an alarm thread which constantly monitors the health of the firmware and initiates a recovery when needed. There are two scenario

[dpdk-dev] [PATCH v7 1/4] ethdev: support device reset and recovery events

2022-01-28 Thread Kalesh A P
From: Kalesh AP Adding support for the device reset and recovery events in the rte_eth_event framework. FW error and FW reset conditions would be managed internally by the PMD without needing application intervention. In such cases, PMD would need reset/recovery events to notify application that

[dpdk-dev] [PATCH v7 2/4] app/testpmd: handle device recovery event

2022-01-28 Thread Kalesh A P
From: Kalesh AP Added code to handle error recovery events in testpmd. This is an indication from the PMD that it is undergoing an error recovery and recovered from the error condition. Signed-off-by: Kalesh AP Signed-off-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- app/test-pmd/paramete

[dpdk-dev] [PATCH v7 3/4] net/bnxt: notify applications about device reset/recovery

2022-01-28 Thread Kalesh A P
From: Kalesh AP When the driver receives RESET_NOTIFY async event from FW or detects an error condition, it should update the application that FW is going to reset. Once the driver recovers from the reset, update the reset recovery status to application as well. Signed-off-by: Kalesh AP Signed-

[dpdk-dev] [PATCH v7 4/4] doc: update release notes

2022-01-28 Thread Kalesh A P
From: Kalesh AP Updated release notes with new error recovery event support. Signed-off-by: Kalesh AP --- doc/guides/rel_notes/release_22_03.rst | 15 +++ 1 file changed, 15 insertions(+) diff --git a/doc/guides/rel_notes/release_22_03.rst b/doc/guides/rel_notes/release_22_03.rst

[dpdk-dev] [PATCH] net/bnxt: fix RSS behavior on Thor

2021-10-25 Thread Kalesh A P
From: Kalesh AP Move the Rx queue state update before bnxt_setup_one_vnic() is called. For Thor, rxq->rx_started and eth_dev->data->rx_queue_state[] needs to be set for all queues before bnxt_hwrm_vnic_cfg() or bnxt_vnic_rss_configure() are called. Fixes: 0105ea1296c9 ("net/bnxt: support runtime

[dpdk-dev] [PATCH] net/bnxt: fix to set flow error in case of failure

2021-10-27 Thread Kalesh A P
From: Kalesh AP With commit 239695f754cb ("net/bnxt: enhance RSS action support"), when bnxt_hwrm_vnic_rss_cfg() call fails, driver was not setting flow error using "rte_flow_error_set". Fixes: 239695f754cb ("net/bnxt: enhance RSS action support") Signed-off-by: Kalesh AP Reviewed-by: Ajit Kha

[dpdk-dev] [PATCH 1/2] net/bnxt: fix freeing aggregation rings

2021-10-29 Thread Kalesh A P
From: Kalesh AP During port stop, we clear "eth_dev->data->scattered_rx" at the beginning. As a result, in bnxt_free_hwrm_rx_ring() the check bnxt_need_agg_ring() returns false and we end up not freeing the Rx aggregation rings which results in resource leak in the FW. Fixes: 657c2a7f1dd4 ("net/

[dpdk-dev] [PATCH 2/2] net/bnxt: fix stat context allocation

2021-10-29 Thread Kalesh A P
From: Kalesh AP stat_ctx_alloc is called within the context of each rx/tx ring. i.e from bnxt_alloc_hwrm_rx_ring and bnxt_alloc_hwrm_tx_ring(). So, there is no need to invoke bnxt_alloc_all_hwrm_stat_ctxs() from bnxt_start_nic(). Fixes: 657c2a7f1dd4 ("net/bnxt: create aggregation rings when need

[dpdk-dev] [PATCH 0/9] bnxt PMD fixes

2021-05-31 Thread Kalesh A P
From: Kalesh AP Kalesh AP (9): net/bnxt: fix error message when VNIC prepare fails net/bnxt: set flow error when free filter is not available net/bnxt: remove unnecessary code net/bnxt: fix error handling when VNIC prepare fails net/bnxt: set flow error when tunnel redirection free fail

[dpdk-dev] [PATCH 1/9] net/bnxt: fix error message when VNIC prepare fails

2021-05-31 Thread Kalesh A P
From: Kalesh AP The bnxt_vnic_prep() can fail due to multiple reasons. But when bnxt_vnic_prep() fails, PMD is not returning the actual error/string to the application. Fix it by moving the "rte_flow_error_set" to bnxt_vnic_prep() to set the actual error code. Fixes: d24610f7bfda ("net/bnxt: al

[dpdk-dev] [PATCH 2/9] net/bnxt: set flow error when free filter is not available

2021-05-31 Thread Kalesh A P
From: Kalesh AP In bnxt_flow_validate(), when bnxt_get_unused_filter() fails due to no filter resources available, driver is not setting flow error using "rte_flow_error_set". Also, fixed the error code. Fixes: 5ef3b79fdfe6 ("net/bnxt: support flow filter ops") Cc: sta...@dpdk.org Signed-off-b

[dpdk-dev] [PATCH 3/9] net/bnxt: remove unnecessary code

2021-05-31 Thread Kalesh A P
From: Kalesh AP Also removed a log message which does not convey any useful information. Fixes: d24610f7bfda ("net/bnxt: allow flow creation when RSS is enabled") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Venkat Duvvuru Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_fl

[dpdk-dev] [PATCH 4/9] net/bnxt: fix error handling when VNIC prepare fails

2021-05-31 Thread Kalesh A P
From: Kalesh AP Resources should be freed on error conditions. i.e, VNIC and VNIC context created in HW and memory allocated in bnxt_vnic_grp_alloc() should be freed. Added a new function bnxt_vnic_destroy() to do the cleanup. This lightweight function can be used in flow destroy/flush path to a

[dpdk-dev] [PATCH 5/9] net/bnxt: set flow error when tunnel redirection free fails

2021-05-31 Thread Kalesh A P
From: Kalesh AP During flow destroy, when bnxt_hwrm_tunnel_redirect_free() fails, driver is not setting flow error using "rte_flow_error_set". Fixes: 11e5e19695c7 ("net/bnxt: support redirecting tunnel packets to VF") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Rev

[dpdk-dev] [PATCH 6/9] net/bnxt: use common function to destroy VNIC resource

2021-05-31 Thread Kalesh A P
From: Kalesh AP Use the function bnxt_vnic_destroy() to destroy VNIC resources and thereby eliminate few duplicate code. Fixes: 8d0a244b40b2 ("net/bnxt: cleanup VNIC after flow validate") Fixes: 49d0709b257f ("net/bnxt: delete and flush L2 filters cleanly") Cc: sta...@dpdk.org Signed-off-by: Ka

[dpdk-dev] [PATCH 7/9] net/bnxt: fix check for PTP support in FW

2021-05-31 Thread Kalesh A P
From: Kalesh AP On Thor, driver must use HWRM to access the timestamp information. Driver should not advertise PTP support to application if PTP information is not accessible via HWRM commands. Fixes: 6cbd89f9f3d8 ("net/bnxt: support PTP for Thor") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP

[dpdk-dev] [PATCH 8/9] net/bnxt: improve log message

2021-05-31 Thread Kalesh A P
From: Kalesh AP The existing log messge is missing a space. Modified it to a more meaningful log as part of this change. Fixes: 1bf01f5135f8 ("net/bnxt: prevent device access when device is in reset") Cc: sta...@dpdk.org Before this patch: bnxt_dev_init(): bnxtfound at mem D67E, node addr

[dpdk-dev] [PATCH 9/9] net/bnxt: remove unnecessary comment

2021-05-31 Thread Kalesh A P
From: Kalesh AP Fixes: 0a6d2a720078 ("net/bnxt: get device infos") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_ethdev.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c i

[dpdk-dev] [PATCH] net/bnxt: add support to dump SFP module info

2021-06-08 Thread Kalesh A P
From: Kalesh AP Add support to fetch the SFP EEPROM settings from the firmware. For SFP+ modules we will display 0xA0 page for status and 0xA2 page for other information. For QSFP modules we will show the 0xA0 page. Also identify the module types for QSFP28, QSFP, QSFP+ apart from the SFP module

[dpdk-dev] [PATCH 0/4] bnxt fixes

2021-06-08 Thread Kalesh A P
From: Kalesh AP This set contains few bnxt fixes and code cleanup changes. Kalesh AP (4): net/bnxt: cleanup code net/bnxt: fix typo in log message net/bnxt: fix enabling autoneg on Whitney+ net/bnxt: invoke device removal event on recovery failure drivers/net/bnxt/bnxt_ethdev.c | 11 ++

[dpdk-dev] [PATCH 1/4] net/bnxt: cleanup code

2021-06-08 Thread Kalesh A P
From: Kalesh AP This is a cleanup commit and no functional change. 1. use macros instead of hard coded values 2. remove unnecessary comments Fixes: 5cd0e2889c43 ("net/bnxt: support NIC Partitioning") Fixes: 2ba07b7dbd9d ("net/bnxt: set the hash key size") Cc: sta...@dpdk.org Signed-off-by: Kal

[dpdk-dev] [PATCH 2/4] net/bnxt: fix typo in log message

2021-06-08 Thread Kalesh A P
From: Kalesh AP In bnxt_rss_hash_update_op, check for valid RSS hashkey length is made against size HW_HASH_KEY_SIZE(40). But the failure log says "Invalid hashkey length, should be 16 bytes". Fixes: 91aee9711ee3 ("net/bnxt: validate RSS hash key length") Cc: sta...@dpdk.org Signed-off-by: Kale

[dpdk-dev] [PATCH 3/4] net/bnxt: fix enabling autoneg on Whitney+

2021-06-08 Thread Kalesh A P
From: Kalesh AP Driver should enable autoneg on a port if FW supports it. Because of a wrong check, driver is not enabling autoneg on a port after setting forced speed on Whitney+. Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP Re

[dpdk-dev] [PATCH 4/4] net/bnxt: invoke device removal event on recovery failure

2021-06-08 Thread Kalesh A P
From: Kalesh AP When the driver receives RESET_NOTIFY async event from FW or detects a FW fatal error condition, it tries to recover from the error. When the driver fails to recover from the error condition, fixed to send device removal event to the application. Fixes: df6cd7c1f73a ("net/bnxt: h

[dpdk-dev] [PATCH] net/bnxt: fix function driver register/unregister functions

2021-09-22 Thread Kalesh A P
From: Kalesh AP 1. Fix to use correct fields in the request structure of HWRM_FUNC_DRV_RGTR. 2. Remove the "flags" argument to bnxt_hwrm_func_driver_unregister() as it is not needed. Fixes: beb3087f5056 ("net/bnxt: add driver register/unregister") Cc: sta...@dpdk.org Signed-off-by: Kalesh

[dpdk-dev] [PATCH] net/bnxt: improve error recovery information messages

2021-09-23 Thread Kalesh A P
From: Kalesh AP The error recovery async event messages are often mistaken for errors. Improved the wording to clarify the meaning of these events. Also, take the first step towards more inclusive language. The references to master will be changed to primary. For example: "bnxt_is_master_func" wi

[dpdk-dev] [PATCH 00/18] bnxt PMD fixes

2022-01-04 Thread Kalesh A P
From: Kalesh AP This series contains bnxt PMD bug fixes. Please apply. Ajit Khaparde (4): net/bnxt: fix ring teardown net/bnxt: fix PAM4 mask setting net/bnxt: fix pointer access net/bnxt: check VF rep pointer before access Kalesh AP (13): net/bnxt: fix bnxt_dev_set_mc_addr_list_op

[dpdk-dev] [PATCH 01/18] net/bnxt: fix bnxt_dev_set_mc_addr_list_op

2022-01-04 Thread Kalesh A P
From: Kalesh AP Fix to cache the multicast mac addresses added to the port to the driver private structure memory. Use this cached mc list to program the FW. This fixes an issue where multicast packets reception is successful only if the multicast mac address of the packets is the first one in t

[dpdk-dev] [PATCH 02/18] net/bnxt: fix to restore mcast macs during reset recovery

2022-01-04 Thread Kalesh A P
From: Kalesh AP During reset recovery, driver is not restoring the multicast mac addresses. Added code to restore them during reset recovery. Fixes: b02f1573cd07 ("net/bnxt: restore MAC filters during reset recovery") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Rev

[dpdk-dev] [PATCH 03/18] net/bnxt: fix queue stop operation

2022-01-04 Thread Kalesh A P
From: Kalesh AP When there are no active Rx queues(i.e when all queues have been stopped), clear the RSS redirection table of the VNIC on Thor. Fixes: 9b63c6fd70e3 ("net/bnxt: support Rx/Tx queue start/stop") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by:

[dpdk-dev] [PATCH 04/18] net/bnxt: restore RSS configuration after reset recovery

2022-01-04 Thread Kalesh A P
From: Kalesh AP During reset recovery, driver is not restoring the VNIC rss hash key. It's generating a new random hash key which results in unexpected RSS behavior after recovery. Fixed this by storing the VNIC rss configuration to a local struct and then applying the cached value during the rec

[dpdk-dev] [PATCH 05/18] net/bnxt: fix restoring VLAN filtering after recovery

2022-01-04 Thread Kalesh A P
From: Kalesh AP During port start, driver calls bnxt_vlan_offload_set_op() to program VLAN Filter/VLAN Strip setting to the HW. This in turns add the vlan filters. This results in a failure when bnxt_restore_filters() invokes bnxt_restore_vlan_filters() during the recovery as the vlans are alrea

[dpdk-dev] [PATCH 06/18] net/bnxt: fix to cap max number of unicast MACs

2022-01-04 Thread Kalesh A P
From: Kalesh AP The Maximum number of receive mac addr is hard coded to 128 in the ethdev library(RTE_ETH_NUM_RECEIVE_MAC_ADDR). But the bnxt devices support more than 128 unicast MAC filters which could result in a segfault while user tries to add more than 128 unicast MAC addresses to the port.

[dpdk-dev] [PATCH 07/18] net/bnxt: set fast-path pointers only if recovery succeeds

2022-01-04 Thread Kalesh A P
From: Kalesh AP During reset recovery, fixed to set the fast-path pointers only if recovery succeeds. Fixes: 720b55ad278e ("net/bnxt: fix crash caused by error recovery") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/

[dpdk-dev] [PATCH 08/18] net/bnxt: improve recovery related log messages

2022-01-04 Thread Kalesh A P
From: Kalesh AP Make these messages more specific. Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_ethdev.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnx

[dpdk-dev] [PATCH 09/18] net/bnxt: add null check for mark table

2022-01-04 Thread Kalesh A P
From: Kalesh AP During the port start, driver ignores mark table allocation failure. This could cause a segfault due to NULL pointer dereference in bnxt_set_mark_in_mbuf(). Fix this by checking the pointer validity before accessing it. Fixes: b87abb2e55cb ("net/bnxt: support marking packet") Cc:

[dpdk-dev] [PATCH 10/18] net/bnxt: fix flow create when RSS is disabled

2022-01-04 Thread Kalesh A P
From: Kalesh AP This patch reverts the commit "5d47d06b2c83". Revert this commit as it caused a regression on legacy chips. On newer chips we use TruFlow based flow creation instead of HWRM based flow creation. Fixes: 5d47d06b2c83 ("net/bnxt: modify VNIC accounting") Cc: sta...@dpdk.org Signed-

[dpdk-dev] [PATCH 11/18] net/bnxt: get max supported multicast filters count

2022-01-04 Thread Kalesh A P
From: Kalesh AP The HWRM_FUNC_QCAPS response indicates the maximum number of multicast filters that can be supported by this function on the RX side. Fixed to use this value instead of the hard coded value 16. Fixes: d69851df12b2 ("net/bnxt: support multicast filter and set MAC addr") Cc: sta..

[dpdk-dev] [PATCH 12/18] net/bnxt: refactor bnxt_stop_rxtx() for reuse

2022-01-04 Thread Kalesh A P
From: Somnath Kotur By accepting rte_eth_dev as input, bnxt_stop_rxtx() can be used in multiple scenarios such as representor devices. Signed-off-by: Somnath Kotur Reviewed-by: Ajit Khaparde Reviewed-by: Kalesh AP --- drivers/net/bnxt/bnxt_cpr.c| 16 drivers/net/bnxt/bnx

[dpdk-dev] [PATCH 13/18] net/bnxt: fix handling of VF configuration changes

2022-01-04 Thread Kalesh A P
From: Kalesh AP When there is a change in the default VLAN of the VF, FW sends the VF_CFG_CHANGE async event to the driver. Upon receiving this async event, driver currently only queries the FW using HWRM_FUNC_QCFG. But this is not enough. Driver has to clean up the existing filter and recreate

[dpdk-dev] [PATCH 14/18] net/bnxt: fix ring teardown

2022-01-04 Thread Kalesh A P
From: Ajit Khaparde Check for valid bit while scanning for hwrm_done completion during ring teardown. Not checking the valid bit could cause a ring overflow when we ring the doorbell. Fixes: 4fb6ab3f866d ("net/bnxt: check flush status during ring free") Cc: sta...@dpdk.org Signed-off-by: Ajit K

[dpdk-dev] [PATCH 15/18] net/bnxt: fix PAM4 mask setting

2022-01-04 Thread Kalesh A P
From: Ajit Khaparde Set the PAM4 mask setting only when PAM4 signaling is enabled. Setting it otherwise seems to result in link negotiation. Also auto_pam4_link_speeds has been renamed to auto_pam4_link_speed_mask to reflect its real usage. Fixes: c23f9ded0391 ("net/bnxt: support 200G PAM4 link"

[dpdk-dev] [PATCH 16/18] net/bnxt: fix pointer access

2022-01-04 Thread Kalesh A P
From: Ajit Khaparde Validate the pointers in rxq before accessing them. Otherwise it can cause a segfault. Fixes: 657c2a7f1dd4 ("net/bnxt: create aggregation rings when needed") Cc: sta...@dpdk.org Signed-off-by: Ajit Khaparde Reviewed-by: Kalesh AP Reviewed-by: Somnath Kotur --- drivers/ne

[dpdk-dev] [PATCH 17/18] net/bnxt: fix incorrect memset in bnxt_dev_xstats_get_op

2022-01-04 Thread Kalesh A P
From: Kalesh AP In bnxt_dev_xstats_get_op(), the PMD is not zeroing the whole buffer supplied by the application. This can end up passing junk statistics values to the application when the FW does not support extended stats on a function. Fixed to call memset() with corrrect size. Fixes: f55e12f

[dpdk-dev] [PATCH 18/18] net/bnxt: check VF rep pointer before access

2022-01-04 Thread Kalesh A P
From: Ajit Khaparde The PF or trusted VF Rx handler could invoke the VF representor's Rx function without knowledge of the application cleaning up the representor ports. Check if the vfr_bp pointer is valid before accessing it. Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")

[dpdk-dev] [PATCH 0/3] bnxt fixes

2021-08-23 Thread Kalesh A P
From: Kalesh AP Please apply. Kalesh AP (3): net/bnxt: fix Rx mbuf VLAN in scalar Rx net/bnxt: check FW capability for VLAN offloads net/bnxt: fix VLAN indication in Rx mbuf drivers/net/bnxt/bnxt.h| 7 --- drivers/net/bnxt/bnxt_ethdev.c | 4 drivers/net/bnxt/bnxt_hwrm.

[dpdk-dev] [PATCH 1/3] net/bnxt: fix Rx mbuf VLAN in scalar Rx

2021-08-23 Thread Kalesh A P
From: Kalesh AP In the scalar Rx path, for the VLAN packet, TCI is not saved in the "mbuf->vlan_tci", however the STRIPPED offload flag is set along with PKT_RX_VLAN flag. Fixes: c1b33d40315f ("net/bnxt: use table based mbuf flags handling") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP Reviewe

[dpdk-dev] [PATCH 2/3] net/bnxt: check FW capability for VLAN offloads

2021-08-23 Thread Kalesh A P
From: Kalesh AP VLAN offload capability may be disabled in the FW. The driver should not attempt to override or utilize this feature in such scenarios since it will not work as expected. Fixes: 0a6d2a720078 ("net/bnxt: get device infos") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP Reviewed-by

[dpdk-dev] [PATCH 3/3] net/bnxt: fix VLAN indication in Rx mbuf

2021-08-23 Thread Kalesh A P
From: Kalesh AP Fix to ignore the RX_PKT_CMPL_FLAGS2_META_FORMAT_VLAN when the firmware doesn't support the VLAN strip offload. Fixes: 2eb53b134aae ("net/bnxt: add initial Rx code") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Lance Richardson Reviewed

[dpdk-dev] [PATCH] net/bnxt: fix ring group free

2021-08-30 Thread Kalesh A P
From: Kalesh AP Added an invalid fw_grp_id check inside bnxt_hwrm_ring_grp_free(). This will prevent invalid fw_grp_id to be passed to the FW which can result in an error. This fixes the following failure in the "port stop" -> "port start" sequence: bnxt_hwrm_ring_grp_free(): error 2:0::

[dpdk-dev] [PATCH] net/bnxt: fix double allocation of ring groups

2021-09-01 Thread Kalesh A P
From: Kalesh AP After commit "d68249f88266", driver allocates ring groups in bnxt_alloc_hwrm_rx_ring(). But during port start, driver invokes bnxt_alloc_hwrm_rx_ring() followed by bnxt_alloc_all_hwrm_ring_grps(). This will cause the FW command failure in bnxt_alloc_all_hwrm_ring_grps(). To fix t

[dpdk-dev] [PATCH 01/10] net/bnxt: handle flow create failure

2020-01-12 Thread Kalesh A P
From: Kalesh AP If flow create fails due to not enough filter resources, driver does not populate the rte_flow_error using rte_flow_error_set(). Since "rte_errno" could have garbage value and is not relaiable, it could cause a segfault in the stack in port_flow_complain(). Fix it to set rte_flo

[dpdk-dev] [PATCH 02/10] net/bnxt: fix probe failure in FreeBSD

2020-01-12 Thread Kalesh A P
From: Kalesh AP In FreeBSD environment, nic_uio driver does not support interrupts and rte_intr_callback_register() will fail to register interrupts which in turn causes bnxt driver probe failure. Fixed driver to ignore interrupt callback failures in FreeBSD. Also fixed to not use a dedicated co

[dpdk-dev] [PATCH 00/10] bnxt patch set with fixes

2020-01-12 Thread Kalesh A P
From: Kalesh AP Please apply. Kalesh AP (8): net/bnxt: handle flow create failure net/bnxt: fix probe failure in FreeBSD net/bnxt: fix to use correct IOVA mapping net/bnxt: fix enable/disable VLAN filtering net/bnxt: fix enable/disable vlan strip net/bnxt: handle hw filter setting wh

  1   2   3   >