diff mbox series

[ovs-dev,2/6] netdev-offload-dpdk: Introduce a dump_port_id helper function

Message ID 20210531064613.30636-3-noae@nvidia.com
State New
Headers show
Series Multiple destinations | expand

Commit Message

Noa Levy May 31, 2021, 6:46 a.m. UTC
Introduce a helper function as a pre-step towards supporting offload
multiple desinations.

Signed-off-by: Noa Levy <noae@nvidia.com>
---
 lib/netdev-offload-dpdk.c | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

Comments

0-day Robot May 31, 2021, 10 a.m. UTC | #1
Bleep bloop.  Greetings Noa Levy, 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.


git-am:
error: sha1 information is lacking or useless (lib/netdev-offload-dpdk.c).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 netdev-offload-dpdk: Introduce a dump_port_id helper function
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".


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 d659f3a31..e284cec90 100644
--- a/lib/netdev-offload-dpdk.c
+++ b/lib/netdev-offload-dpdk.c
@@ -447,6 +447,20 @@  dump_vxlan_encap(struct ds *s, const struct rte_flow_item *items)
     }
 }
 
+static void
+dump_port_id(struct ds *s, const void *conf)
+{
+    const struct rte_flow_action_port_id *port_id = 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, "/ ");
+}
+
+
 static void
 dump_flow_action(struct ds *s, struct ds *s_extra,
                  struct flow_actions *flow_actions, int act_index)
@@ -474,14 +488,7 @@  dump_flow_action(struct ds *s, struct ds *s_extra,
     } 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;
-
-        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, "/ ");
+        dump_port_id(s, actions->conf);
     } else if (actions->type == RTE_FLOW_ACTION_TYPE_DROP) {
         ds_put_cstr(s, "drop / ");
     } else if (actions->type == RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ||