From: Ivan Malov <ivan.ma...@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.ma...@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybche...@solarflare.com>
Reviewed-by: Andy Moreton <amore...@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

Reply via email to