"dev" <dev-boun...@openvswitch.org> wrote on 06/02/2016 01:24:18 AM:
> From: Simon Horman <simon.hor...@netronome.com> > To: dev@openvswitch.org > Date: 06/02/2016 01:26 AM > Subject: [ovs-dev] [PATCH v11 2/5] userspace: add layer 3 flow and > switching support > Sent by: "dev" <dev-boun...@openvswitch.org> > > From: Lorand Jakab <loja...@cisco.com> > > This commit relaxes the assumption that all packets have an Ethernet > header, and adds support for layer 3 flows. For each packet received on > the Linux kernel datapath the l2 and l3 members of struct ofpbuf are > intialized appropriately, and some functions now expect this (notably > flow_extract()), in order to differentiate between layer 2 and layer 3 > packets. struct flow has now a new 'base_layer' member, because we > cannot assume that a flow has no Ethernet header when eth_src and > eth_dst are 0. For layer 3 packets, the protocol type is still stored > in the eth_type member. > > Switching L2->L3 and L3->L2 are both implemented by adding the pop_eth > and push_eth actions respectively when a transition is detected. The > push_eth action puts 0s on both source and destination MACs. These > addresses can be modified with mod_dl_dst and mod_dl_src actions. > > Added new prerequisite MFP_ETHERNET for fields MFF_ETH_SRC, MFF_ETH_DST, > MFF_VLAN_TCI, MFF_DL_VLAN, MFF_VLAN_VID and MFF_DL_VLAN_PCP. > > Signed-off-by: Lorand Jakab <loja...@cisco.com> > Signed-off-by: Simon Horman <simon.hor...@netronome.com> > Acked-by: Ben Pfaff <b...@ovn.org> > > --- Slight bit-rot: hunk 4 of the include/openvswitch/flow.h patch doesn't apply cleanly for me as of this morning: > @@ -92,7 +101,8 @@ struct flow { > ovs_u128 ct_label; /* Connection label. */ > uint32_t conj_id; /* Conjunction ID. */ > ofp_port_t actset_output; /* Output port in action set. */ > - uint8_t pad2[2]; /* Pad to 64 bits. */ > + uint8_t base_layer; /* Fields start at this layer */ > + uint8_t pad2; /* Pad to 64 bits. */ > > /* L2, Order the same as in the Ethernet header! (64-bit aligned) */ > struct eth_addr dl_dst; /* Ethernet destination address. */ Since the original padding is no longer there (as of commit 117d72495467efaa3eb7e7e4f7d110cd1223b967), I'm loathe to just manually add the patch and continue as I believe I'd need to adjust pad3. Can the rest of this series be rebased? Ryan Moats _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev