DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/2] fixes to bnxt PMD
@ 2017-07-25  3:32 Ajit Khaparde
  2017-07-25  3:32 ` [dpdk-dev] [PATCH 1/2] net/bnxt: check current vlan anti spoof value before setting new value Ajit Khaparde
  2017-07-25  3:32 ` [dpdk-dev] [PATCH 2/2] net/bnxt: fix arguments to _rte_eth_dev_callback_process Ajit Khaparde
  0 siblings, 2 replies; 10+ messages in thread
From: Ajit Khaparde @ 2017-07-25  3:32 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit

Couple of fixes to the bnxt PMD against the dpdk-next-net tree.
Please apply.

  net/bnxt: check current vlan anti spoof value before setting new value
  net/bnxt: fix arguments to _rte_eth_dev_callback_process

 drivers/net/bnxt/rte_pmd_bnxt.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

-- 
2.10.1 (Apple Git-78)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dpdk-dev] [PATCH 1/2] net/bnxt: check current vlan anti spoof value before setting new value
  2017-07-25  3:32 [dpdk-dev] [PATCH 0/2] fixes to bnxt PMD Ajit Khaparde
@ 2017-07-25  3:32 ` Ajit Khaparde
  2017-07-31 11:25   ` Ferruh Yigit
  2017-07-25  3:32 ` [dpdk-dev] [PATCH 2/2] net/bnxt: fix arguments to _rte_eth_dev_callback_process Ajit Khaparde
  1 sibling, 1 reply; 10+ messages in thread
From: Ajit Khaparde @ 2017-07-25  3:32 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit

If the current VLAN anti spoof setting is same as the new value,
the firmware can return an error. Call the HWRM command to update
the new setting if it is different from the current value.

Fixes: 36735a932ca7 ("net/bnxt: support set VF QOS and MAC anti spoof")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/rte_pmd_bnxt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index c1876f8..dd7e5b8 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -321,6 +321,9 @@ int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint8_t port, uint16_t vf, uint8_t on)
 	if (vf >= dev_info.max_vfs)
 		return -EINVAL;
 
+	if (on == bp->pf.vf_info[vf].vlan_spoof_en)
+		return 0;
+
 	rc = bnxt_hwrm_func_cfg_vf_set_vlan_anti_spoof(bp, vf, on);
 	if (!rc) {
 		bp->pf.vf_info[vf].vlan_spoof_en = on;
-- 
2.10.1 (Apple Git-78)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dpdk-dev] [PATCH 2/2] net/bnxt: fix arguments to _rte_eth_dev_callback_process
  2017-07-25  3:32 [dpdk-dev] [PATCH 0/2] fixes to bnxt PMD Ajit Khaparde
  2017-07-25  3:32 ` [dpdk-dev] [PATCH 1/2] net/bnxt: check current vlan anti spoof value before setting new value Ajit Khaparde
@ 2017-07-25  3:32 ` Ajit Khaparde
  2017-07-31 11:19   ` Ferruh Yigit
  1 sibling, 1 reply; 10+ messages in thread
From: Ajit Khaparde @ 2017-07-25  3:32 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit

The callback arguments to _rte_eth_dev_callback_process() are swapped.
Fix them.

Fixes: d6af1a13d7a1 ("ethdev: add return values to callback process API")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/rte_pmd_bnxt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index dd7e5b8..0463373 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -57,7 +57,7 @@ int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg)
 	cb_param.msg = msg;
 
 	_rte_eth_dev_callback_process(bp->eth_dev, RTE_ETH_EVENT_VF_MBOX,
-			&cb_param, NULL);
+				      NULL, &cb_param);
 
 	/* Default to approve */
 	if (cb_param.retval == RTE_PMD_BNXT_MB_EVENT_PROCEED)
-- 
2.10.1 (Apple Git-78)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] net/bnxt: fix arguments to _rte_eth_dev_callback_process
  2017-07-25  3:32 ` [dpdk-dev] [PATCH 2/2] net/bnxt: fix arguments to _rte_eth_dev_callback_process Ajit Khaparde
@ 2017-07-31 11:19   ` Ferruh Yigit
  2017-07-31 11:27     ` Ferruh Yigit
  0 siblings, 1 reply; 10+ messages in thread
From: Ferruh Yigit @ 2017-07-31 11:19 UTC (permalink / raw)
  To: Ajit Khaparde, dev

On 7/25/2017 4:32 AM, Ajit Khaparde wrote:
> The callback arguments to _rte_eth_dev_callback_process() are swapped.
> Fix them.
> 
> Fixes: d6af1a13d7a1 ("ethdev: add return values to callback process API")
> 
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
> ---
>  drivers/net/bnxt/rte_pmd_bnxt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
> index dd7e5b8..0463373 100644
> --- a/drivers/net/bnxt/rte_pmd_bnxt.c
> +++ b/drivers/net/bnxt/rte_pmd_bnxt.c
> @@ -57,7 +57,7 @@ int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg)
>  	cb_param.msg = msg;
>  
>  	_rte_eth_dev_callback_process(bp->eth_dev, RTE_ETH_EVENT_VF_MBOX,
> -			&cb_param, NULL);
> +				      NULL, &cb_param);

Hi Ajit,


Since you are using "cb_param.retval", change looks good.

But it is easy to confuse between cb_param and ret_param. To clarify
your intention, I suggest renaming "cb_param" to "ret_param", does it
make sense?

Thanks,
ferruh

>  
>  	/* Default to approve */
>  	if (cb_param.retval == RTE_PMD_BNXT_MB_EVENT_PROCEED)
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] net/bnxt: check current vlan anti spoof value before setting new value
  2017-07-25  3:32 ` [dpdk-dev] [PATCH 1/2] net/bnxt: check current vlan anti spoof value before setting new value Ajit Khaparde
