git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/sfc: fence off 8 bits in Rx mark for tunnel offload
[dpdk.git]
/
drivers
/
net
/
bnxt
/
tf_ulp
/
bnxt_ulp.c
diff --git
a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c
index
dfafd9f
..
bbaa6dc
100644
(file)
--- a/
drivers/net/bnxt/tf_ulp/bnxt_ulp.c
+++ b/
drivers/net/bnxt/tf_ulp/bnxt_ulp.c
@@
-830,13
+830,12
@@
ulp_ctx_init(struct bnxt *bp,
goto error_deinit;
}
goto error_deinit;
}
- /* TODO: For now we are overriding to APP:1 on this branch*/
- bp->app_id = 1;
rc = bnxt_ulp_cntxt_app_id_set(bp->ulp_ctx, bp->app_id);
if (rc) {
BNXT_TF_DBG(ERR, "Unable to set app_id for ULP init.\n");
goto error_deinit;
}
rc = bnxt_ulp_cntxt_app_id_set(bp->ulp_ctx, bp->app_id);
if (rc) {
BNXT_TF_DBG(ERR, "Unable to set app_id for ULP init.\n");
goto error_deinit;
}
+ BNXT_TF_DBG(DEBUG, "Ulp initialized with app id %d\n", bp->app_id);
rc = bnxt_ulp_cntxt_app_caps_init(bp->ulp_ctx, bp->app_id, devid);
if (rc) {
rc = bnxt_ulp_cntxt_app_caps_init(bp->ulp_ctx, bp->app_id, devid);
if (rc) {
@@
-1393,13
+1392,17
@@
bnxt_ulp_port_init(struct bnxt *bp)
uint32_t ulp_flags;
int32_t rc = 0;
uint32_t ulp_flags;
int32_t rc = 0;
- if (!bp || !BNXT_TRUFLOW_EN(bp))
- return rc;
-
if (!BNXT_PF(bp) && !BNXT_VF_IS_TRUSTED(bp)) {
BNXT_TF_DBG(ERR,
"Skip ulp init for port: %d, not a TVF or PF\n",
if (!BNXT_PF(bp) && !BNXT_VF_IS_TRUSTED(bp)) {
BNXT_TF_DBG(ERR,
"Skip ulp init for port: %d, not a TVF or PF\n",
- bp->eth_dev->data->port_id);
+ bp->eth_dev->data->port_id);
+ return rc;
+ }
+
+ if (!BNXT_TRUFLOW_EN(bp)) {
+ BNXT_TF_DBG(ERR,
+ "Skip ulp init for port: %d, truflow is not enabled\n",
+ bp->eth_dev->data->port_id);
return rc;
}
return rc;
}
@@
-1520,9
+1523,6
@@
bnxt_ulp_port_deinit(struct bnxt *bp)
struct rte_pci_device *pci_dev;
struct rte_pci_addr *pci_addr;
struct rte_pci_device *pci_dev;
struct rte_pci_addr *pci_addr;
- if (!BNXT_TRUFLOW_EN(bp))
- return;
-
if (!BNXT_PF(bp) && !BNXT_VF_IS_TRUSTED(bp)) {
BNXT_TF_DBG(ERR,
"Skip ULP deinit port:%d, not a TVF or PF\n",
if (!BNXT_PF(bp) && !BNXT_VF_IS_TRUSTED(bp)) {
BNXT_TF_DBG(ERR,
"Skip ULP deinit port:%d, not a TVF or PF\n",
@@
-1530,6
+1530,13
@@
bnxt_ulp_port_deinit(struct bnxt *bp)
return;
}
return;
}
+ if (!BNXT_TRUFLOW_EN(bp)) {
+ BNXT_TF_DBG(ERR,
+ "Skip ULP deinit for port:%d, truflow is not enabled\n",
+ bp->eth_dev->data->port_id);
+ return;
+ }
+
if (!bp->ulp_ctx) {
BNXT_TF_DBG(DEBUG, "ulp ctx already de-allocated\n");
return;
if (!bp->ulp_ctx) {
BNXT_TF_DBG(DEBUG, "ulp ctx already de-allocated\n");
return;
@@
-2033,7
+2040,7
@@
bnxt_ulp_cntxt_list_del(struct bnxt_ulp_context *ulp_ctx)
struct ulp_context_list_entry *entry, *temp;
rte_spinlock_lock(&bnxt_ulp_ctxt_lock);
struct ulp_context_list_entry *entry, *temp;
rte_spinlock_lock(&bnxt_ulp_ctxt_lock);
- TAILQ_FOREACH_SAFE(entry, &ulp_cntx_list, next, temp) {
+
RTE_
TAILQ_FOREACH_SAFE(entry, &ulp_cntx_list, next, temp) {
if (entry->ulp_ctx == ulp_ctx) {
TAILQ_REMOVE(&ulp_cntx_list, entry, next);
rte_free(entry);
if (entry->ulp_ctx == ulp_ctx) {
TAILQ_REMOVE(&ulp_cntx_list, entry, next);
rte_free(entry);