[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 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 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

[dpdk-dev] [PATCH 03/10] net/bnxt: fix to use correct IOVA mapping

2020-01-12 Thread Kalesh A P
From: Kalesh AP Use rte_malloc_virt2iova() to obtain the IO address of a virtual address obtained through rte_malloc(). Fixed to use the iova address returned by rte_memzone_reserve_aligned() as the call always returns with populating "mz->iova" with rte_malloc_virt2iova(mz->addr). Removed redu

[dpdk-dev] [PATCH 08/10] net/bnxt: use macro for PCI log format

2020-01-12 Thread Kalesh A P
From: Kalesh AP Fixes: 19e6af01bb36 ("net/bnxt: support get/set EEPROM") Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_ethdev.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers

[dpdk-dev] [PATCH 06/10] net/bnxt: handle hw filter setting when port is stopped

2020-01-12 Thread Kalesh A P
From: Kalesh AP Driver destroy the vnic when the port is brought down. Port hw filter setting such as promiscuos, allmulti and vlan filtering will be applied when port is started. Fixed to return success silently for these callbacks when port is stopped. Also fixed to clear "bp->dev_stopped" bef

[dpdk-dev] [PATCH 09/10] net/bnxt: release port upon close

2020-01-12 Thread Kalesh A P
From: Somnath Kotur Set RTE_ETH_DEV_CLOSE_REMOVE upon probe so all the private resources for the port can be freed by rte_eth_dev_close(). Signed-off-by: Somnath Kotur Reviewed-by: Kalesh Anakkur Purayil Reviewed-by: Ajit Kumar Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 5 + 1 file ch

[dpdk-dev] [PATCH 05/10] net/bnxt: fix enable/disable vlan strip

2020-01-12 Thread Kalesh A P
From: Kalesh AP HWRM_VNIC_CFG command to configure vnic dynamically with traffic running is not working. Driver has to free and recreate the vnic and then reconfigure the vnic filters. Fixes: 7fe5668d2ea3 ("net/bnxt: support VLAN filter and strip") Signed-off-by: Kalesh AP Reviewed-by: Ajit Ku

[dpdk-dev] [PATCH 07/10] net/bnxt: fix a memory leak in port stop

2020-01-12 Thread Kalesh A P
From: Kalesh AP The memory for mark table is allocated during port start. But the allocated memory is freed only during port close or driver unload which in turn causes a memory leakage on each port start/stop. Fixed it by moving the memory free to port stop. Fixes: 4e40794a18a7 ("net/bnxt: add

[dpdk-dev] [PATCH 04/10] net/bnxt: fix enable/disable VLAN filtering

2020-01-12 Thread Kalesh A P
From: Kalesh AP There is no condition check for the user requested operation for VLAN filtering. As a result, VLAN filtering is getting disabled when the user enables/disables VLAN stripping on same port. The function bnxt_hwrm_clear_l2_filter() didn't actually free L2 filter in HW if the refere

[dpdk-dev] [PATCH 10/10] net/bnxt: fix to cap max rings to minimum of compl rings and stat contexts

2020-01-12 Thread Kalesh A P
From: Somnath Kotur Max Tx rings count could be lesser than max Rx rings in some cases, so take this into account as well. Account for stat contexts available(one for each ring) along with no: of completion rings(one for each ring) to cap the max no: of Tx /Rx rings that can be possibly created.

[dpdk-dev] [PATCH V2 00/10] bnxt patchset with bug fixes

2020-01-12 Thread Kalesh A P
From: Kalesh AP Please apply. V1->V2: fixed the correct the commit ids in Fixes tag. 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/di

[dpdk-dev] [PATCH V2 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 V2 04/10] net/bnxt: fix enable/disable VLAN filtering

2020-01-12 Thread Kalesh A P
From: Kalesh AP There is no condition check for the user requested operation for VLAN filtering. As a result, VLAN filtering is getting disabled when the user enables/disables VLAN stripping on same port. The function bnxt_hwrm_clear_l2_filter() didn't actually free L2 filter in HW if the refere

[dpdk-dev] [PATCH V2 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 V2 03/10] net/bnxt: fix to use correct IOVA mapping

2020-01-12 Thread Kalesh A P
From: Kalesh AP Use rte_malloc_virt2iova() to obtain the IO address of a virtual address obtained through rte_malloc(). Fixed to use the iova address returned by rte_memzone_reserve_aligned() as the call always returns with populating "mz->iova" with rte_malloc_virt2iova(mz->addr). Removed redu

[dpdk-dev] [PATCH V2 10/10] net/bnxt: fix to cap max rings to minimum of compl rings and stat contexts

2020-01-12 Thread Kalesh A P
From: Somnath Kotur Max Tx rings count could be lesser than max Rx rings in some cases, so take this into account as well. Account for stat contexts available(one for each ring) along with no: of completion rings(one for each ring) to cap the max no: of Tx /Rx rings that can be possibly created.

[dpdk-dev] [PATCH V2 06/10] net/bnxt: handle hw filter setting when port is stopped

2020-01-12 Thread Kalesh A P
From: Kalesh AP Driver destroy the vnic when the port is brought down. Port hw filter setting such as promiscuos, allmulti and vlan filtering will be applied when port is started. Fixed to return success silently for these callbacks when port is stopped. Also fixed to clear "bp->dev_stopped" bef

[dpdk-dev] [PATCH V2 08/10] net/bnxt: use macro for PCI log format

2020-01-12 Thread Kalesh A P
From: Kalesh AP Fixes: 19e6af01bb36 ("net/bnxt: support get/set EEPROM") Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_ethdev.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers

[dpdk-dev] [PATCH V2 05/10] net/bnxt: fix enable/disable vlan strip

2020-01-12 Thread Kalesh A P
From: Kalesh AP HWRM_VNIC_CFG command to configure vnic dynamically with traffic running is not working. Driver has to free and recreate the vnic and then reconfigure the vnic filters. Fixes: 7fe5668d2ea3 ("net/bnxt: support VLAN filter and strip") Signed-off-by: Kalesh AP Reviewed-by: Ajit Ku

[dpdk-dev] [PATCH V2 09/10] net/bnxt: release port upon close

2020-01-12 Thread Kalesh A P
From: Somnath Kotur Set RTE_ETH_DEV_CLOSE_REMOVE upon probe so all the private resources for the port can be freed by rte_eth_dev_close(). Signed-off-by: Somnath Kotur Reviewed-by: Kalesh Anakkur Purayil Reviewed-by: Ajit Kumar Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 5 + 1 file ch

[dpdk-dev] [PATCH V2 07/10] net/bnxt: fix a memory leak in port stop

2020-01-12 Thread Kalesh A P
From: Kalesh AP The memory for mark table is allocated during port start. But the allocated memory is freed only during port close or driver unload which in turn causes a memory leakage on each port start/stop. Fixed it by moving the memory free to port stop. Fixes: a968a9f5456d ("net/bnxt: add

[dpdk-dev] [PATCH V4 00/10] bnxt patchset with bug fixes

2020-01-16 Thread Kalesh A P
From: Kalesh AP v1->v2: fixed the correct the commit ids in Fixes tag. v2->v3: shorten commit log and update commit ids for Fixes tag. v3->v4: addressed Ferruh's comment on Patch#1 and Pacth#9 and marked required patches for stable inclusion. Kalesh AP (8): net/bnxt: fix flow create failure

[dpdk-dev] [PATCH V4 04/10] net/bnxt: fix enable/disable VLAN filtering

2020-01-16 Thread Kalesh A P
From: Kalesh AP There is no condition check for the user requested operation for VLAN filtering. As a result, VLAN filtering is getting disabled when the user enables/disables VLAN stripping on same port. The function bnxt_hwrm_clear_l2_filter() didn't actually free L2 filter in HW if the refere

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

2020-01-16 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 V4 03/10] net/bnxt: fix to use correct IOVA mapping

2020-01-16 Thread Kalesh A P
From: Kalesh AP Use rte_malloc_virt2iova() to obtain the IO address of a virtual address obtained through rte_malloc(). Fixed to use the iova address returned by rte_memzone_reserve_aligned() as the call always returns with populating "mz->iova" with rte_malloc_virt2iova(mz->addr). Removed redu

[dpdk-dev] [PATCH V4 06/10] net/bnxt: handle hw filter setting when port is stopped

2020-01-16 Thread Kalesh A P
From: Kalesh AP Driver destroy the vnic when the port is brought down. Port hw filter setting such as promiscuos, allmulti and vlan filtering will be applied when port is started. Fixed to return success silently for these callbacks when port is stopped. Also fixed to clear "bp->dev_stopped" bef

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

2020-01-16 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 V4 05/10] net/bnxt: fix VLAN strip support

2020-01-16 Thread Kalesh A P
From: Kalesh AP HWRM_VNIC_CFG command to configure vnic dynamically with traffic running is not working. Driver has to free and recreate the vnic and then reconfigure the vnic filters. Fixes: 7fe5668d2ea3 ("net/bnxt: support VLAN filter and strip") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP

[dpdk-dev] [PATCH V4 07/10] net/bnxt: fix a memory leak in port stop

2020-01-16 Thread Kalesh A P
From: Kalesh AP The memory for mark table is allocated during port start. But the allocated memory is freed only during port close or driver unload which in turn causes a memory leakage on each port start/stop. Fixed it by moving the memory free to port stop. Fixes: a968a9f5456d ("net/bnxt: add

[dpdk-dev] [PATCH V4 09/10] net/bnxt: release port upon close

2020-01-16 Thread Kalesh A P
From: Somnath Kotur Set RTE_ETH_DEV_CLOSE_REMOVE upon probe so all the private resources for the port can be freed by rte_eth_dev_close(). Signed-off-by: Somnath Kotur Reviewed-by: Kalesh Anakkur Purayil Reviewed-by: Ajit Kumar Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 53 +++

[dpdk-dev] [PATCH V4 10/10] net/bnxt: fix to cap max rings to minimum of compl rings and stat contexts

2020-01-16 Thread Kalesh A P
From: Somnath Kotur Max Tx rings count could be lesser than max Rx rings in some cases, so take this into account as well. Account for stat contexts available(one for each ring) along with no: of completion rings(one for each ring) to cap the max no: of Tx /Rx rings that can be possibly created.

[dpdk-dev] [PATCH V4 08/10] net/bnxt: use macro for PCI log format

2020-01-16 Thread Kalesh A P
From: Kalesh AP Fixes: 19e6af01bb36 ("net/bnxt: support get/set EEPROM") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_ethdev.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/net/bnxt/bnx

[dpdk-dev] [RFC PATCH 1/3] librte_ethdev: support device recovery event

2020-01-22 Thread Kalesh A P
From: Kalesh AP Adding support for recovery event in rte_eth_event framework. FW error and FW reset conditions would be managed by PMD. In such cases, PMD would need recovery events to notify application about PMD has recovered from FW reset or FW error. Signed-off-by: Kalesh AP Signed-off-by:

[dpdk-dev] [RFC PATCH 2/3] net/bnxt: notify applications about device reset

2020-01-22 Thread Kalesh A P
From: Kalesh AP When the driver receives RESET_NOTIFY async event from FW or detected an error condition, it should update the application that FW is going to reset. Once the driver recoveres from the reset, update the reset recovery status to application as well. The recovery process is transpa

[dpdk-dev] [RFC PATCH 3/3] app/testpmd: handle device recovery event

2020-01-22 Thread Kalesh A P
From: Kalesh AP Added code to handle device recovery event in testpmd. This is an indication from PMD that it has recovered from a FW reset or FW error condition. Signed-off-by: Kalesh AP Reviewed-by: Ajit Kumar Khaparde --- app/test-pmd/testpmd.c | 7 ++- 1 file changed, 6 insertions(+),

[dpdk-dev] [RFC PATCH 0/3] librte_ethdev: error recovery support

2020-01-22 Thread Kalesh A P
From: Kalesh AP This patch adds support for recovery event in rte_eth_event framework. FW error and FW reset conditions would be managed by PMD. Driver uses RTE_ETH_EVENT_INTR_RESET event to notify the applications about the FW reset or error. In such cases, PMD would need recovery events to noti

[dpdk-dev] [PATCH 0/5] bnxt bug fixes

2020-07-09 Thread Kalesh A P
From: Kalesh AP This patchset contains few bug fixes in bnxt PMD. Please apply. Kalesh AP (5): net/bnxt: fix to avoid unnecessary memory allocation net/bnxt: remove unused enum declaration net/bnxt: fix to not send unnecessary hwrm command net/bnxt: fix to set flow error when filter cre

[dpdk-dev] [PATCH 1/5] net/bnxt: fix to avoid unnecessary memory allocation

2020-07-09 Thread Kalesh A P
From: Kalesh AP VFs are not privileged to issue HWRM_PORT_LED_QCFG/CFG. There is no need to allocate "bp->leds" memory. Fixes: 205b74295282 ("net/bnxt: fix allocation of LED config info") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Ajit Kumar Khaparde

[dpdk-dev] [PATCH 5/5] net/bnxt: fix to free filters when flow create fails

2020-07-09 Thread Kalesh A P
From: Kalesh AP This patch does following things: 1. Added a wrapper function bnxt_clear_one_vnic_filter() for destroying the filters in hw. This will avoid duplicate code in many places. 2. When flow creae fails due to an already existing mark id for the new flow id created, fixed to de

[dpdk-dev] [PATCH 3/5] net/bnxt: fix to not send unnecessary hwrm command

2020-07-09 Thread Kalesh A P
From: Kalesh AP During probe, driver issues HWRM_CFA_ADV_FLOW_MGNT_QCAPS command. But it is not using the command response anywhere which makes the fw call redundant. Remove the unnecessary HWRM_CFA_ADV_FLOW_MGNT_QCAPS call to fw. Remove the redundant flow_flags in bnxt struct. Fixes: afef822b2

[dpdk-dev] [PATCH 4/5] net/bnxt: fix to set flow error when filter create fails

2020-07-09 Thread Kalesh A P
From: Kalesh AP If set_em_filter/set_ntuple_filter cmds fails for some reason, driver is not filling the "rte_flow_error" string buffer. Same is the case when flow create fails due to an already existing mark id for the new flow id created. This leads to a crash in testpmd while trying to print t

[dpdk-dev] [PATCH 2/5] net/bnxt: remove unused enum declaration

2020-07-09 Thread Kalesh A P
From: Kalesh AP "enum bnxt_hw_context" is defined in the header file, but is not used anywhere. Fixes: 9738793f28ec ("net/bnxt: add VNIC functions and structs") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Ajit Kumar Khaparde --- drivers/net/bnxt/bnxt.h | 7 --- 1 file chang

[dpdk-dev] [PATCH 1/9] net/bnxt: use macro for PCI log format

2020-04-21 Thread Kalesh A P
From: Kalesh AP Use PCI_PRI_FMT instead of "%04x:%02x:%02x:%02x" print format. Signed-off-by: Kalesh AP Reviewed-by: Ajit Kumar Khaparde --- drivers/net/bnxt/bnxt_hwrm.c | 6 +++--- drivers/net/bnxt/bnxt_ring.c | 2 +- drivers/net/bnxt/bnxt_vnic.c | 2 +- 3 files changed, 5 insertions(+), 5 d

[dpdk-dev] [PATCH 2/9] net/bnxt: return speed capabilities in device info get

2020-04-21 Thread Kalesh A P
From: Kalesh AP Added information about supported speeds for the port in the "dev_infos_get". As other PMDs are returning the speed capabilities, apps may expect this behavior from bnxt PMD. Signed-off-by: Kalesh AP Reviewed-by: Ajit Kumar Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 36

[dpdk-dev] [PATCH 0/9] bnxt patchset with fixes

2020-04-21 Thread Kalesh A P
From: Kalesh AP Please apply. Kalesh AP (9): net/bnxt: use macro for PCI log format net/bnxt: return speed capabilities in device info get net/bnxt: fix to resend FUNC_DRV_IF_CHANGE when FW reset is in progress net/bnxt: fix to use true/false for bool types net/bnxt: fix to handle

[dpdk-dev] [PATCH 4/9] net/bnxt: fix to use true/false for bool types

2020-04-21 Thread Kalesh A P
From: Kalesh AP Fixes: 0b533591238f ("net/bnxt: inform firmware about IF state changes") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Lance Richardson Reviewed-by: Ajit Kumar Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 6 +++--- 1 file changed, 3 in

[dpdk-dev] [PATCH 3/9] net/bnxt: fix to resend FUNC_DRV_IF_CHANGE when FW reset is in progress

2020-04-21 Thread Kalesh A P
From: Kalesh AP FW returns HWRM_ERR_CODE_HOT_RESET_PROGRESS(0xa) when it is unable to process a specific cmd while hot reset is in progress. Host driver is expected to keep retrying the cmd for 2s with a gap of 50ms between each retrial. Also, fixed to fail port start if the HWRM_FUNC_DRV_IF_CHA

[dpdk-dev] [PATCH 8/9] net/bnxt: log firmware status on early init failure

2020-04-21 Thread Kalesh A P
From: Kalesh AP Firmware reports any fatal error (either ASIC or Firmware related) via a new status register. This status register can provide more detailed information about the firmware errors, especially if error occurs before HWRM_VER_GET is issued. Attempt to map this register if it is prese

[dpdk-dev] [PATCH 7/9] net/bnxt: define FW_STATUS location structure for ChiMP devices

2020-04-21 Thread Kalesh A P
From: Kalesh AP Code using this change will be added in next patch. Signed-off-by: Kalesh AP Reviewed-by: Ajit Kumar Khaparde --- drivers/net/bnxt/hsi_struct_def_dpdk.h | 49 ++ 1 file changed, 49 insertions(+) diff --git a/drivers/net/bnxt/hsi_struct_def_dpdk

[dpdk-dev] [PATCH 6/9] net/bnxt: fix vlan add when port is stopped

2020-04-21 Thread Kalesh A P
From: Kalesh AP Driver destroys the vnic when the port is brought down. When user tries to add a vlan when port is stopped, driver issues HWRM command to FW with invalid vnic_id and it fails. Fixed to return an error while setting vlan when port is not started. Fixes: b4e190d55c25 ("net/bnxt: f

[dpdk-dev] [PATCH 9/9] net/bnxt: fix to not issue HWRM_PORT_MAC_QCFG on a VF

2020-04-21 Thread Kalesh A P
From: Kalesh AP HWRM_PORT_MAC_QCFG is not supported on a VF. Added a PF check in bnxt_hwrm_port_mac_qcfg() to prevent the probe failure on a VF. Fixes: 184e3d13d88a ("net/bnxt: fetch SVIF information from firmware") Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnx

[dpdk-dev] [PATCH 5/9] net/bnxt: fix to handle port start failure

2020-04-21 Thread Kalesh A P
From: Kalesh AP Fixed to invoke clean up in the reverse sequence of initialization in case any of the FW commands fail during port start. Fixes: 0b533591238f ("net/bnxt: inform firmware about IF state changes") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-b

[dpdk-dev] [PATCH 0/2] bnxt bug fixes

2020-04-23 Thread Kalesh A P
From: Kalesh AP Please apply. Kalesh AP (1): net/bnxt: fix to reset VNIC rxq count on VNIC free Rahul Gupta (1): net/bnxt: fix for memleak during queue restart drivers/net/bnxt/bnxt_ethdev.c | 2 ++ drivers/net/bnxt/bnxt_hwrm.c | 12 drivers/net/bnxt/bnxt_rxr.c| 44 +++

[dpdk-dev] [PATCH 2/2] net/bnxt: fix to reset VNIC rxq count on VNIC free

2020-04-23 Thread Kalesh A P
From: Kalesh AP bnxt_free_one_vnic and bnxt_setup_one_vnic are called on configuring port vlan stripping. bnxt_setup_one_vnic keeps incrementing the vnic rx_queue_cnt. Fix to reset vnic rx_queue_cnt in bnxt_free_one_vnic. Fixes: cfadfee41ed1 ("net/bnxt: fix VLAN strip") Cc: sta...@dpdk.org Sign

[dpdk-dev] [PATCH 1/2] net/bnxt: fix for memleak during queue restart

2020-04-23 Thread Kalesh A P
From: Rahul Gupta During port 0 rxq 1 start ie queue start, bnxt_free_hwrm_rx_ring() we are clearing the pointers to mbuf array. Due to this we overwrite the queue with fresh mbuf allocations causing previously allocated mbufs to leak. Add a check before allocating mbuf to replenish only empty mb

[dpdk-dev] [PATCH 0/2] bnxt bug fixes

2020-05-05 Thread Kalesh A P
From: Kalesh AP Please apply. Kalesh AP (2): net/bnxt: fix to alloc FW specified TQM ring context memory net/bnxt: fix TQM ring context memory sizing formulas drivers/net/bnxt/bnxt.h| 2 +- drivers/net/bnxt/bnxt_ethdev.c | 21 + drivers/net/bnxt/bnxt_hwrm.c |

[dpdk-dev] [PATCH 2/2] net/bnxt: fix TQM ring context memory sizing formulas

2020-05-05 Thread Kalesh A P
From: Kalesh AP The current formulas to calculate the TQM slow path and fast path ring context memory sizes are not quite correct. TQM slow path entry is array index 0 of ctx->tqm_mem[]. The other array entries are for fast path. Fix these sizes according to firmware spec. for 57500 and newer chi

[dpdk-dev] [PATCH 1/2] net/bnxt: fix to alloc FW specified TQM ring context memory

2020-05-05 Thread Kalesh A P
From: Kalesh AP Newer firmware advertises the number of TQM rings to allocate context memory for. Use the firmware specified value and fall back to the old value derived from "bp->max_q" if it is not available. Fixes: f8168ca0e690 ("net/bnxt: support thor controller") Cc: sta...@dpdk.org Signe

[dpdk-dev] [PATCH] app/testpmd: fix NULL pointer dereferencing issue

2020-05-07 Thread Kalesh A P
From: Kalesh AP Note that the issue was observed in an internal Coverity scan. Fixes: e088907bb851 ("app/testpmd: add command for getting loaded DDP profiles") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP --- app/test-pmd/cmdline.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) dif

[dpdk-dev] [PATCH v2] app/testpmd: fix null pointer dereferencing issue

2020-05-07 Thread Kalesh A P
From: Kalesh AP Note that the issue was observed in an internal Coverity scan. Fixes: e088907bb851 ("app/testpmd: add command for getting loaded DDP profiles") Cc: sta...@dpdk.org Signed-off-by: Kalesh AP --- v2: fixed headline case app/test-pmd/cmdline.c | 4 +++- 1 file changed, 3 insertio

[dpdk-dev] [PATCH v3] app/testpmd: fix null pointer dereferencing issue

2020-05-07 Thread Kalesh A P
From: Kalesh AP In cmd_ddp_get_list_parsed(), elements of "p_list" are accessed even after the memory allocation for "p_list" fails. With this patch, this null pointer dereference is avoided as we return when there is malloc failure. Fixes: e088907bb851 ("app/testpmd: add command for getting lo

[dpdk-dev] [PATCH] net/bnxt: add support for 200G link speed

2020-05-12 Thread Kalesh A P
From: Kalesh AP When the driver is loaded on a 200G NIC, the port speed is not displayed correctly. Parse the 200G speed before displaying it. Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 2 ++ drivers/net/bnxt/bnxt_hwrm

[dpdk-dev] [PATCH] net/bnxt: fix to advance producer index

2020-05-20 Thread Kalesh A P
From: Rahul Gupta When a queue is started after deferred_start, then increment raw_prod irrespective of new mbuf is allocated or old mbufs are used. Fixes: d256c73c1122 ("net/bnxt: fix memory leak during queue restart") Cc: sta...@dpdk.org Signed-off-by: Rahul Gupta Signed-off-by: Kalesh AP R

[dpdk-dev] [PATCH 0/2] bnxt bug fixes

2020-05-22 Thread Kalesh A P
From: Kalesh AP These are two bug fixes observed during regression testing with DPDK 20.05-rc3. Please apply. Kalesh AP (1): net/bnxt: fix the check for validating??link speed Rahul Gupta (1): net/bnxt: performance fix for Arm drivers/net/bnxt/bnxt.h| 1 + drivers/net/bnxt/bnxt_

[dpdk-dev] [PATCH 2/2] net/bnxt: performance fix for ARM

2020-05-22 Thread Kalesh A P
From: Rahul Gupta Eliminate unnecessary rte_smp_wmb() before writing to request/completion doorbells. Use rte_cio_wmb() memory barrier instead of rte_io_wmb() before writing to tx/rx request queue doorbells and use rte_compiler_barrier() before writing to tx/rx completion queue doorbells. Fixes:

[dpdk-dev] [PATCH v2 0/2] bnxt fixes

2020-05-22 Thread Kalesh A P
From: Kalesh AP These are two bug fixes observed during regression testing with DPDK 20.05-rc3. Please apply. V2: fixed commit message and added Reviewed-by tag. Kalesh AP (1): net/bnxt: fix the check for validating??link speed Rahul Gupta (1): net/bnxt: performance fix for Arm drivers/

[dpdk-dev] [PATCH v2 2/2] net/bnxt: performance fix for Arm

2020-05-22 Thread Kalesh A P
From: Rahul Gupta Eliminate unnecessary rte_smp_wmb() before writing to request/completion doorbells. Use rte_cio_wmb() memory barrier instead of rte_io_wmb() before writing to tx/rx request queue doorbells and use rte_compiler_barrier() before writing to tx/rx completion queue doorbells. Fixes:

[dpdk-dev] [PATCH 1/2] net/bnxt: fix the check for validating link speed

2020-05-22 Thread Kalesh A P
From: Kalesh AP bnxt PMD uses the macro BNXT_SUPPORTED_SPEEDS to validate the user requested speed. But this has all the speed values supported by the PMD and is not chip specific. The check against this macro returns success when the user tries set the speed to 100G on a port even if the chip d

<    1   2   3   >