summaryrefslogtreecommitdiff
path: root/ofproto/tunnel.h
Commit message (Collapse)AuthorAgeFilesLines
* ofproto-dpif: Avoid creating OpenFlow ports for duplicate tunnels.Ben Pfaff2015-06-051-3/+3
| | | | | | | | | | | | Until now, when two tunnels had an identical configuration, both of them were assigned OpenFlow ports, but only one of those OpenFlow ports was functional. With this commit, only one of the two (or more) identically configured tunnels will be assigned an OpenFlow port number. Reported-by: Keith Holleman <hollemanietf@gmail.com> Signed-off-by: Ben Pfaff <blp@nicira.com> Co-authored-by: Andy Zhou <azhou@nicira.com> Signed-off-by: Andy Zhou <azhou@nicira.com>
* openvswitch: Userspace tunneling.Pravin B Shelar2014-11-121-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Following patch adds support for userspace tunneling. Tunneling needs three more component first is routing table which is configured by caching kernel routes and second is ARP cache which build automatically by snooping arp. And third is tunnel protocol table which list all listening protocols which is populated by vswitchd as tunnel ports are added. GRE and VXLAN protocol support is added in this patch. Tunneling works as follows: On packet receive vswitchd check if this packet is targeted to tunnel port. If it is then vswitchd inserts tunnel pop action which pops header and sends packet to tunnel port. On packet xmit rather than generating Set tunnel action it generate tunnel push action which has tunnel header data. datapath can use tunnel-push action data to generate header for each packet and forward this packet to output port. Since tunnel-push action contains most of packet header vswitchd needs to lookup routing table and arp table to build this action. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com> Acked-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Ben Pfaff <blp@nicira.com>
* tunnel: Convert rwlock to fat-rwlock.Pravin B Shelar2014-11-121-0/+1
| | | | | | | | | | Tunnel lookup is done in slow path but DPDK tunneling slow path is called in PMD context. Therefore it is better to convert rwlock to fat rwlock. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Thomas Graf <tgraf@noironetworks.com> Acked-by: Ben Pfaff <blp@nicira.com>
* tunnel: Clear IPSEC_MARK on input rather than output.Jesse Gross2013-08-131-3/+0
| | | | | | | | | | | | | | | Currently we remove the IPSEC_MARK flag from all packets that are egressing on non-tunnel ports. However, this behavior is confusing if we allow OpenFlow controllers to match and set the pkt_mark field because the tunnel behavior applies even on non-tunnel ports. This instead clears the mark on tunnel input which should have the same effect for tunnel ports. However, on non-tunnel traffic (or even for traffic entering on a tunnel port but leaving on a non- tunnel port) it allows the mark to pass through without change. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com>
* tunnel: Consolidate action code for tunnel port receive.Jesse Gross2013-08-131-0/+2
| | | | | | | | | | There are a couple of operations that are related to receiving a packet on a tunnel port but that affect the actions and therefore need to be performed on the output path. This adds a new hook to do this and consolidates the existing code there. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Andy Zhou <azhou@nicira.com>
* tunnel: Hide 'struct tnl_port' internally.Ethan Jackson2013-06-281-6/+5
| | | | | | | | | This simplifies the tunnel module's interface and prevents us from having to sync 'struct tnl_port' once ofproto-dpif and ofproto-dpif-xlate are disentangled. Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* tunnel: Use ofport_dpif instead of ofport.Ethan Jackson2013-06-281-5/+7
| | | | | | | Necessary in a future patch. Signed-off-by: Ethan Jackson <ethan@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* Create specific types for ofp and odp portAlex Wang2013-06-201-4/+4
| | | | | | | | | | | | Until now, datapath ports and openflow ports were both represented by unsigned integers of various sizes. With implicit conversions, etc., it is easy to mix them up and use one where the other is expected. This commit creates two typedefs, ofp_port_t and odp_port_t. Both of these two types are marked by "__attribute__((bitwise))" so that sparse can be used to detect any misuse. Signed-off-by: Alex Wang <alexw@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* tunnel: Don't wildcard TTL and TOS in some circumstances.Justin Pettit2013-06-131-1/+2
| | | | | | | | | | | | | For tunnels, we need to handle the facet's wildcards specially in a couple of cases: - Don't wildcard TTL for facets if "ttl" option is "inherit". - Never wildcard the ECN bits, since they are always inherited. - Wildcard the rest of the TOS field if the "tos" option is "inherit". Issue #17911 Signed-off-by: Justin Pettit <jpettit@nicira.com>
* tunnel: Make tnl_port_receive() parameter 'const'.Ben Pfaff2013-05-091-1/+1
| | | | | | | | This function no longer has much need to modify its argument, because the caller can now easily do the modification itself, so this commit makes that change. Signed-off-by: Ben Pfaff <blp@nicira.com>
* ipsec: unset IPSEC_MARK flag from skb_mark after tunnel packet is decapsulatedAnsis Atteka2013-03-181-0/+3
| | | | | | | | | | | | | After tunnel packet is unencapsulated we should unset IPsec flag from skb_mark. Otherwise, IPsec policies would be applied one more time on internal interfaces, if there is one. This is especially necessary after we will introduce global, low-priority IPsec drop policy that will make sure that we never let through marked but unencrypted packets. Signed-off-by: Ansis Atteka <aatteka@nicira.com> Issue: 15074
* tunnel: Userspace implementation of tunnel manipulation.Jesse Gross2013-01-281-0/+47
The kernel tunneling code currently needs to handle a large number of operations when tunnel packets are encapsulated and decapsulated. Some examples of this are: finding the correct tunnel port on receive, TTL and ToS inheritance, ECN handling, etc. All of these can be done on a per-flow basis in userspace now that we have both the inner and outer header information, which allows us to both simplify the kernel and take advantage of userspace's information. Once tunnel packets are redirected into this code, the redundant pieces can be removed from other places. Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: Ethan Jackson <ethan@nicira.com>