@ 2017-07-31 11:25   ` Ferruh Yigit
  0 siblings, 0 replies; 10+ messages in thread
From: Ferruh Yigit @ 2017-07-31 11:25 UTC (permalink / raw)
  To: Ajit Khaparde, dev

On 7/25/2017 4:32 AM, Ajit Khaparde wrote:
> If the current VLAN anti spoof setting is same as the new value,
> the firmware can return an error. Call the HWRM command to update
> the new setting if it is different from the current value.
> 
> Fixes: 36735a932ca7 ("net/bnxt: support set VF QOS and MAC anti spoof")
> 
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] net/bnxt: fix arguments to _rte_eth_dev_callback_process
  2017-07-31 11:19   ` Ferruh Yigit
@ 2017-07-31 11:27     ` Ferruh Yigit
  2017-07-31 16:24       ` [dpdk-dev] [PATCH v2] " Ajit Khaparde
  0 siblings, 1 reply; 10+ messages in thread
From: Ferruh Yigit @ 2017-07-31 11:27 UTC (permalink / raw)
  To: Ajit Khaparde, dev

On 7/31/2017 12:19 PM, Ferruh Yigit wrote:
> On 7/25/2017 4:32 AM, Ajit Khaparde wrote:
>> The callback arguments to _rte_eth_dev_callback_process() are swapped.
>> Fix them.
>>
>> Fixes: d6af1a13d7a1 ("ethdev: add return values to callback process API")
>>
>> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
>> ---
>>  drivers/net/bnxt/rte_pmd_bnxt.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
>> index dd7e5b8..0463373 100644
>> --- a/drivers/net/bnxt/rte_pmd_bnxt.c
>> +++ b/drivers/net/bnxt/rte_pmd_bnxt.c
>> @@ -57,7 +57,7 @@ int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg)
>>  	cb_param.msg = msg;
>>  
>>  	_rte_eth_dev_callback_process(bp->eth_dev, RTE_ETH_EVENT_VF_MBOX,
>> -			&cb_param, NULL);
>> +				      NULL, &cb_param);
> 
> Hi Ajit,
> 
> 
> Since you are using "cb_param.retval", change looks good.
> 
> But it is easy to confuse between cb_param and ret_param. To clarify
> your intention, I suggest renaming "cb_param" to "ret_param", does it
> make sense?

I got other patch in the set, they are not related and to save some work
for you, can you please send a new version of just this patch?

> 
> Thanks,
> ferruh
> 
>>  
>>  	/* Default to approve */
>>  	if (cb_param.retval == RTE_PMD_BNXT_MB_EVENT_PROCEED)
>>
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dpdk-dev] [PATCH v2] net/bnxt: fix arguments to _rte_eth_dev_callback_process
  2017-07-31 11:27     ` Ferruh Yigit
@ 2017-07-31 16:24       ` Ajit Khaparde
  2017-07-31 17:29         ` Ferruh Yigit
  0 siblings, 1 reply; 10+ messages in thread
From: Ajit Khaparde @ 2017-07-31 16:24 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit

The callback arguments to _rte_eth_dev_callback_process() are swapped.
Fix them.

Fixes: d6af1a13d7a1 ("ethdev: add return values to callback process API")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
--
v1->v2: rename a cb_param to ret_param as per review comment.

---
 drivers/net/bnxt/rte_pmd_bnxt.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index dd7e5b8..c343d90 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -50,20 +50,21 @@
 
 int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg)
 {
-	struct rte_pmd_bnxt_mb_event_param cb_param;
+	struct rte_pmd_bnxt_mb_event_param ret_param;
 
-	cb_param.retval = RTE_PMD_BNXT_MB_EVENT_PROCEED;
-	cb_param.vf_id = vf_id;
-	cb_param.msg = msg;
+	ret_param.retval = RTE_PMD_BNXT_MB_EVENT_PROCEED;
+	ret_param.vf_id = vf_id;
+	ret_param.msg = msg;
 
 	_rte_eth_dev_callback_process(bp->eth_dev, RTE_ETH_EVENT_VF_MBOX,
-			&cb_param, NULL);
+				      NULL, &ret_param);
 
 	/* Default to approve */
-	if (cb_param.retval == RTE_PMD_BNXT_MB_EVENT_PROCEED)
-		cb_param.retval = RTE_PMD_BNXT_MB_EVENT_NOOP_ACK;
+	if (ret_param.retval == RTE_PMD_BNXT_MB_EVENT_PROCEED)
+		ret_param.retval = RTE_PMD_BNXT_MB_EVENT_NOOP_ACK;
 
-	return cb_param.retval == RTE_PMD_BNXT_MB_EVENT_NOOP_ACK ? true : false;
+	return ret_param.retval == RTE_PMD_BNXT_MB_EVENT_NOOP_ACK ?
+		true : false;
 }
 
 int rte_pmd_bnxt_set_tx_loopback(uint8_t port, uint8_t on)
-- 
2.10.1 (Apple Git-78)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/bnxt: fix arguments to _rte_eth_dev_callback_process
  2017-07-31 16:24       ` [dpdk-dev] [PATCH v2] " Ajit Khaparde
