* [PATCH net-next v6 2/3] nfp flower action: Modified to use VLAN helper functions
@ 2017-11-03 15:50 Manish Kurup
2017-11-06 18:33 ` Pieter Jansen van Vuuren
0 siblings, 1 reply; 2+ messages in thread
From: Manish Kurup @ 2017-11-03 15:50 UTC (permalink / raw)
To: jhs, xiyou.wangcong, jiri, davem, jakub.kicinski,
pieter.jansenvanvuuren, simon.horman, john.hurley, oss-drivers,
netdev
Cc: aring, mrv, kurup.manish, Manish Kurup
Modified netronome nfp flower action to use VLAN helper functions instead
of accessing the structure directly.
Signed-off-by: Manish Kurup <manish.kurup@verizon.com>
---
drivers/net/ethernet/netronome/nfp/flower/action.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/netronome/nfp/flower/action.c b/drivers/net/ethernet/netronome/nfp/flower/action.c
index de64ced..c1c595f 100644
--- a/drivers/net/ethernet/netronome/nfp/flower/action.c
+++ b/drivers/net/ethernet/netronome/nfp/flower/action.c
@@ -58,7 +58,6 @@ nfp_fl_push_vlan(struct nfp_fl_push_vlan *push_vlan,
const struct tc_action *action)
{
size_t act_size = sizeof(struct nfp_fl_push_vlan);
- struct tcf_vlan *vlan = to_vlan(action);
u16 tmp_push_vlan_tci;
push_vlan->head.jump_id = NFP_FL_ACTION_OPCODE_PUSH_VLAN;
@@ -67,8 +66,8 @@ nfp_fl_push_vlan(struct nfp_fl_push_vlan *push_vlan,
push_vlan->vlan_tpid = tcf_vlan_push_proto(action);
tmp_push_vlan_tci =
- FIELD_PREP(NFP_FL_PUSH_VLAN_PRIO, vlan->tcfv_push_prio) |
- FIELD_PREP(NFP_FL_PUSH_VLAN_VID, vlan->tcfv_push_vid) |
+ FIELD_PREP(NFP_FL_PUSH_VLAN_PRIO, tcf_vlan_push_prio(action)) |
+ FIELD_PREP(NFP_FL_PUSH_VLAN_VID, tcf_vlan_push_vid(action)) |
NFP_FL_PUSH_VLAN_CFI;
push_vlan->vlan_tci = cpu_to_be16(tmp_push_vlan_tci);
}
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next v6 2/3] nfp flower action: Modified to use VLAN helper functions
2017-11-03 15:50 [PATCH net-next v6 2/3] nfp flower action: Modified to use VLAN helper functions Manish Kurup
@ 2017-11-06 18:33 ` Pieter Jansen van Vuuren
0 siblings, 0 replies; 2+ messages in thread
From: Pieter Jansen van Vuuren @ 2017-11-06 18:33 UTC (permalink / raw)
To: Manish Kurup
Cc: jhs, xiyou.wangcong, jiri, davem, jakub.kicinski, simon.horman,
john.hurley, oss-drivers, netdev, aring, mrv, Manish Kurup
On Fri, 3 Nov 2017 11:50:25 -0400
Manish Kurup <kurup.manish@gmail.com> wrote:
> Modified netronome nfp flower action to use VLAN helper functions instead
> of accessing the structure directly.
>
> Signed-off-by: Manish Kurup <manish.kurup@verizon.com>
> ---
> drivers/net/ethernet/netronome/nfp/flower/action.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/netronome/nfp/flower/action.c
> b/drivers/net/ethernet/netronome/nfp/flower/action.c index de64ced..c1c595f
> 100644 --- a/drivers/net/ethernet/netronome/nfp/flower/action.c
> +++ b/drivers/net/ethernet/netronome/nfp/flower/action.c
> @@ -58,7 +58,6 @@ nfp_fl_push_vlan(struct nfp_fl_push_vlan *push_vlan,
> const struct tc_action *action)
> {
> size_t act_size = sizeof(struct nfp_fl_push_vlan);
> - struct tcf_vlan *vlan = to_vlan(action);
> u16 tmp_push_vlan_tci;
>
> push_vlan->head.jump_id = NFP_FL_ACTION_OPCODE_PUSH_VLAN;
> @@ -67,8 +66,8 @@ nfp_fl_push_vlan(struct nfp_fl_push_vlan *push_vlan,
> push_vlan->vlan_tpid = tcf_vlan_push_proto(action);
>
> tmp_push_vlan_tci =
> - FIELD_PREP(NFP_FL_PUSH_VLAN_PRIO, vlan->tcfv_push_prio) |
> - FIELD_PREP(NFP_FL_PUSH_VLAN_VID, vlan->tcfv_push_vid) |
> + FIELD_PREP(NFP_FL_PUSH_VLAN_PRIO,
> tcf_vlan_push_prio(action)) |
> + FIELD_PREP(NFP_FL_PUSH_VLAN_VID, tcf_vlan_push_vid(action))
> | NFP_FL_PUSH_VLAN_CFI;
> push_vlan->vlan_tci = cpu_to_be16(tmp_push_vlan_tci);
> }
Thank you for this; you may consider this patch:
Reviewed-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-06 18:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-03 15:50 [PATCH net-next v6 2/3] nfp flower action: Modified to use VLAN helper functions Manish Kurup
2017-11-06 18:33 ` Pieter Jansen van Vuuren
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).