From patchwork Thu Oct 29 07:39:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Rybchenko X-Patchwork-Id: 82703 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 56B4BA04B5; Thu, 29 Oct 2020 08:40:11 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B337CAA1F; Thu, 29 Oct 2020 08:40:09 +0100 (CET) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id C9342A8E9 for ; Thu, 29 Oct 2020 08:40:08 +0100 (CET) Received: from mx1-us1.ppe-hosted.com (unknown [10.7.65.60]) by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 46E7660083 for ; Thu, 29 Oct 2020 07:40:07 +0000 (UTC) Received: from us4-mdac16-32.ut7.mdlocal (unknown [10.7.66.145]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 46E932009A for ; Thu, 29 Oct 2020 07:40:07 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.7.66.33]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id CD98E1C0052 for ; Thu, 29 Oct 2020 07:40:05 +0000 (UTC) Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 63B98A8006D for ; Thu, 29 Oct 2020 07:40:05 +0000 (UTC) Received: from ukex01.SolarFlarecom.com (10.17.10.4) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 29 Oct 2020 07:40:01 +0000 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 29 Oct 2020 07:40:01 +0000 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id 09T7e1Pp021569; Thu, 29 Oct 2020 07:40:01 GMT Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 270A51613A9; Thu, 29 Oct 2020 07:40:01 +0000 (GMT) From: Andrew Rybchenko To: CC: Ivan Malov Date: Thu, 29 Oct 2020 07:39:45 +0000 Message-ID: <1603957185-29309-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.6.1012-25754.003 X-TM-AS-Result: No-0.157300-8.000000-10 X-TMASE-MatchedRID: uPMcGyNAiaYm5YKB3MVCSgGdJZ3Knh6hAp+UH372RZUZwGrh4y4izE90 RLIMhJ7Dzt1QTyCqmMM3GtUOqefvamowheuziK0qLbjXqdzdtCV6i696PjRPiAaYevV4zG3ZQBz oPKhLasiT0DaWKLC6wECI2KYyvOZpLkCtrbHoRZqtIAhaF1t67zVfUuzvrtymR2YNIFh+clFCZn 37VQFgvdC5JUtUrWlZQyvM07liX/NiL/ws9tKSaRjDRPpHuqhaMHi1Ydy2WEiLun01yTNk6/6NZ thKIM9QD9pJQkNbenxKMuVi6C1rCh8TzIzimOwPC24oEZ6SpSmcfuxsiY4QFM1zIxTeJKy6WG9j FcOFqRMjaG10cEL9awdFGN5FHfdyYA6ggzVC6TSYNhBdZmPRIfBKEmEBFeCfZVprNhD1C+fPSv2 PFxaH5eQDw6tgd3AMZ9iVj/KhX/RSnoQc5vb5zuQdkM7ndBLCYDttQUGqHZU= X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--0.157300-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.6.1012-25754.003 X-MDID: 1603957206-1uW5rfdBUruo X-PPE-DISP: 1603957206;1uW5rfdBUruo Subject: [dpdk-dev] [PATCH] common/sfc_efx/base: fix prefix in struct member names X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Ivan Malov 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 Signed-off-by: Andrew Rybchenko Reviewed-by: Andy Moreton --- 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);