@ 2017-07-31 17:29         ` Ferruh Yigit
  0 siblings, 0 replies; 10+ messages in thread
From: Ferruh Yigit @ 2017-07-31 17:29 UTC (permalink / raw)
  To: Ajit Khaparde, dev

On 7/31/2017 5:24 PM, Ajit Khaparde wrote:
> The callback arguments to _rte_eth_dev_callback_process() are swapped.
> Fix them.
> 
> Fixes: d6af1a13d7a1 ("ethdev: add return values to callback process API")
> 
> Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [PATCH 0/2] fixes to bnxt PMD
  2021-07-30  5:36 [dpdk-dev] [PATCH 0/2] fixes to bnxt PMD Ajit Khaparde
@ 2021-07-30 14:14 ` Ajit Khaparde
  0 siblings, 0 replies; 10+ messages in thread
From: Ajit Khaparde @ 2021-07-30 14:14 UTC (permalink / raw)
  To: dpdk-dev

[-- Attachment #1: Type: text/plain, Size: 568 bytes --]

On Thu, Jul 29, 2021 at 10:36 PM Ajit Khaparde
<ajit.khaparde@broadcom.com> wrote:
>
> Fixes to bnxt PMD to address compatibility issues with different FW versions.
Patches applied to dpdk-next-net-brcm.

>
> Jay Ding (1):
>   net/bnxt: fix resource qcap list handling
>
> Kishore Padmanabha (1):
>   net/bnxt: fix stats counter resource
>
>  drivers/net/bnxt/tf_core/tf_msg.c                    | 12 ++++++------
>  .../tf_ulp/generic_templates/ulp_template_db_tbl.c   |  4 ++--
>  2 files changed, 8 insertions(+), 8 deletions(-)
>
> --
> 2.21.1 (Apple Git-122.3)
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dpdk-dev] [PATCH 0/2] fixes to bnxt PMD
@ 2021-07-30  5:36 Ajit Khaparde
  2021-07-30 14:14 ` Ajit Khaparde
  0 siblings, 1 reply; 10+ messages in thread
From: Ajit Khaparde @ 2021-07-30  5:36 UTC (permalink / raw)
  To: dev

[-- Attachment #1: Type: text/plain, Size: 419 bytes --]

Fixes to bnxt PMD to address compatibility issues with different FW versions.

Jay Ding (1):
  net/bnxt: fix resource qcap list handling

Kishore Padmanabha (1):
  net/bnxt: fix stats counter resource

 drivers/net/bnxt/tf_core/tf_msg.c                    | 12 ++++++------
 .../tf_ulp/generic_templates/ulp_template_db_tbl.c   |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

-- 
2.21.1 (Apple Git-122.3)


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-07-30 14:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-25  3:32 [dpdk-dev] [PATCH 0/2] fixes to bnxt PMD Ajit Khaparde
2017-07-25  3:32 ` [dpdk-dev] [PATCH 1/2] net/bnxt: check current vlan anti spoof value before setting new value Ajit Khaparde
2017-07-31 11:25   ` Ferruh Yigit
2017-07-25  3:32 ` [dpdk-dev] [PATCH 2/2] net/bnxt: fix arguments to _rte_eth_dev_callback_process Ajit Khaparde
2017-07-31 11:19   ` Ferruh Yigit
2017-07-31 11:27     ` Ferruh Yigit
2017-07-31 16:24       ` [dpdk-dev] [PATCH v2] " Ajit Khaparde
2017-07-31 17:29         ` Ferruh Yigit
2021-07-30  5:36 [dpdk-dev] [PATCH 0/2] fixes to bnxt PMD Ajit Khaparde
2021-07-30 14:14 ` Ajit Khaparde

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).