[PATCH 33/54] net/bnxt/tf_ulp: socket direct enable
Manish Kurup
manish.kurup at broadcom.com
Tue Sep 30 02:35:43 CEST 2025
From: Farah Smith <farah.smith at broadcom.com>
1. Remove code which requires multi-root to be configured in order for
the socket direct feature be enabled. This is not required and was
a customer specific implementation.
2. Always enable the global table scope for Thor2 when the socket
direct feature is enabled.
3. Remove global table scope feature bit.
Signed-off-by: Farah Smith <farah.smith at broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha at broadcom.com>
---
drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c | 12 +++---------
drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c | 16 ++++------------
drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h | 5 +++--
3 files changed, 10 insertions(+), 23 deletions(-)
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
index 4a1ccfa2a3..78fd96ce48 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tf.c
@@ -420,15 +420,9 @@ ulp_tf_cntxt_app_caps_init(struct bnxt *bp,
if (info[i].flags & BNXT_ULP_APP_CAP_BC_MC_SUPPORT)
ulp_ctx->cfg_data->ulp_flags |=
BNXT_ULP_APP_BC_MC_SUPPORT;
- if (info[i].flags & BNXT_ULP_APP_CAP_SOCKET_DIRECT) {
- /* Enable socket direction only if MR is enabled in fw*/
- if (BNXT_MULTIROOT_EN(bp)) {
- ulp_ctx->cfg_data->ulp_flags |=
- BNXT_ULP_APP_SOCKET_DIRECT;
- BNXT_DRV_DBG(INFO,
- "Socket Direct feature is enabled\n");
- }
- }
+ if (info[i].flags & BNXT_ULP_APP_CAP_SOCKET_DIRECT)
+ ulp_ctx->cfg_data->ulp_flags |=
+ BNXT_ULP_APP_SOCKET_DIRECT;
if (info[i].flags & BNXT_ULP_APP_CAP_HA_DYNAMIC) {
/* Read the environment variable to determine hot up */
if (!bnxt_pmd_get_hot_up_config()) {
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
index 8443e3e7ba..7271cbb863 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_tfc.c
@@ -553,18 +553,10 @@ ulp_tfc_cntxt_app_caps_init(struct bnxt *bp, uint8_t app_id, uint32_t dev_id)
if (info[i].flags & BNXT_ULP_APP_CAP_BC_MC_SUPPORT)
ulp_ctx->cfg_data->ulp_flags |=
BNXT_ULP_APP_BC_MC_SUPPORT;
- if (info[i].flags & BNXT_ULP_APP_CAP_SOCKET_DIRECT) {
- /* Enable socket direction only if MR is enabled in fw*/
- if (BNXT_MULTIROOT_EN(bp)) {
- ulp_ctx->cfg_data->ulp_flags |=
- BNXT_ULP_APP_SOCKET_DIRECT;
- BNXT_DRV_DBG(DEBUG,
- "Socket Direct feature is enabled");
- } else {
- BNXT_DRV_DBG(DEBUG,
- "No Socket Direct feature - must enable multiroot");
- }
- }
+ if (info[i].flags & BNXT_ULP_APP_CAP_SOCKET_DIRECT)
+ ulp_ctx->cfg_data->ulp_flags |=
+ BNXT_ULP_APP_SOCKET_DIRECT;
+
/* Update the capability feature bits*/
if (bnxt_ulp_cap_feat_process(info[i].feature_bits,
&ulp_ctx->cfg_data->feature_bits))
diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h b/drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h
index cb826b2c19..4134e2f628 100644
--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h
+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp_utils.h
@@ -1092,8 +1092,9 @@ bnxt_ulp_cap_feat_process(uint64_t feat_bits, uint64_t *out_bits)
if (bit & BNXT_ULP_FEATURE_BIT_SPECIAL_VXLAN)
BNXT_DRV_DBG(ERR, "Special VXLAN Feature is enabled\n");
if (bit & BNXT_ULP_FEATURE_BIT_HOT_UPGRADE)
- BNXT_DRV_DBG(ERR, "Hot Upgrade Feature is enabled\n");
-
+ BNXT_DRV_DBG(ERR, "Hot Upgrade Feature is enabled");
+ if (bit & BNXT_ULP_FEATURE_BIT_SOCKET_DIRECT)
+ BNXT_DRV_DBG(ERR, "Socket Direct Feature is enabled");
*out_bits = bit;
return 0;
}
--
2.39.5 (Apple Git-154)
More information about the dev
mailing list