Message ID | 20240116014255.8525-1-ivan.malov@arknetworks.am |
---|---|
State | Accepted |
Commit | da093acc7dde5873e968d30debe50e2c64c6b3ed |
Headers | show |
Series | [ovs-dev,v9,1/1] netdev-offload-dpdk: Replace action PORT_ID with REPRESENTED_PORT. | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/intel-ovs-compilation | fail | test: fail |
On 16/01/2024 01:42, Ivan Malov via dev wrote: > Action PORT_ID has been deprecated. Use REPRESENTED_PORT instead. > > Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am> nit: checkpatch complains about the length of the title but I think it's fine as it's due to the terms and shortening would make it less understandable. I didn't test as I don't have a setup ready, but reviewed code and confirmed that nfp support [0] is included in DPDK 23.11. Acked-by: Kevin Traynor <ktraynor@redhat.com> [0] 010b8fa897 net/nfp: support represented port flow action > --- > v8: split from https://mail.openvswitch.org/pipermail/ovs-dev/2023-June/406049.html > v9: address warnings by 0-robot regarding the summary line > > lib/netdev-offload-dpdk.c | 30 +++++++++++++++++------------- > 1 file changed, 17 insertions(+), 13 deletions(-) > > diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c > index 992627fa2..623005b1c 100644 > --- a/lib/netdev-offload-dpdk.c > +++ b/lib/netdev-offload-dpdk.c > @@ -735,14 +735,15 @@ dump_flow_action(struct ds *s, struct ds *s_extra, > ds_put_cstr(s, "rss / "); > } else if (actions->type == RTE_FLOW_ACTION_TYPE_COUNT) { > ds_put_cstr(s, "count / "); > - } else if (actions->type == RTE_FLOW_ACTION_TYPE_PORT_ID) { > - const struct rte_flow_action_port_id *port_id = actions->conf; > + } else if (actions->type == RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT) { > + const struct rte_flow_action_ethdev *ethdev = actions->conf; > > - ds_put_cstr(s, "port_id "); > - if (port_id) { > - ds_put_format(s, "original %d id %d ", > - port_id->original, port_id->id); > + ds_put_cstr(s, "represented_port "); > + > + if (ethdev) { > + ds_put_format(s, "ethdev_port_id %d ", ethdev->port_id); > } > + > ds_put_cstr(s, "/ "); > } else if (actions->type == RTE_FLOW_ACTION_TYPE_DROP) { > ds_put_cstr(s, "drop / "); > @@ -1776,19 +1777,22 @@ add_count_action(struct flow_actions *actions) > } > > static int > -add_port_id_action(struct flow_actions *actions, > - struct netdev *outdev) > +add_represented_port_action(struct flow_actions *actions, > + struct netdev *outdev) > { > - struct rte_flow_action_port_id *port_id; > + struct rte_flow_action_ethdev *ethdev; > int outdev_id; > > outdev_id = netdev_dpdk_get_port_id(outdev); > if (outdev_id < 0) { > return -1; > } > - port_id = xzalloc(sizeof *port_id); > - port_id->id = outdev_id; > - add_flow_action(actions, RTE_FLOW_ACTION_TYPE_PORT_ID, port_id); > + > + ethdev = xzalloc(sizeof *ethdev); > + ethdev->port_id = outdev_id; > + > + add_flow_action(actions, RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT, ethdev); > + > return 0; > } > > @@ -1808,7 +1812,7 @@ add_output_action(struct netdev *netdev, > return -1; > } > if (!netdev_flow_api_equals(netdev, outdev) || > - add_port_id_action(actions, outdev)) { > + add_represented_port_action(actions, outdev)) { > VLOG_DBG_RL(&rl, "%s: Output to port \'%s\' cannot be offloaded.", > netdev_get_name(netdev), netdev_get_name(outdev)); > ret = -1;
On 16/01/2024 17:19, Kevin Traynor wrote: > On 16/01/2024 01:42, Ivan Malov via dev wrote: >> Action PORT_ID has been deprecated. Use REPRESENTED_PORT instead. >> >> Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am> > > nit: checkpatch complains about the length of the title but I think it's > fine as it's due to the terms and shortening would make it less > understandable. > Actually, nevermind - it is including the [PATCH] prefix here. > I didn't test as I don't have a setup ready, but reviewed code and > confirmed that nfp support [0] is included in DPDK 23.11. > > Acked-by: Kevin Traynor <ktraynor@redhat.com> > > [0] 010b8fa897 net/nfp: support represented port flow action > >> --- >> v8: split from https://mail.openvswitch.org/pipermail/ovs-dev/2023-June/406049.html >> v9: address warnings by 0-robot regarding the summary line >> >> lib/netdev-offload-dpdk.c | 30 +++++++++++++++++------------- >> 1 file changed, 17 insertions(+), 13 deletions(-) >> >> diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c >> index 992627fa2..623005b1c 100644 >> --- a/lib/netdev-offload-dpdk.c >> +++ b/lib/netdev-offload-dpdk.c >> @@ -735,14 +735,15 @@ dump_flow_action(struct ds *s, struct ds *s_extra, >> ds_put_cstr(s, "rss / "); >> } else if (actions->type == RTE_FLOW_ACTION_TYPE_COUNT) { >> ds_put_cstr(s, "count / "); >> - } else if (actions->type == RTE_FLOW_ACTION_TYPE_PORT_ID) { >> - const struct rte_flow_action_port_id *port_id = actions->conf; >> + } else if (actions->type == RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT) { >> + const struct rte_flow_action_ethdev *ethdev = actions->conf; >> >> - ds_put_cstr(s, "port_id "); >> - if (port_id) { >> - ds_put_format(s, "original %d id %d ", >> - port_id->original, port_id->id); >> + ds_put_cstr(s, "represented_port "); >> + >> + if (ethdev) { >> + ds_put_format(s, "ethdev_port_id %d ", ethdev->port_id); >> } >> + >> ds_put_cstr(s, "/ "); >> } else if (actions->type == RTE_FLOW_ACTION_TYPE_DROP) { >> ds_put_cstr(s, "drop / "); >> @@ -1776,19 +1777,22 @@ add_count_action(struct flow_actions *actions) >> } >> >> static int >> -add_port_id_action(struct flow_actions *actions, >> - struct netdev *outdev) >> +add_represented_port_action(struct flow_actions *actions, >> + struct netdev *outdev) >> { >> - struct rte_flow_action_port_id *port_id; >> + struct rte_flow_action_ethdev *ethdev; >> int outdev_id; >> >> outdev_id = netdev_dpdk_get_port_id(outdev); >> if (outdev_id < 0) { >> return -1; >> } >> - port_id = xzalloc(sizeof *port_id); >> - port_id->id = outdev_id; >> - add_flow_action(actions, RTE_FLOW_ACTION_TYPE_PORT_ID, port_id); >> + >> + ethdev = xzalloc(sizeof *ethdev); >> + ethdev->port_id = outdev_id; >> + >> + add_flow_action(actions, RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT, ethdev); >> + >> return 0; >> } >> >> @@ -1808,7 +1812,7 @@ add_output_action(struct netdev *netdev, >> return -1; >> } >> if (!netdev_flow_api_equals(netdev, outdev) || >> - add_port_id_action(actions, outdev)) { >> + add_represented_port_action(actions, outdev)) { >> VLOG_DBG_RL(&rl, "%s: Output to port \'%s\' cannot be offloaded.", >> netdev_get_name(netdev), netdev_get_name(outdev)); >> ret = -1; >
On 1/16/24 19:21, Kevin Traynor wrote: > On 16/01/2024 17:19, Kevin Traynor wrote: >> On 16/01/2024 01:42, Ivan Malov via dev wrote: >>> Action PORT_ID has been deprecated. Use REPRESENTED_PORT instead. >>> >>> Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am> >> >> nit: checkpatch complains about the length of the title but I think it's >> fine as it's due to the terms and shortening would make it less >> understandable. >> > > Actually, nevermind - it is including the [PATCH] prefix here. > >> I didn't test as I don't have a setup ready, but reviewed code and >> confirmed that nfp support [0] is included in DPDK 23.11. >> >> Acked-by: Kevin Traynor <ktraynor@redhat.com> >> >> [0] 010b8fa897 net/nfp: support represented port flow action >> >>> --- >>> v8: split from https://mail.openvswitch.org/pipermail/ovs-dev/2023-June/406049.html >>> v9: address warnings by 0-robot regarding the summary line Thanks, Ivan and Kevin! Applied. Best regards, Ilya Maximets.
On Tue, Jan 16, 2024 at 05:42:55AM +0400, Ivan Malov via dev wrote: > Action PORT_ID has been deprecated. Use REPRESENTED_PORT instead. > > Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am> I did a quick check in drivers, and I think that in v23.11 each driver that uses RTE_FLOW_ACTION_TYPE_PORT_ID has appropriate support for RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT. However, I don't think that is the case for v22.11. So assuming the DPDK version is v23.11 [1], I am happy with this patch. Acked-by: Simon Horman <horms@ovn.org> [1] https://patchwork.ozlabs.org/project/openvswitch/patch/20240115142814.3646692-1-david.marchand@redhat.com/ > --- > v8: split from https://mail.openvswitch.org/pipermail/ovs-dev/2023-June/406049.html > v9: address warnings by 0-robot regarding the summary line > > lib/netdev-offload-dpdk.c | 30 +++++++++++++++++------------- > 1 file changed, 17 insertions(+), 13 deletions(-) ...
diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c index 992627fa2..623005b1c 100644 --- a/lib/netdev-offload-dpdk.c +++ b/lib/netdev-offload-dpdk.c @@ -735,14 +735,15 @@ dump_flow_action(struct ds *s, struct ds *s_extra, ds_put_cstr(s, "rss / "); } else if (actions->type == RTE_FLOW_ACTION_TYPE_COUNT) { ds_put_cstr(s, "count / "); - } else if (actions->type == RTE_FLOW_ACTION_TYPE_PORT_ID) { - const struct rte_flow_action_port_id *port_id = actions->conf; + } else if (actions->type == RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT) { + const struct rte_flow_action_ethdev *ethdev = actions->conf; - ds_put_cstr(s, "port_id "); - if (port_id) { - ds_put_format(s, "original %d id %d ", - port_id->original, port_id->id); + ds_put_cstr(s, "represented_port "); + + if (ethdev) { + ds_put_format(s, "ethdev_port_id %d ", ethdev->port_id); } + ds_put_cstr(s, "/ "); } else if (actions->type == RTE_FLOW_ACTION_TYPE_DROP) { ds_put_cstr(s, "drop / "); @@ -1776,19 +1777,22 @@ add_count_action(struct flow_actions *actions) } static int -add_port_id_action(struct flow_actions *actions, - struct netdev *outdev) +add_represented_port_action(struct flow_actions *actions, + struct netdev *outdev) { - struct rte_flow_action_port_id *port_id; + struct rte_flow_action_ethdev *ethdev; int outdev_id; outdev_id = netdev_dpdk_get_port_id(outdev); if (outdev_id < 0) { return -1; } - port_id = xzalloc(sizeof *port_id); - port_id->id = outdev_id; - add_flow_action(actions, RTE_FLOW_ACTION_TYPE_PORT_ID, port_id); + + ethdev = xzalloc(sizeof *ethdev); + ethdev->port_id = outdev_id; + + add_flow_action(actions, RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT, ethdev); + return 0; } @@ -1808,7 +1812,7 @@ add_output_action(struct netdev *netdev, return -1; } if (!netdev_flow_api_equals(netdev, outdev) || - add_port_id_action(actions, outdev)) { + add_represented_port_action(actions, outdev)) { VLOG_DBG_RL(&rl, "%s: Output to port \'%s\' cannot be offloaded.", netdev_get_name(netdev), netdev_get_name(outdev)); ret = -1;
Action PORT_ID has been deprecated. Use REPRESENTED_PORT instead. Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am> --- v8: split from https://mail.openvswitch.org/pipermail/ovs-dev/2023-June/406049.html v9: address warnings by 0-robot regarding the summary line lib/netdev-offload-dpdk.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-)