* [dpdk-stable] [PATCH 1/2] net/bnxt: enable default VNIC allocation
@ 2017-08-15 16:04 Ajit Khaparde
2017-08-15 16:04 ` [dpdk-stable] [PATCH 2/2] net/bnxt: fix vnic cleanup Ajit Khaparde
2017-08-16 6:32 ` [dpdk-stable] [PATCH 1/2] net/bnxt: enable default VNIC allocation Yuanhan Liu
0 siblings, 2 replies; 3+ messages in thread
From: Ajit Khaparde @ 2017-08-15 16:04 UTC (permalink / raw)
To: stable; +Cc: yliu
[ backported from upstream commit 28eef5e0a8fa592f8bdf3a3ea0a6a00fecee6acf ]
Previously, no VNICs were allocated as the default VNIC,
even if they were configured as one. This patch fixes that error.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index fef00f6..a4bc68b 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -840,6 +840,8 @@ int bnxt_hwrm_vnic_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic)
HWRM_PREP(req, VNIC_ALLOC, -1, resp);
+ if (vnic->func_default)
+ req.flags = HWRM_VNIC_ALLOC_INPUT_FLAGS_DEFAULT;
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
HWRM_CHECK_RESULT;
--
2.10.1 (Apple Git-78)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dpdk-stable] [PATCH 2/2] net/bnxt: fix vnic cleanup
2017-08-15 16:04 [dpdk-stable] [PATCH 1/2] net/bnxt: enable default VNIC allocation Ajit Khaparde
@ 2017-08-15 16:04 ` Ajit Khaparde
2017-08-16 6:32 ` [dpdk-stable] [PATCH 1/2] net/bnxt: enable default VNIC allocation Yuanhan Liu
1 sibling, 0 replies; 3+ messages in thread
From: Ajit Khaparde @ 2017-08-15 16:04 UTC (permalink / raw)
To: stable; +Cc: yliu
[ backported from upstream commit 2bda4ec790d340ecc7c459a9eec2ecf0825b212b ]
Check if the vnic_id and rss_rule is not invalid before passing it
to the firmware to cleanup the VNIC. Log a message if the vnic_id
is invalid.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
drivers/net/bnxt/bnxt_hwrm.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index a4bc68b..93910d8 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -847,6 +847,7 @@ int bnxt_hwrm_vnic_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic)
HWRM_CHECK_RESULT;
vnic->fw_vnic_id = rte_le_to_cpu_16(resp->vnic_id);
+ RTE_LOG(DEBUG, PMD, "VNIC ID %x\n", vnic->fw_vnic_id);
return rc;
}
@@ -856,6 +857,11 @@ int bnxt_hwrm_vnic_cfg(struct bnxt *bp, struct bnxt_vnic_info *vnic)
struct hwrm_vnic_cfg_input req = {.req_type = 0 };
struct hwrm_vnic_cfg_output *resp = bp->hwrm_cmd_resp_addr;
+ if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
+ RTE_LOG(DEBUG, PMD, "VNIC ID %x\n", vnic->fw_vnic_id);
+ return rc;
+ }
+
HWRM_PREP(req, VNIC_CFG, -1, resp);
/* Only RSS support for now TBD: COS & LB */
@@ -898,6 +904,7 @@ int bnxt_hwrm_vnic_ctx_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic)
HWRM_CHECK_RESULT;
vnic->fw_rss_cos_lb_ctx = rte_le_to_cpu_16(resp->rss_cos_lb_ctx_id);
+ RTE_LOG(DEBUG, PMD, "VNIC RSS Rule %x\n", vnic->fw_rss_cos_lb_ctx);
return rc;
}
@@ -909,6 +916,12 @@ int bnxt_hwrm_vnic_ctx_free(struct bnxt *bp, struct bnxt_vnic_info *vnic)
struct hwrm_vnic_rss_cos_lb_ctx_free_output *resp =
bp->hwrm_cmd_resp_addr;
+ if (vnic->fw_rss_cos_lb_ctx == 0xffff) {
+ RTE_LOG(DEBUG, PMD,
+ "VNIC RSS Rule %x\n", vnic->fw_rss_cos_lb_ctx);
+ return rc;
+ }
+
HWRM_PREP(req, VNIC_RSS_COS_LB_CTX_FREE, -1, resp);
req.rss_cos_lb_ctx_id = rte_cpu_to_le_16(vnic->fw_rss_cos_lb_ctx);
@@ -928,8 +941,10 @@ int bnxt_hwrm_vnic_free(struct bnxt *bp, struct bnxt_vnic_info *vnic)
struct hwrm_vnic_free_input req = {.req_type = 0 };
struct hwrm_vnic_free_output *resp = bp->hwrm_cmd_resp_addr;
- if (vnic->fw_vnic_id == INVALID_HW_RING_ID)
+ if (vnic->fw_vnic_id == INVALID_HW_RING_ID) {
+ RTE_LOG(DEBUG, PMD, "VNIC FREE ID %x\n", vnic->fw_vnic_id);
return rc;
+ }
HWRM_PREP(req, VNIC_FREE, -1, resp);
--
2.10.1 (Apple Git-78)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [PATCH 1/2] net/bnxt: enable default VNIC allocation
2017-08-15 16:04 [dpdk-stable] [PATCH 1/2] net/bnxt: enable default VNIC allocation Ajit Khaparde
2017-08-15 16:04 ` [dpdk-stable] [PATCH 2/2] net/bnxt: fix vnic cleanup Ajit Khaparde
@ 2017-08-16 6:32 ` Yuanhan Liu
1 sibling, 0 replies; 3+ messages in thread
From: Yuanhan Liu @ 2017-08-16 6:32 UTC (permalink / raw)
To: Ajit Khaparde; +Cc: stable
On Tue, Aug 15, 2017 at 11:04:03AM -0500, Ajit Khaparde wrote:
> [ backported from upstream commit 28eef5e0a8fa592f8bdf3a3ea0a6a00fecee6acf ]
>
> Previously, no VNICs were allocated as the default VNIC,
> even if they were configured as one. This patch fixes that error.
>
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Applied to dpdk-stable/16.11.
Thank you!
--yliu
> ---
> drivers/net/bnxt/bnxt_hwrm.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
> index fef00f6..a4bc68b 100644
> --- a/drivers/net/bnxt/bnxt_hwrm.c
> +++ b/drivers/net/bnxt/bnxt_hwrm.c
> @@ -840,6 +840,8 @@ int bnxt_hwrm_vnic_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic)
>
> HWRM_PREP(req, VNIC_ALLOC, -1, resp);
>
> + if (vnic->func_default)
> + req.flags = HWRM_VNIC_ALLOC_INPUT_FLAGS_DEFAULT;
> rc = bnxt_hwrm_send_message(bp, &req, sizeof(req));
>
> HWRM_CHECK_RESULT;
> --
> 2.10.1 (Apple Git-78)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-16 6:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-15 16:04 [dpdk-stable] [PATCH 1/2] net/bnxt: enable default VNIC allocation Ajit Khaparde
2017-08-15 16:04 ` [dpdk-stable] [PATCH 2/2] net/bnxt: fix vnic cleanup Ajit Khaparde
2017-08-16 6:32 ` [dpdk-stable] [PATCH 1/2] net/bnxt: enable default VNIC allocation Yuanhan Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).