diff mbox

[ovs-dev,CudaMailTagged,RFC,v2,13/13] Format ODP action for push_eth/pop_eth flow actions

Message ID 1468344616-11657-1-git-send-email-johnson.li@intel.com
State Changes Requested
Headers show

Commit Message

Johnson.Li July 12, 2016, 5:30 p.m. UTC
Derived from work by Lorand Jakub and Simon Horman.
Cc: Lorand Jakab <lojakab@cisco.com>
Cc: Simon Horman <simon.horman@netronome.com>
---
This is extracted from l3 flow support paches currently
being targeted at net-next by Simon Horman.

Signed-off-by: Johnson Li <johnson.li@intel.com>
diff mbox

Patch

diff --git a/lib/odp-util.c b/lib/odp-util.c
index 8697e00..cc1c16d 100644
--- a/lib/odp-util.c
+++ b/lib/odp-util.c
@@ -935,8 +935,15 @@  format_odp_action(struct ds *ds, const struct nlattr *a)
         ds_put_cstr(ds, "pop_nsh");
         break;
 
-    case OVS_ACTION_ATTR_PUSH_ETH:
+    case OVS_ACTION_ATTR_PUSH_ETH: {
+        const struct ovs_action_push_eth *eth = nl_attr_get(a);
+        ds_put_format(ds, "push_eth(src="ETH_ADDR_FMT",dst="ETH_ADDR_FMT")",
+                      ETH_ADDR_ARGS(eth->addresses.eth_src),
+                      ETH_ADDR_ARGS(eth->addresses.eth_dst));
+        break;
+    }
     case OVS_ACTION_ATTR_POP_ETH:
+        ds_put_cstr(ds, "pop_eth");
         break;
 
     case OVS_ACTION_ATTR_UNSPEC: