DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] common/sfc_efx/base: fix prefix in struct member names
@ 2020-10-29  7:39 Andrew Rybchenko
  2020-10-30 14:20 ` Ferruh Yigit
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Rybchenko @ 2020-10-29  7:39 UTC (permalink / raw)
  To: dev; +Cc: Ivan Malov

From: Ivan Malov <ivan.malov@oktetlabs.ru>

In libefx, a struct member name prefix is an abbreviation for the
struct name. Fix mismatch in the case of action set spec struct.

Fixes: aeacb8458950 ("common/sfc_efx/base: support adding DELIVER action to set")
Fixes: c73d314f790c ("common/sfc_efx/base: support adding VLAN POP action to set")
Fixes: 19aa67196d08 ("common/sfc_efx/base: support adding VLAN PUSH action")
Fixes: 633a89842c17 ("common/sfc_efx/base: support adding MARK action to set")

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 drivers/common/sfc_efx/base/efx_impl.h | 12 +++---
 drivers/common/sfc_efx/base/efx_mae.c  | 52 +++++++++++++-------------
 2 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx_impl.h b/drivers/common/sfc_efx/base/efx_impl.h
index 75dbc84f71..94c730f4f5 100644
--- a/drivers/common/sfc_efx/base/efx_impl.h
+++ b/drivers/common/sfc_efx/base/efx_impl.h
@@ -1758,14 +1758,14 @@ typedef struct efx_mae_action_vlan_push_s {
 
 struct efx_mae_actions_s {
 	/* Bitmap of actions in spec, indexed by action type */
-	uint32_t			emass_actions;
+	uint32_t			ema_actions;
 
-	unsigned int			emass_n_vlan_tags_to_pop;
-	unsigned int			emass_n_vlan_tags_to_push;
-	efx_mae_action_vlan_push_t	emass_vlan_push_descs[
+	unsigned int			ema_n_vlan_tags_to_pop;
+	unsigned int			ema_n_vlan_tags_to_push;
+	efx_mae_action_vlan_push_t	ema_vlan_push_descs[
 	    EFX_MAE_VLAN_PUSH_MAX_NTAGS];
-	uint32_t			emass_mark_value;
-	efx_mport_sel_t			emass_deliver_mport;
+	uint32_t			ema_mark_value;
+	efx_mport_sel_t			ema_deliver_mport;
 };
 
 #endif /* EFSYS_OPT_MAE */
diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index fbf56b14ce..0cf1e0557d 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -928,12 +928,12 @@ efx_mae_action_set_add_vlan_pop(
 		goto fail2;
 	}
 
-	if (spec->emass_n_vlan_tags_to_pop == EFX_MAE_VLAN_POP_MAX_NTAGS) {
+	if (spec->ema_n_vlan_tags_to_pop == EFX_MAE_VLAN_POP_MAX_NTAGS) {
 		rc = ENOTSUP;
 		goto fail3;
 	}
 
-	++spec->emass_n_vlan_tags_to_pop;
+	++(spec->ema_n_vlan_tags_to_pop);
 
 	return (0);
 
@@ -952,10 +952,10 @@ efx_mae_action_set_add_vlan_push(
 	__in				size_t arg_size,
 	__in_bcount(arg_size)		const uint8_t *arg)
 {
-	unsigned int n_tags = spec->emass_n_vlan_tags_to_push;
+	unsigned int n_tags = spec->ema_n_vlan_tags_to_push;
 	efx_rc_t rc;
 
-	if (arg_size != sizeof (*spec->emass_vlan_push_descs)) {
+	if (arg_size != sizeof (*spec->ema_vlan_push_descs)) {
 		rc = EINVAL;
 		goto fail1;
 	}
@@ -970,8 +970,8 @@ efx_mae_action_set_add_vlan_push(
 		goto fail3;
 	}
 
-	memcpy(&spec->emass_vlan_push_descs[n_tags], arg, arg_size);
-	++(spec->emass_n_vlan_tags_to_push);
+	memcpy(&spec->ema_vlan_push_descs[n_tags], arg, arg_size);
+	++(spec->ema_n_vlan_tags_to_push);
 
 	return (0);
 
@@ -1023,7 +1023,7 @@ efx_mae_action_set_add_mark(
 {
 	efx_rc_t rc;
 
-	if (arg_size != sizeof (spec->emass_mark_value)) {
+	if (arg_size != sizeof (spec->ema_mark_value)) {
 		rc = EINVAL;
 		goto fail1;
 	}
@@ -1033,7 +1033,7 @@ efx_mae_action_set_add_mark(
 		goto fail2;
 	}
 
-	memcpy(&spec->emass_mark_value, arg, arg_size);
+	memcpy(&spec->ema_mark_value, arg, arg_size);
 
 	return (0);
 
@@ -1052,7 +1052,7 @@ efx_mae_action_set_add_deliver(
 {
 	efx_rc_t rc;
 
-	if (arg_size != sizeof (spec->emass_deliver_mport)) {
+	if (arg_size != sizeof (spec->ema_deliver_mport)) {
 		rc = EINVAL;
 		goto fail1;
 	}
@@ -1062,7 +1062,7 @@ efx_mae_action_set_add_deliver(
 		goto fail2;
 	}
 
-	memcpy(&spec->emass_deliver_mport, arg, arg_size);
+	memcpy(&spec->ema_deliver_mport, arg, arg_size);
 
 	return (0);
 
@@ -1149,7 +1149,7 @@ efx_mae_action_set_spec_populate(
 
 	action_mask = (1U << type);
 
-	if ((spec->emass_actions & action_mask) != 0) {
+	if ((spec->ema_actions & action_mask) != 0) {
 		/* The action set already contains this action. */
 		if ((efx_mae_action_repeat_map & action_mask) == 0) {
 			/* Cannot add another non-repeatable action. */
@@ -1164,7 +1164,7 @@ efx_mae_action_set_spec_populate(
 		uint32_t later_actions_mask =
 		    strict_ordered_map & ~(action_mask | (action_mask - 1));
 
-		if ((spec->emass_actions & later_actions_mask) != 0) {
+		if ((spec->ema_actions & later_actions_mask) != 0) {
 			/* Cannot add an action after later ordered actions. */
 			rc = ENOTSUP;
 			goto fail3;
@@ -1177,7 +1177,7 @@ efx_mae_action_set_spec_populate(
 			goto fail4;
 	}
 
-	spec->emass_actions |= action_mask;
+	spec->ema_actions |= action_mask;
 
 	return (0);
 
@@ -1622,48 +1622,48 @@ efx_mae_action_set_alloc(
 	    MAE_ACTION_SET_ALLOC_IN_ENCAP_HEADER_ID, EFX_MAE_RSRC_ID_INVALID);
 
 	MCDI_IN_SET_DWORD_FIELD(req, MAE_ACTION_SET_ALLOC_IN_FLAGS,
-	    MAE_ACTION_SET_ALLOC_IN_VLAN_POP, spec->emass_n_vlan_tags_to_pop);
+	    MAE_ACTION_SET_ALLOC_IN_VLAN_POP, spec->ema_n_vlan_tags_to_pop);
 
-	if (spec->emass_n_vlan_tags_to_push > 0) {
+	if (spec->ema_n_vlan_tags_to_push > 0) {
 		unsigned int outer_tag_idx;
 
 		MCDI_IN_SET_DWORD_FIELD(req, MAE_ACTION_SET_ALLOC_IN_FLAGS,
 		    MAE_ACTION_SET_ALLOC_IN_VLAN_PUSH,
-		    spec->emass_n_vlan_tags_to_push);
+		    spec->ema_n_vlan_tags_to_push);
 
-		if (spec->emass_n_vlan_tags_to_push ==
+		if (spec->ema_n_vlan_tags_to_push ==
 		    EFX_MAE_VLAN_PUSH_MAX_NTAGS) {
 			MCDI_IN_SET_WORD(req,
 			    MAE_ACTION_SET_ALLOC_IN_VLAN1_PROTO_BE,
-			    spec->emass_vlan_push_descs[0].emavp_tpid_be);
+			    spec->ema_vlan_push_descs[0].emavp_tpid_be);
 			MCDI_IN_SET_WORD(req,
 			    MAE_ACTION_SET_ALLOC_IN_VLAN1_TCI_BE,
-			    spec->emass_vlan_push_descs[0].emavp_tci_be);
+			    spec->ema_vlan_push_descs[0].emavp_tci_be);
 		}
 
-		outer_tag_idx = spec->emass_n_vlan_tags_to_push - 1;
+		outer_tag_idx = spec->ema_n_vlan_tags_to_push - 1;
 
 		MCDI_IN_SET_WORD(req, MAE_ACTION_SET_ALLOC_IN_VLAN0_PROTO_BE,
-		    spec->emass_vlan_push_descs[outer_tag_idx].emavp_tpid_be);
+		    spec->ema_vlan_push_descs[outer_tag_idx].emavp_tpid_be);
 		MCDI_IN_SET_WORD(req, MAE_ACTION_SET_ALLOC_IN_VLAN0_TCI_BE,
-		    spec->emass_vlan_push_descs[outer_tag_idx].emavp_tci_be);
+		    spec->ema_vlan_push_descs[outer_tag_idx].emavp_tci_be);
 	}
 
-	if ((spec->emass_actions & (1U << EFX_MAE_ACTION_FLAG)) != 0) {
+	if ((spec->ema_actions & (1U << EFX_MAE_ACTION_FLAG)) != 0) {
 		MCDI_IN_SET_DWORD_FIELD(req, MAE_ACTION_SET_ALLOC_IN_FLAGS,
 		    MAE_ACTION_SET_ALLOC_IN_FLAG, 1);
 	}
 
-	if ((spec->emass_actions & (1U << EFX_MAE_ACTION_MARK)) != 0) {
+	if ((spec->ema_actions & (1U << EFX_MAE_ACTION_MARK)) != 0) {
 		MCDI_IN_SET_DWORD_FIELD(req, MAE_ACTION_SET_ALLOC_IN_FLAGS,
 		    MAE_ACTION_SET_ALLOC_IN_MARK, 1);
 
 		MCDI_IN_SET_DWORD(req,
-		    MAE_ACTION_SET_ALLOC_IN_MARK_VALUE, spec->emass_mark_value);
+		    MAE_ACTION_SET_ALLOC_IN_MARK_VALUE, spec->ema_mark_value);
 	}
 
 	MCDI_IN_SET_DWORD(req,
-	    MAE_ACTION_SET_ALLOC_IN_DELIVER, spec->emass_deliver_mport.sel);
+	    MAE_ACTION_SET_ALLOC_IN_DELIVER, spec->ema_deliver_mport.sel);
 
 	MCDI_IN_SET_DWORD(req, MAE_ACTION_SET_ALLOC_IN_SRC_MAC_ID,
 	    MC_CMD_MAE_MAC_ADDR_ALLOC_OUT_MAC_ID_NULL);
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH] common/sfc_efx/base: fix prefix in struct member names
  2020-10-29  7:39 [dpdk-dev] [PATCH] common/sfc_efx/base: fix prefix in struct member names Andrew Rybchenko
@ 2020-10-30 14:20 ` Ferruh Yigit
  2020-11-02  9:22   ` Ivan Malov
  0 siblings, 1 reply; 6+ messages in thread
From: Ferruh Yigit @ 2020-10-30 14:20 UTC (permalink / raw)
  To: Andrew Rybchenko, dev; +Cc: Ivan Malov

On 10/29/2020 7:39 AM, Andrew Rybchenko wrote:
> From: Ivan Malov <ivan.malov@oktetlabs.ru>
> 
> In libefx, a struct member name prefix is an abbreviation for the
> struct name. Fix mismatch in the case of action set spec struct.
> 
> Fixes: aeacb8458950 ("common/sfc_efx/base: support adding DELIVER action to set")
> Fixes: c73d314f790c ("common/sfc_efx/base: support adding VLAN POP action to set")
> Fixes: 19aa67196d08 ("common/sfc_efx/base: support adding VLAN PUSH action")
> Fixes: 633a89842c17 ("common/sfc_efx/base: support adding MARK action to set")
> 
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> Reviewed-by: Andy Moreton <amoreton@xilinx.com>

Squashed into relevant commit in next-net, thanks.
Please confirm it from latest head of next-net.

Unfortunately this will cause conflicts to the vendor sub-trees.

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

* Re: [dpdk-dev] [PATCH] common/sfc_efx/base: fix prefix in struct member names
  2020-10-30 14:20 ` Ferruh Yigit
