summaryrefslogtreecommitdiff
path: root/datapath
Commit message (Collapse)AuthorAgeFilesLines
* Fix misspellings in comments and docs.Andy Hill2013-06-041-1/+1
| | | | | | | | Flagged with: https://github.com/lyda/misspell-check Run with: git ls-files | misspellings -f - Signed-off-by: Andy Hill <hillad@gmail.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* datapath: fix variable names in commentLorand Jakab2013-06-031-2/+2
| | | | | Signed-off-by: Lorand Jakab <lojakab@cisco.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Check for positive packet length in vport_send().Jesse Gross2013-05-131-1/+1
| | | | | | | | | | | | | | When sending a packet, a positive length indicates success and a negative length indicates failure. However, the check for success looked for non-zero values which catches both of these cases. This can result in incorrect stats and leak memory on failure. Introduced by commit be7cd27e44258bdb3c4e7dd8fd7389b5db56d55a (datapath: Unify vport error stats handling.). CC: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Kyle Mestery <kmestery@cisco.com>
* datapath: Free skb dropped by lisp_tnl_send().Jarno Rajahalme2013-05-071-0/+1
| | | | | | | | vport->send functions must free the skbs they themselves report as dropped (return 0). Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
* datapath: Kill VPORT_F_TUN_ID vport flag.Pravin B Shelar2013-05-069-25/+15
| | | | | | | | | VPORT_F_TUN_ID is last remaining flag, once we remove it, flags field from vport-ops can be removed. Since it does not complicate much code, we decided to remove this flag. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Move vport init to first port create.Pravin B Shelar2013-05-065-85/+55
| | | | | | | | | | | vport->init and exit() functions are defined by gre and netdev vport only and both can be moved to first port create. Following patch does same, it moves vport init to respective vport create and gets rid of vport->init() and vport->exit() functions. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Unify vport error stats handling.Pravin B Shelar2013-05-067-57/+37
| | | | | | | | Following patch changes vport->send return type so that vport layer can do error accounting. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* tunneling: Remove struct tnl_vport and tnl_ops.Pravin B Shelar2013-05-067-330/+230
| | | | | | | | | | After flow based tunneling, kernel tunneling is greatly simplified. There is no need to have extra tunneling layer between vport and particular protocol. Following patch removes tunneling struct which make code easy to read. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Remove unused get_config vport op.Jesse Gross2013-05-062-4/+0
| | | | | | | The get_config vport op is left over from old compatibility code, it is neither used nor implemented any more. Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Immediately exit on error in ovs_vport_cmd_set().Jesse Gross2013-05-021-5/+7
| | | | | | | | | | | It is an error to try to change the type of a vport using the set command. However, while we check that this is an error, we still proceed to allocate memory which then gets freed immediately. This stops processing after noticing the error, which does not actually fix a bug but is more correct. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* datapath: Remove unneeded ovs_netdev_get_ifindex()Thomas Graf2013-04-305-12/+3
| | | | | | | | The only user is get_dpifindex(), no need to redirect via the port operations. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Use generic struct pcpu_tstats.Pravin B Shelar2013-04-294-20/+34
| | | | | | | | Rather than defining ovs specific stats struct (vport_percpu_stats), we can use existing pcpu_tstats to achieve exactly same functionality. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Account for RHEL6.4 backports in compat layerThomas Graf2013-04-254-3/+11
| | | | | | | | | Explicitly check the availability of several kernel API functions instead of relying on the kernel version to account for Red Hat Enterprise Linux backports. Signed-off-by: Thomas Graf <tgraf@redhat.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Use openvswitch_handle_frame hook in >=RHEL6.4 to live side by ↵Thomas Graf2013-04-251-4/+32
| | | | | | | | | | | | | | | | | | | side with bridging Due to the missing register rx_handler API in the kernel RHEL6 is based on, the datapath currently falls back to using the bridging hook with the consequence that bridging and OVS cannot be used in parallel on any RHEL6 release. For this purpose, >=RHEL6.4 releases provide a special rx frame hook to be used by OVS. It captures frames at the same location in the stack as the rx_handler would do in more recent kernel releases. In order to store the vport pointer, the net_device's ax25_ptr field is utilized under the assumption that an AX25 device will never be attached to an OVS bridge. Signed-off-by: Thomas Graf <tgraf@redhat.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Fix struct vport comment.Pravin B Shelar2013-04-191-2/+0
| | | | | | | Removes remaining part of comment about `linkname` vport member. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Fix inconsistency in upstream and out of tree ovs module.Pravin B Shelar2013-04-191-2/+1
| | | | | | | | | There is a inconsistent ordering in function ovs_vport_cmd_set() between upstream and out of tree ovs module. Following patch fixes it by releasing lock before calling ovs_notify. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Fix stale comment in flow.c.Pravin B Shelar2013-04-181-3/+3
| | | | | Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Remove vport->linknamePravin B Shelar2013-04-121-2/+0
| | | | | | | This field is no longer used in datapath. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Simplify datapath locking.Pravin B Shelar2013-04-1213-370/+273
| | | | | | | | | | | | Currently OVS uses combination of genl and rtnl lock to protect datapath state. This was done due to networking stack locking. But this has complicated locking and there are few lock ordering issues with new tunneling protocols. Following patch simplifies locking by introducing new ovs mutex and now this lock is used to protect entire ovs state. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Add workqueue API to ovs compat workqueue.Pravin B Shelar2013-04-122-7/+24
| | | | | | | Add work-queue api which are required for next commit. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath.h Fix a stale comment.Andy Zhou2013-04-101-1/+0
| | | | | Signed-off-by: Andy Zhou <azhou@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Don't insert empty OVS_VPORT_ATTR_OPTIONS attributeThomas Graf2013-04-021-6/+8
| | | | | | | | | | | | The port specific options are currently unused resulting in an empty OVS_VPORT_ATTR_OPTIONS nested attribute being inserted into every OVS_VPORT_CMD_GET message. Don't insert OVS_VPORT_ATTR_OPTIONS if no options are present. Signed-off-by: Thomas Graf <tgraf@suug.ch> [jesse: Options are used by tunnels but the concept still applies.] Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Move common genl notify code into ovs_notify()Thomas Graf2013-03-291-20/+16
| | | | | Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Refine Netlink message size calculation and kill FLOW_BUFSIZEThomas Graf2013-03-292-53/+60
| | | | | | | | | | | Kills the FLOW_BUFSIZE constant which needs to be calculated manually and replaces it with key_attr_size() based on nla_total_size(). Calculates the size of datapath messages instead of relying on NLMSG_DEFAULT_SIZE and moves the existing message size calculations into own functions for clarity. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Use nla_memcpy() to memcpy() data from attributesThomas Graf2013-03-291-1/+1
| | | | | | | | | Less error prone as it takes into account the length of both the destination buffer and the source attribute and documents when data is copied from an attribute. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Specify the minimal length of OVS_PACKET_ATTR_PACKET in the policyThomas Graf2013-03-291-3/+6
| | | | | | | | Specifying the minimal length in the policy makes it reuseable and documents the interface. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: net: add ETH_P_802_3_MINSimon Horman2013-03-284-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new constant ETH_P_802_3_MIN, the minimum ethernet type for an 802.3 frame. Frames with a lower value in the ethernet type field are Ethernet II. Also update all the users of this value that David Miller and I could find to use the new constant. Also correct a bug in util.c. The comparison with ETH_P_802_3_MIN should be >= not >. As suggested by Jesse Gross. Compile tested only. Cc: David Miller <davem@davemloft.net> Cc: Jesse Gross <jesse@nicira.com> Cc: Karsten Keil <isdn@linux-pingi.de> Cc: John W. Linville <linville@tuxdriver.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Bart De Schuymer <bart.de.schuymer@pandora.be> Cc: Stephen Hemminger <stephen@networkplumber.org> Cc: Patrick McHardy <kaber@trash.net> Cc: Marcel Holtmann <marcel@holtmann.org> Cc: Gustavo Padovan <gustavo@padovan.org> Cc: Johan Hedberg <johan.hedberg@gmail.com> Cc: linux-bluetooth@vger.kernel.org Cc: netfilter-devel@vger.kernel.org Cc: bridge@lists.linux-foundation.org Cc: linux-wireless@vger.kernel.org Cc: linux1394-devel@lists.sourceforge.net Cc: linux-media@vger.kernel.org Cc: netdev@vger.kernel.org Cc: dev@openvswitch.org Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: correct an invalid BUG_ONHong Zhiguo2013-03-271-1/+1
| | | | | | | table->count is uint32_t Signed-off-by: Hong Zhiguo <honkiko@gmail.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Fix IP ID setting.Jarno Rajahalme2013-03-261-10/+9
| | | | | | | | | | | | | | Eliminate the extra call to ip_select_ident(), and place the __ip_select_ident() call where the ip_select_ident() call was. This fixes two problems: Before, the call to ip_select_ident() did always zero out the value set earlier by __ip_select_ident(). Also, when __ip_select_ident() was called before setting the iph->daddr, ident calculation was possibly based on uninitialized data (but as the result was masked by the later call to ip_select_ident() it was not visible). Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Factor out common code from *_build_header() to ovs_tnl_send().Jarno Rajahalme2013-03-264-28/+9
| | | | | Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Preallocate reply skb in ovs_vport_cmd_set().Jesse Gross2013-03-261-12/+17
| | | | | | | | | | | Allocation of the Netlink notification skb can potentially fail after changing vport configuration. In general, we try to avoid this by undoing any change we made but that is difficult for existing objects. This avoids the problem by preallocating the buffer (which is fixed size). Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* datapath: Remove checks for preinitialized flow.Jesse Gross2013-03-184-34/+25
| | | | | | | | | | Header caching used to store a precomputed flow along with the skb but no longer exists. There were a few remaining checks for those flows, which this removes. It simplifies the code slightly and brings us closer to upstream. Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* datapath: Provide additional RCU backports.Jesse Gross2013-03-152-0/+11
| | | | | | | | A recent commit started using rcu_dereference_raw, hlist_first_rcu, and hlist_next_rcu so this provides backports for kernels where they don't exist. Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: hlist: drop the node parameter from iteratorsSasha Levin2013-03-153-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm not sure why, but the hlist for each entry iterators were conceived list_for_each_entry(pos, head, member) The hlist ones were greedy and wanted an extra parameter: hlist_for_each_entry(tpos, pos, head, member) Why did they need an extra pos parameter? I'm not quite sure. Not only they don't really need it, it also prevents the iterator from looking exactly like the list iterator, which is unfortunate. Besides the semantic patch, there was some manual work required: - Fix up the actual hlist iterators in linux/list.h - Fix up the declaration of other iterators based on the hlist ones. - A very small amount of places were using the 'node' parameter, this was modified to use 'obj->member' instead. - Coccinelle didn't handle the hlist_for_each_entry_safe iterator properly, so those had to be fixed up manually. The semantic patch which is mostly the work of Peter Senna Tschudin is here: @@ iterator name hlist_for_each_entry, hlist_for_each_entry_continue, hlist_for_each_entry_from, hlist_for_each_entry_rcu, hlist_for_each_entry_rcu_bh, hlist_for_each_entry_continue_rcu_bh, for_each_busy_worker, ax25_uid_for_each, ax25_for_each, inet_bind_bucket_for_each, sctp_for_each_hentry, sk_for_each, sk_for_each_rcu, sk_for_each_from, sk_for_each_safe, sk_for_each_bound, hlist_for_each_entry_safe, hlist_for_each_entry_continue_rcu, nr_neigh_for_each, nr_neigh_for_each_safe, nr_node_for_each, nr_node_for_each_safe, for_each_gfn_indirect_valid_sp, for_each_gfn_sp, for_each_host; type T; expression a,c,d,e; identifier b; statement S; @@ -T b; <+... when != b ( hlist_for_each_entry(a, - b, c, d) S | hlist_for_each_entry_continue(a, - b, c) S | hlist_for_each_entry_from(a, - b, c) S | hlist_for_each_entry_rcu(a, - b, c, d) S | hlist_for_each_entry_rcu_bh(a, - b, c, d) S | hlist_for_each_entry_continue_rcu_bh(a, - b, c) S | for_each_busy_worker(a, c, - b, d) S | ax25_uid_for_each(a, - b, c) S | ax25_for_each(a, - b, c) S | inet_bind_bucket_for_each(a, - b, c) S | sctp_for_each_hentry(a, - b, c) S | sk_for_each(a, - b, c) S | sk_for_each_rcu(a, - b, c) S | sk_for_each_from -(a, b) +(a) S + sk_for_each_from(a) S | sk_for_each_safe(a, - b, c, d) S | sk_for_each_bound(a, - b, c) S | hlist_for_each_entry_safe(a, - b, c, d, e) S | hlist_for_each_entry_continue_rcu(a, - b, c) S | nr_neigh_for_each(a, - b, c) S | nr_neigh_for_each_safe(a, - b, c, d) S | nr_node_for_each(a, - b, c) S | nr_node_for_each_safe(a, - b, c, d) S | - for_each_gfn_sp(a, c, d, b) S + for_each_gfn_sp(a, c, d) S | - for_each_gfn_indirect_valid_sp(a, c, d, b) S + for_each_gfn_indirect_valid_sp(a, c, d) S | for_each_host(a, - b, c) S | for_each_host_safe(a, - b, c, d) S | for_each_mesh_entry(a, - b, c, d) S ) ...+> [akpm@linux-foundation.org: drop bogus change from net/ipv4/raw.c] [akpm@linux-foundation.org: drop bogus hunk from net/ipv6/raw.c] [akpm@linux-foundation.org: checkpatch fixes] [akpm@linux-foundation.org: fix warnings] [akpm@linux-foudnation.org: redo intrusive kvm changes] Tested-by: Peter Senna Tschudin <peter.senna@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Cc: Wu Fengguang <fengguang.wu@intel.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Gleb Natapov <gleb@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Backport simplified hlist iterators.Jesse Gross2013-03-153-0/+33
| | | | | | | | The hlist iterator macros were simplified upstream to remove the need for a scratch pointer. This backports those versions, which don't otherwise touch anything else about the data structures. Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: fix drvinfo strings set in driversJiri Pirko2013-03-141-1/+1
| | | | | | | | | | | | | Use strlcpy where possible to ensure the string is \0 terminated. Use always sizeof(string) instead of 32, ETHTOOL_BUSINFO_LEN and custom defines. Use snprintf instead of sprint. Remove unnecessary inits of ->fw_version Remove unnecessary inits of drvinfo struct. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Check for Centos 6.4 backports.Jesse Gross2013-03-133-2/+4
| | | | | | | | Centos 6.4 backported a number of additional functions so our existing versions started causing conflicts. Reported-by: Denis Iskandarov <d.iskandarov@gmail.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Reduce loop limit by one to 4.Jesse Gross2013-03-121-1/+1
| | | | | | | | | | | | | | | | We currently allow five trips through the kernel datapath before dropping the packet to protect the stack. However, there have been a few reports recently involving tunneling that this is still too much. Although it's not a complete solution, this reduces the limit by one to balance safety in common situations with flexibility. Bug #15477 Reported-by: Paul Ingram <paul@nicira.com> Reported-by: 謝秉融 <faithfulman@gmail.com> Signed-off-by: Jesse Gross <jesse@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
* tunneling: Simplify ovs_tnl_send() error handling code.Pravin B Shelar2013-03-051-2/+2
| | | | | | | | | Following commit slightly improves code readability. It is also correctness fix as ip_local_out() was storing error code in err which was not int. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Fix circular dependency between bug.h and kernel.h.Jesse Gross2013-03-063-17/+0
| | | | | | | | | | | | In Linux 3.4 the definition for BUILD_BUG_ON_NOT_POWER_OF_2 was moved from kernel.h to bug.h. On various kernels these header files include each other in various orders (often through a long chain of other header files), which can create circular dependency issues. Since we not longer need this definition, this simply removes the backport. Reported-by: Palo Andi <andi@dis.uniroma1.it> Signed-off-by: Jesse Gross <jesse@nicira.com>
* Tunnel: Cleanup old tunnel infrastructure.Pravin B Shelar2013-03-0411-1203/+333
| | | | | | | | | | | | | | | | Since userspace flow based tunneling code is checked in, the kernel port based tunneling code can be removed. Patch removes following components: - tunnel ports hash table and moved tunnel ports list to individual vports. - Cleaned per tnl-port config. - OVS_KEY_ATTR_TUN_ID action is removed. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com> Bug #15078
* datapath: Increase maximum allocation size of action list.Pravin B Shelar2013-02-281-1/+1
| | | | | | | | | | | | | | | | The switch to flow based tunneling increased the size of each output action in the flow action list. In extreme cases, this can result in the action list exceeding the maximum buffer size. This doubles the maximum buffer size to compensate for the increase in action size. Action list is recieved from netlink callback which is allocating linear-skb, therefore allocating another multi-page buffer would not increase probability of the allocation-failure a lot. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com> Bug #15203
* Revert "datapath: Increase maximum allocation size of action list."Pravin B Shelar2013-02-283-25/+7
| | | | | | | | | This reverts commit 82b0d755094ec675ea1a49b4ae58bc1c5e8e51c2. This patch introduced bug by calling vfree() from interrupt context. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* Add support for LISP tunnelingLorand Jakab2013-02-258-16/+510
| | | | | | | | | | | | | | | | LISP is an experimental layer 3 tunneling protocol, described in RFC 6830. This patch adds support for LISP tunneling. Since LISP encapsulated packets do not carry an Ethernet header, it is removed before encapsulation, and added with hardcoded source and destination MAC addresses after decapsulation. The harcoded MAC chosen for this purpose is the locally administered address 02:00:00:00:00:00. Flow actions can be used to rewrite this MAC for correct reception. As such, this patch is intended to be used for static network configurations, or with a LISP capable controller. Signed-off-by: Lorand Jakab <lojakab@cisco.com> Signed-off-by: Kyle Mestery <kmestery@cisco.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: fix the calculation of checksum for vlan headerCong Wang2013-02-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In vlan_insert_tag(), we insert a 4-byte VLAN header _after_ mac header: memmove(skb->data, skb->data + VLAN_HLEN, 2 * ETH_ALEN); ... veth->h_vlan_proto = htons(ETH_P_8021Q); ... veth->h_vlan_TCI = htons(vlan_tci); so after it, we should recompute the checksum to include these 4 bytes. skb->data still points to the mac header, therefore VLAN header is at (2 * ETH_ALEN = 12) bytes after it, not (ETH_HLEN = 14) bytes. This can also be observed via tcpdump: 0x0000: ffff ffff ffff 5254 005d 6f6e 8100 000a 0x0010: 0806 0001 0800 0604 0001 5254 005d 6f6e 0x0020: c0a8 026e 0000 0000 0000 c0a8 0282 Similar for __pop_vlan_tci(), the vlan header we remove is the one overwritten in: memmove(skb->data + VLAN_HLEN, skb->data, 2 * ETH_ALEN); Therefore the VLAN_HLEN = 4 bytes after 2 * ETH_ALEN is the part we want to sub from checksum. Cc: David S. Miller <davem@davemloft.net> Cc: Jesse Gross <jesse@nicira.com> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
* datapath: Increase maximum allocation size of action list.Pravin B Shelar2013-02-223-7/+25
| | | | | | | | | | | | | | | The switch to flow based tunneling increased the size of each output action in the flow action list. In extreme cases, this can result in the action list exceeding the maximum buffer size. This doubles the maximum buffer size to compensate for the increase in action size. In the common case, most allocations will be less than a page and those uses kmalloc. Therefore, for the majority of situations, this will have no impact. Bug #15203 Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: use skb_mark for route lookupsAnsis Atteka2013-02-201-3/+13
| | | | | | | | | If IPsec policy uses skb mark, then we have to do route look up with skb mark as well. Issue: 14870 Signed-off-by: Ansis Atteka <aatteka@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* ipsec: prepare IPsec for flow based tunnelingAnsis Atteka2013-02-201-1/+1
| | | | | | | | This patch removes unused TNL_F_IPSEC flag. Issue: 14870 Signed-off-by: Ansis Atteka <aatteka@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Remove CAPWAP tunneling support.Pravin B Shelar2013-02-1910-984/+1
| | | | | | | | | | | | The CAPWAP implementation is just the encapsulation format and therefore really not the full protocol. While there were some uses of it (primarily hardware support and UDP transport). But these are most likely better provided by VXLAN. Following patch removes CAPWAP tunneling support. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* datapath: Fix parsing invalid LLC/SNAP ethertypesRich Lane2013-02-191-1/+5
| | | | | | | | | | | | Before this patch, if an LLC/SNAP packet with OUI 00:00:00 had an ethertype less than 1536 the flow key given to userspace in the upcall would contain the invalid ethertype (for example, 3). If userspace attempted to insert a kernel flow for this key it would be rejected by ovs_flow_from_nlattrs. This patch allows OVS to pass the OFTest pktact.DirectBadLlcPackets. Signed-off-by: Rich Lane <rlane@bigswitch.com> Signed-off-by: Jesse Gross <jesse@nicira.com>