mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
datapath: add Ethernet push and pop actions
Upstream commit: commit 91820da6ae85904d95ed53bf3a83f9ec44a6b80a Author: Jiri Benc <jbenc@redhat.com> Date: Thu Nov 10 16:28:23 2016 +0100 openvswitch: add Ethernet push and pop actions It's not allowed to push Ethernet header in front of another Ethernet header. It's not allowed to pop Ethernet header if there's a vlan tag. This preserves the invariant that L3 packet never has a vlan tag. Based on previous versions by Lorand Jakab and Simon Horman. Signed-off-by: Lorand Jakab <lojakab@cisco.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: Jiri Benc <jbenc@redhat.com> Acked-by: Pravin B Shelar <pshelar@ovn.org> Signed-off-by: David S. Miller <davem@davemloft.net> [Committer notes] Fix build with the upstream commit by folding in the required switch case enum handlers. Signed-off-by: Yi Yang <yi.y.yang@intel.com> Signed-off-by: Joe Stringer <joe@ovn.org>
This commit is contained in:
@@ -580,6 +580,8 @@ requires_datapath_assistance(const struct nlattr *a)
|
||||
case OVS_ACTION_ATTR_PUSH_MPLS:
|
||||
case OVS_ACTION_ATTR_POP_MPLS:
|
||||
case OVS_ACTION_ATTR_TRUNC:
|
||||
case OVS_ACTION_ATTR_PUSH_ETH:
|
||||
case OVS_ACTION_ATTR_POP_ETH:
|
||||
case OVS_ACTION_ATTR_CLONE:
|
||||
return false;
|
||||
|
||||
@@ -730,6 +732,8 @@ odp_execute_actions(void *dp, struct dp_packet_batch *batch, bool steal,
|
||||
case OVS_ACTION_ATTR_USERSPACE:
|
||||
case OVS_ACTION_ATTR_RECIRC:
|
||||
case OVS_ACTION_ATTR_CT:
|
||||
case OVS_ACTION_ATTR_PUSH_ETH:
|
||||
case OVS_ACTION_ATTR_POP_ETH:
|
||||
case OVS_ACTION_ATTR_UNSPEC:
|
||||
case __OVS_ACTION_ATTR_MAX:
|
||||
OVS_NOT_REACHED();
|
||||
|
Reference in New Issue
Block a user