diff mbox series

[ovs-dev,v8,1/1] netdev-offload-dpdk: replace action PORT_ID with REPRESENTED_PORT

Message ID 20240116004848.7957-1-ivan.malov@arknetworks.am
State Superseded
Headers show
Series [ovs-dev,v8,1/1] netdev-offload-dpdk: replace action PORT_ID with REPRESENTED_PORT | expand

Checks

Context Check Description
ovsrobot/apply-robot warning apply and check: warning
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/intel-ovs-compilation success test: success

Commit Message

Ivan Malov Jan. 16, 2024, 12:48 a.m. UTC
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

 lib/netdev-offload-dpdk.c | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)

Comments

0-day Robot Jan. 16, 2024, 1:20 a.m. UTC | #1
Bleep bloop.  Greetings Ivan Malov, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
WARNING: The subject summary should start with a capital.
WARNING: The subject summary should end with a dot.
Subject: netdev-offload-dpdk: replace action PORT_ID with REPRESENTED_PORT
Lines checked: 80, Warnings: 2, Errors: 0


Please check this out.  If you feel there has been an error, please email aconole@redhat.com

Thanks,
0-day Robot
diff mbox series

Patch

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;