@ 2020-11-02  9:22   ` Ivan Malov
  2020-11-02 10:45     ` Ferruh Yigit
  0 siblings, 1 reply; 6+ messages in thread
From: Ivan Malov @ 2020-11-02  9:22 UTC (permalink / raw)
  To: Ferruh Yigit, Andrew Rybchenko, dev

Hi Ferruh,

Many thanks for your help.

It looks like I forgot to add the line
Fixes: 0902ed140fcf("common/sfc_efx/base: add MAE action set 
provisioning APIs")
to the commit log of the patch.

Currently, the said commit has old suffix used in it:

drivers/common/sfc_efx/base/efx_mae.c:927: 
MAE_ACTION_SET_ALLOC_IN_DELIVER, spec->emass_deliver_mport.sel);

The point at which this wrong line is fixed to "emass -> ema" is
0f41b86eff7e ("common/sfc_efx/base: support adding FLAG action to set")
that is, an irrelevant patch.

I apologise for any inconvenience. Does fixing these two commits resolve 
the conflicts?

On 30/10/2020 17:20, Ferruh Yigit wrote:
> On 10/29/2020 7:39 AM, Andrew Rybchenko wrote:
>> From: Ivan Malov <ivan.malov@oktetlabs.ru>
>>
>> In libefx, a struct member name prefix is an abbreviation for the
>> struct name. Fix mismatch in the case of action set spec struct.
>>
>> Fixes: aeacb8458950 ("common/sfc_efx/base: support adding DELIVER 
>> action to set")
>> Fixes: c73d314f790c ("common/sfc_efx/base: support adding VLAN POP 
>> action to set")
>> Fixes: 19aa67196d08 ("common/sfc_efx/base: support adding VLAN PUSH 
>> action")
>> Fixes: 633a89842c17 ("common/sfc_efx/base: support adding MARK action 
>> to set")
>>
>> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
>> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
> 
> Squashed into relevant commit in next-net, thanks.
> Please confirm it from latest head of next-net.
> 
> Unfortunately this will cause conflicts to the vendor sub-trees.

-- 
Ivan M

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

* Re: [dpdk-dev] [PATCH] common/sfc_efx/base: fix prefix in struct member names
  2020-11-02  9:22   ` Ivan Malov
@ 2020-11-02 10:45     ` Ferruh Yigit
  2020-11-02 11:18       ` Ferruh Yigit
  0 siblings, 1 reply; 6+ messages in thread
From: Ferruh Yigit @ 2020-11-02 10:45 UTC (permalink / raw)
  To: Ivan Malov, Andrew Rybchenko, dev

On 11/2/2020 9:22 AM, Ivan Malov wrote:
> Hi Ferruh,
> 
> Many thanks for your help.
> 
> It looks like I forgot to add the line
> Fixes: 0902ed140fcf("common/sfc_efx/base: add MAE action set provisioning APIs")
> to the commit log of the patch.
> 
> Currently, the said commit has old suffix used in it:
> 
> drivers/common/sfc_efx/base/efx_mae.c:927: MAE_ACTION_SET_ALLOC_IN_DELIVER, 
> spec->emass_deliver_mport.sel);
> 
> The point at which this wrong line is fixed to "emass -> ema" is
> 0f41b86eff7e ("common/sfc_efx/base: support adding FLAG action to set")
> that is, an irrelevant patch.
> 

Thanks for catching it, fixing it now.

> I apologise for any inconvenience. Does fixing these two commits resolve the 
> conflicts?
> 
> On 30/10/2020 17:20, Ferruh Yigit wrote:
>> On 10/29/2020 7:39 AM, Andrew Rybchenko wrote:
>>> From: Ivan Malov <ivan.malov@oktetlabs.ru>
>>>
>>> In libefx, a struct member name prefix is an abbreviation for the
>>> struct name. Fix mismatch in the case of action set spec struct.
>>>
>>> Fixes: aeacb8458950 ("common/sfc_efx/base: support adding DELIVER action to 
>>> set")
>>> Fixes: c73d314f790c ("common/sfc_efx/base: support adding VLAN POP action to 
>>> set")
>>> Fixes: 19aa67196d08 ("common/sfc_efx/base: support adding VLAN PUSH action")
>>> Fixes: 633a89842c17 ("common/sfc_efx/base: support adding MARK action to set")
>>>
>>> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
>>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
>>> Reviewed-by: Andy Moreton <amoreton@xilinx.com>
>>
>> Squashed into relevant commit in next-net, thanks.
>> Please confirm it from latest head of next-net.
>>
>> Unfortunately this will cause conflicts to the vendor sub-trees.
> 


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

* Re: [dpdk-dev] [PATCH] common/sfc_efx/base: fix prefix in struct member names
  2020-11-02 10:45     ` Ferruh Yigit
@ 2020-11-02 11:18       ` Ferruh Yigit
  2020-11-02 12:03         ` Ivan Malov
  0 siblings, 1 reply; 6+ messages in thread
From: Ferruh Yigit @ 2020-11-02 11:18 UTC (permalink / raw)
  To: Ivan Malov, Andrew Rybchenko, dev

On 11/2/2020 10:45 AM, Ferruh Yigit wrote:
> On 11/2/2020 9:22 AM, Ivan Malov wrote:
>> Hi Ferruh,
>>
>> Many thanks for your help.
>>
>> It looks like I forgot to add the line
>> Fixes: 0902ed140fcf("common/sfc_efx/base: add MAE action set provisioning APIs")
>> to the commit log of the patch.
>>
>> Currently, the said commit has old suffix used in it:
>>
>> drivers/common/sfc_efx/base/efx_mae.c:927: MAE_ACTION_SET_ALLOC_IN_DELIVER, 
>> spec->emass_deliver_mport.sel);
>>
>> The point at which this wrong line is fixed to "emass -> ema" is
>> 0f41b86eff7e ("common/sfc_efx/base: support adding FLAG action to set")
>> that is, an irrelevant patch.
>>
> 
> Thanks for catching it, fixing it now.
> 

Done, can you please check again the next-net/main?


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

* Re: [dpdk-dev] [PATCH] common/sfc_efx/base: fix prefix in struct member names
  2020-11-02 11:18       ` Ferruh Yigit
@ 2020-11-02 12:03         ` Ivan Malov
  0 siblings, 0 replies; 6+ messages in thread
From: Ivan Malov @ 2020-11-02 12:03 UTC (permalink / raw)
  To: Ferruh Yigit, Andrew Rybchenko, dev

On 02/11/2020 14:18, Ferruh Yigit wrote:
> On 11/2/2020 10:45 AM, Ferruh Yigit wrote:
>> On 11/2/2020 9:22 AM, Ivan Malov wrote:
>>> Hi Ferruh,
>>>
>>> Many thanks for your help.
>>>
>>> It looks like I forgot to add the line
>>> Fixes: 0902ed140fcf("common/sfc_efx/base: add MAE action set 
>>> provisioning APIs")
>>> to the commit log of the patch.
>>>
>>> Currently, the said commit has old suffix used in it:
>>>
>>> drivers/common/sfc_efx/base/efx_mae.c:927: 
>>> MAE_ACTION_SET_ALLOC_IN_DELIVER, spec->emass_deliver_mport.sel);
>>>
>>> The point at which this wrong line is fixed to "emass -> ema" is
>>> 0f41b86eff7e ("common/sfc_efx/base: support adding FLAG action to set")
>>> that is, an irrelevant patch.
>>>
>>
>> Thanks for catching it, fixing it now.
>>
> 
> Done, can you please check again the next-net/main?

Brilliant! Many-many thanks to you for applying the fix.

-- 
Ivan M

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

end of thread, other threads:[~2020-11-02 12:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29  7:39 [dpdk-dev] [PATCH] common/sfc_efx/base: fix prefix in struct member names Andrew Rybchenko
2020-10-30 14:20 ` Ferruh Yigit
2020-11-02  9:22   ` Ivan Malov
2020-11-02 10:45     ` Ferruh Yigit
2020-11-02 11:18       ` Ferruh Yigit
2020-11-02 12:03         ` Ivan Malov

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