Kalesh AP
990b5c07f6
RDMA/bnxt_re: Fix return code of bnxt_re_configure_cc
...
Driver currently supports modifying GEN0_EXT0 CC parameters
through debugfs hook.
Fixed to return -EOPNOTSUPP instead of -EINVAL in bnxt_re_configure_cc()
when the user tries to modify any other CC parameters.
Fixes: 656dff55da ("RDMA/bnxt_re: Congestion control settings using debugfs hook")
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com >
Link: https://patch.msgid.link/20250520035910.1061918-4-kalesh-anakkur.purayil@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2025-05-21 06:05:47 -04:00
Gautam R A
e3d57a00d4
RDMA/bnxt_re: Fix missing error handling for tx_queue
...
bnxt_re_fill_gen0_ext0() did not return an error when
attempting to modify CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TX_QUEUE,
leading to silent failures.
Fixed this by returning -EOPNOTSUPP for tx_queue modifications and
ensuring proper error propagation in bnxt_re_configure_cc().
Fixes: 656dff55da ("RDMA/bnxt_re: Congestion control settings using debugfs hook")
Signed-off-by: Gautam R A <gautam-r.a@broadcom.com >
Link: https://patch.msgid.link/20250520035910.1061918-3-kalesh-anakkur.purayil@broadcom.com
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com >
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2025-05-21 06:05:05 -04:00
Gautam R A
58d7a965bb
RDMA/bnxt_re: Fix incorrect display of inactivity_cp in debugfs output
...
The inactivity_cp parameter in debugfs was not being read or
written correctly, resulting in "Invalid argument" errors.
Fixed this by ensuring proper mapping of inactivity_cp in
both the map_cc_config_offset_gen0_ext0 and
bnxt_re_fill_gen0_ext0() functions.
Fixes: 656dff55da ("RDMA/bnxt_re: Congestion control settings using debugfs hook")
Signed-off-by: Gautam R A <gautam-r.a@broadcom.com >
Link: https://patch.msgid.link/20250520035910.1061918-2-kalesh-anakkur.purayil@broadcom.com
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com >
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2025-05-21 06:02:29 -04:00
Selvin Xavier
f26e648a97
RDMA/bnxt_re: Fix the condition check while programming congestion control
...
Program the Congestion control values when the CC gen matches.
Fix the condition check for the same.
Fixes: 656dff55da ("RDMA/bnxt_re: Congestion control settings using debugfs hook")
Reported-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com >
Reported-by: Chengchang Tang <tangchengchang@huawei.com >
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com >
Link: https://patch.msgid.link/1739022506-8937-1-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2025-02-09 04:59:05 -05:00
Dan Carpenter
dbc641ecf1
RDMA/bnxt_re: Fix buffer overflow in debugfs code
...
Add some bounds checking to prevent memory corruption in
bnxt_re_cc_config_set(). This is debugfs code so the bug can only be
triggered by root.
Fixes: 656dff55da ("RDMA/bnxt_re: Congestion control settings using debugfs hook")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org >
Link: https://patch.msgid.link/a6b081ab-55fe-4d0c-8f69-c5e5a59e9141@stanley.mountain
Acked-by: Selvin Xavier <selvin.xavier@broadcom.com >
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2025-02-09 04:58:22 -05:00
Selvin Xavier
656dff55da
RDMA/bnxt_re: Congestion control settings using debugfs hook
...
Implements routines to set and get different settings of
the congestion control. This will enable the users to modify
the settings according to their network.
Currently supporting only GEN 0 version of the parameters.
Reading these files queries the firmware and report the values
currently programmed. Writing to the files sends commands that
update the congestion control settings
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com >
Link: https://patch.msgid.link/1737301535-6599-1-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2025-02-04 08:27:03 -05:00
Kalesh AP
d7d54769c0
RDMA/bnxt_re: Add debugfs hook in the driver
...
Adding support for a per device debugfs folder for exporting
some of the device specific debug information.
Added support to get QP info for now. The same folder can be
used to export other debug features in future.
Signed-off-by: Saravanan Vajravel <saravanan.vajravel@broadcom.com >
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com >
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com >
Link: https://patch.msgid.link/1730428483-17841-5-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Leon Romanovsky <leon@kernel.org >
2024-11-04 06:53:06 -05:00