- 09 Nov, 2014 1 commit
-
-
Pravin B Shelar authored
vport can be compiled as modules, therefore openvswitch needs to export few symbols. Export them as GPL symbols. CC: Thomas Graf <tgraf@noironetworks.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
- 06 Nov, 2014 8 commits
-
-
Pravin B Shelar authored
There are two separate API to allocate and copy actions list. Anytime OVS needs to copy action list, it needs to call both functions. Following patch moves action allocation to copy function to avoid code duplication. Signed-off-by:
Pravin B Shelar <pshelar@nicira.com> Acked-by:
Jarno Rajahalme <jrajahalme@nicira.com>
-
Joe Stringer authored
flow-netlink has netlink related code. Signed-off-by:
Joe Stringer <joestringer@nicira.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
Lorand Jakab authored
The 'flow' memeber was chosen for removal because it's only used in ovs_execute_actions() we can pass it as argument to this function. Signed-off-by:
Lorand Jakab <lojakab@cisco.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
Andy Zhou authored
Avoid recursive read_rcu_lock() by using the lighter weight get_dp_rcu() API. Add proper locking assertions to get_dp(). Signed-off-by:
Andy Zhou <azhou@nicira.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
Joe Stringer authored
Split up ovs_flow_cmd_fill_info() to make it easier to cache parts of a dump reply. This will be used to streamline flow_dump in a future patch. Signed-off-by:
Joe Stringer <joestringer@nicira.com> Acked-by:
Thomas Graf <tgraf@noironetworks.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
Jesse Gross authored
There are many possible ways that a flow can be invalid so we've added logging for most of them. This adds logs for the remaining possible cases so there isn't any ambiguity while debugging. CC: Federico Iezzi <fiezzi@enter.it> Signed-off-by:
Jesse Gross <jesse@nicira.com> Acked-by:
Thomas Graf <tgraf@noironetworks.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
Pravin B Shelar authored
Ths simplifies flow-table-destroy API. No need to pass explicit parameter about context. Signed-off-by:
Pravin B Shelar <pshelar@nicira.com> Acked-by:
Thomas Graf <tgraf@redhat.com>
-
Simon Horman authored
Allow datapath to recognize and extract MPLS labels into flow keys and execute actions which push, pop, and set labels on packets. Based heavily on work by Leo Alterman, Ravi K, Isaku Yamahata and Joe Stringer. Cc: Ravi K <rkerur@gmail.com> Cc: Leo Alterman <lalterman@nicira.com> Cc: Isaku Yamahata <yamahata@valinux.co.jp> Cc: Joe Stringer <joe@wand.net.nz> Signed-off-by:
Simon Horman <horms@verge.net.au> Signed-off-by:
Jesse Gross <jesse@nicira.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
- 28 Oct, 2014 2 commits
-
-
David S. Miller authored
ERROR: "lockdep_ovsl_is_held" [net/openvswitch/vport-gre.ko] undefined! Reported-by:
Alexei Starovoitov <alexei.starovoitov@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thomas Graf authored
The internal and netdev vport remain part of openvswitch.ko. Encap vports including vxlan, gre, and geneve can be built as separate modules and are loaded on demand. Modules can be unloaded after use. Datapath ports keep a reference to the vport module during their lifetime. Allows to remove the error prone maintenance of the global list vport_ops_list. Signed-off-by:
Thomas Graf <tgraf@suug.ch> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 20 Oct, 2014 1 commit
-
-
Florian Westphal authored
skb_gso_segment has three possible return values: 1. a pointer to the first segmented skb 2. an errno value (IS_ERR()) 3. NULL. This can happen when GSO is used for header verification. However, several callers currently test IS_ERR instead of IS_ERR_OR_NULL and would oops when NULL is returned. Note that these call sites should never actually see such a NULL return value; all callers mask out the GSO bits in the feature argument. However, there have been issues with some protocol handlers erronously not respecting the specified feature mask in some cases. It is preferable to get 'have to turn off hw offloading, else slow' reports rather than 'kernel crashes'. Signed-off-by:
Florian Westphal <fw@strlen.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 05 Oct, 2014 3 commits
-
-
Jesse Gross authored
The Openvswitch implementation is completely agnostic to the options that are in use and can handle newly defined options without further work. It does this by simply matching on a byte array of options and allowing userspace to setup flows on this array. Signed-off-by:
Jesse Gross <jesse@nicira.com> Singed-off-by:
Ansis Atteka <aatteka@nicira.com> Signed-off-by:
Andy Zhou <azhou@nicira.com> Acked-by:
Thomas Graf <tgraf@noironetworks.com> Acked-by:
Pravin B Shelar <pshelar@nicira.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Jesse Gross authored
As the size of the flow key grows, it can put some pressure on the stack. This is particularly true in ovs_flow_cmd_set(), which needs several copies of the key on the stack. One of those uses is logically separate, so this factors it out to reduce stack pressure and improve readibility. Signed-off-by:
Jesse Gross <jesse@nicira.com> Signed-off-by:
Andy Zhou <azhou@nicira.com> Acked-by:
Pravin B Shelar <pshelar@nicira.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Jesse Gross authored
Some tunnel formats have mechanisms for indicating that packets are OAM frames that should be handled specially (either as high priority or not forwarded beyond an endpoint). This provides support for allowing those types of packets to be matched. Signed-off-by:
Jesse Gross <jesse@nicira.com> Signed-off-by:
Andy Zhou <azhou@nicira.com> Acked-by:
Pravin B Shelar <pshelar@nicira.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 19 Sep, 2014 1 commit
-
-
Samuel Gauthier authored
Since commit fb5d1e9e ("openvswitch: Build flow cmd netlink reply only if needed."), the new flows are not notified to the listeners of OVS_FLOW_MCGROUP. This commit fixes the problem by using the genl function, ie genl_has_listerners() instead of netlink_has_listeners(). Signed-off-by:
Samuel Gauthier <samuel.gauthier@6wind.com> Signed-off-by:
Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by:
Pravin B Shelar <pshelar@nicira.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 16 Sep, 2014 4 commits
-
-
Andy Zhou authored
Recirc action allows a packet to reenter openvswitch processing. currently openvswitch lookup flow for packet received and execute set of actions on that packet, with help of recirc action we can process/modify the packet and recirculate it back in openvswitch for another pass. OVS hash action calculates 5-tupple hash and set hash in flow-key hash. This can be used along with recirculation for distributing packets among different ports for bond devices. For example: OVS bonding can use following actions: Match on: bond flow; Action: hash, recirc(id) Match on: recirc-id == id and hash lower bits == a; Action: output port_bond_a Signed-off-by:
Andy Zhou <azhou@nicira.com> Acked-by:
Jesse Gross <jesse@nicira.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
Pravin B Shelar authored
Currently tun_key is used for passing tunnel information on ingress and egress path, this cause confusion. Following patch removes its use on ingress path make it egress only parameter. Signed-off-by:
Pravin B Shelar <pshelar@nicira.com> Acked-by:
Andy Zhou <azhou@nicira.com>
-
Pravin B Shelar authored
OVS flow extract is called on packet receive or packet execute code path. Following patch defines separate API for extracting flow-key in packet execute code path. Signed-off-by:
Pravin B Shelar <pshelar@nicira.com> Acked-by:
Andy Zhou <azhou@nicira.com>
-
Pravin B Shelar authored
OVS keeps pointer to packet key in skb->cb, but the packet key is store on stack. This could make code bit tricky. So it is better to get rid of the pointer. Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
- 03 Sep, 2014 1 commit
-
-
Li RongQing authored
distinguish between the dropped and consumed skb, not assume the skb is consumed always Cc: Thomas Graf <tgraf@noironetworks.com> Cc: Pravin Shelar <pshelar@nicira.com> Signed-off-by:
Li RongQing <roy.qing.li@gmail.com> Acked-by:
Pravin B Shelar <pshelar@nicira.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 02 Sep, 2014 1 commit
-
-
Li RongQing authored
The user_skb maybe be leaked if the operation on it failed and codes skipped into the label "out:" without calling genlmsg_unicast. Cc: Pravin Shelar <pshelar@nicira.com> Signed-off-by:
Li RongQing <roy.qing.li@gmail.com> Acked-by:
Pravin B Shelar <pshelar@nicira.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 07 Aug, 2014 1 commit
-
-
Jean Sacren authored
The #include headers net/genetlink.h and linux/genetlink.h both were included twice, so delete each of the duplicate. Signed-off-by:
Jean Sacren <sakiwit@gmail.com> Cc: Pravin Shelar <pshelar@nicira.com> Cc: dev@openvswitch.org Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 29 Jul, 2014 1 commit
-
-
Himangi Saraogi authored
This patch introduces the use of the macro IS_ERR_OR_NULL in place of tests for NULL and IS_ERR. The following Coccinelle semantic patch was used for making the change: @@ expression e; @@ - e == NULL || IS_ERR(e) + IS_ERR_OR_NULL(e) || ... Signed-off-by:
Himangi Saraogi <himangi774@gmail.com> Acked-by:
Julia Lawall <julia.lawall@lip6.fr> Acked-by:
Pravin B Shelar <pshelar@nicira.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 24 Jul, 2014 2 commits
-
-
Andy Zhou authored
In queue_userspace_packet(), the ovs_nla_put_flow return value is not checked. This is fine as long as key_attr_size() returns the correct value. In case it does not, the current code may corrupt buffer memory. Add a run time assertion catch this case to avoid silent failure. Reported-by:
Ben Pfaff <blp@nicira.com> Signed-off-by:
Andy Zhou <azhou@nicira.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
Alex Wang authored
In order to allow handlers directly read upcalls from datapath, we need to support per-handler netlink socket for each vport in datapath. This commit makes this happen. Also, it is guaranteed to be backward compatible with previous branch. Signed-off-by:
Alex Wang <alexw@nicira.com> Acked-by:
Thomas Graf <tgraf@redhat.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
- 17 Jul, 2014 1 commit
-
-
stephen hemminger authored
Generic netlink tables can be const. Signed-off-by:
Stephen Hemminger <stephen@networkplumber.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 01 Jul, 2014 1 commit
-
-
Jiri Pirko authored
This stub now allows userspace to see IFLA_INFO_KIND for ovs master and IFLA_INFO_SLAVE_KIND for slave. Signed-off-by:
Jiri Pirko <jiri@resnulli.us> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 30 Jun, 2014 1 commit
-
-
Alex Wang authored
Due to the race condition in userspace, there is chance that two overlapping megaflows could be installed in datapath. And this causes userspace unable to delete the less inclusive megaflow flow even after it timeout, since the flow_del logic will stop at the first match of masked flow. This commit fixes the bug by making the kernel flow_del and flow_get logic check all masks in that case. Introduced by 03f0d916 (openvswitch: Mega flow implementation). Signed-off-by:
Alex Wang <alexw@nicira.com> Acked-by:
Andy Zhou <azhou@nicira.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
- 29 Jun, 2014 1 commit
-
-
Ben Pfaff authored
Flow statistics need to take into account the TCP flags from the packet currently being processed (in 'key'), not the TCP flags matched by the flow found in the kernel flow table (in 'flow'). This bug made the Open vSwitch userspace fin_timeout action have no effect in many cases. This bug is introduced by commit 88d73f6c (openvswitch: Use TCP flags in the flow key for stats.) Reported-by:
Len Gao <leng@vmware.com> Signed-off-by:
Ben Pfaff <blp@nicira.com> Acked-by:
Jarno Rajahalme <jrajahalme@nicira.com> Acked-by:
Jesse Gross <jesse@nicira.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
- 22 May, 2014 9 commits
-
-
Pravin B Shelar authored
Following patch get rid of struct genl_family_and_ops which is redundant due to changes to struct genl_family. Signed-off-by:
Kyle Mestery <mestery@noironetworks.com> Acked-by:
Kyle Mestery <mestery@noironetworks.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
Jarno Rajahalme authored
Signed-off-by:
Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
Jarno Rajahalme authored
Following patch will be easier to reason about with separate ovs_flow_cmd_new() and ovs_flow_cmd_set() functions. Signed-off-by:
Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
Jarno Rajahalme authored
ovs_flow_cmd_del() now allocates reply (if needed) after the flow has already been removed from the flow table. If the reply allocation fails, a netlink error is signaled with netlink_set_err(), as is already done in ovs_flow_cmd_new_or_set() in the similar situation. Signed-off-by:
Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
Jarno Rajahalme authored
Reduce and clarify locking requirements for ovs_flow_cmd_alloc_info(), ovs_flow_cmd_fill_info() and ovs_flow_cmd_build_info(). A datapath pointer is available only when holding a lock. Change ovs_flow_cmd_fill_info() and ovs_flow_cmd_build_info() to take a dp_ifindex directly, rather than a datapath pointer that is then (only) used to get the dp_ifindex. This is useful, since the dp_ifindex is available even when the datapath pointer is not, both before and after taking a lock, which makes further critical section reduction possible. Make ovs_flow_cmd_alloc_info() take an 'acts' argument instead a 'flow' pointer. This allows some future patches to do the allocation before acquiring the flow pointer. The locking requirements after this patch are: ovs_flow_cmd_alloc_info(): May be called without locking, must not be called while holding the RCU read lock (due to memory allocation). If 'acts' belong to a flow in the flow table, however, then the caller must hold ovs_mutex. ovs_flow_cmd_fill_info(): Either ovs_mutex or RCU read lock must be held. ovs_flow_cmd_build_info(): This calls both of the above, so the caller must hold ovs_mutex. Signed-off-by:
Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
Jarno Rajahalme authored
Move most memory allocations away from the ovs_mutex critical sections. vport allocations still happen while the lock is taken, as changing that would require major refactoring. Also, vports are created very rarely so it should not matter. Change ovs_dp_cmd_get() now only takes the rcu_read_lock(), rather than ovs_lock(), as nothing need to be changed. This was done by ovs_vport_cmd_get() already. Signed-off-by:
Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
Jarno Rajahalme authored
Use netlink_has_listeners() and NLM_F_ECHO flag to determine if a reply is needed or not for OVS_FLOW_CMD_NEW, OVS_FLOW_CMD_SET, or OVS_FLOW_CMD_DEL. Currently, OVS userspace does not request a reply for OVS_FLOW_CMD_NEW, but usually does for OVS_FLOW_CMD_DEL, as stats may have changed. Signed-off-by:
Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
Jarno Rajahalme authored
Remove unnecessary locking from functions that are always called with appropriate locking. Signed-off-by:
Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by:
Thomas Graf <tgraf@redhat.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
Jarno Rajahalme authored
Flow SET can accept an empty set of actions, with the intended semantics of leaving existing actions unmodified. This seems to have been brokin after OVS 1.7, as we have assigned the flow's actions pointer to NULL in this case, but we never check for the NULL pointer later on. This patch restores the intended behavior and documents it in the include/linux/openvswitch.h. Signed-off-by:
Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by:
Pravin B Shelar <pshelar@nicira.com>
-
- 16 May, 2014 1 commit
-
-
Jarno Rajahalme authored
The 5-tuple optimization becomes unnecessary with a later per-NUMA node stats patch. Remove it first to make the changes easier to grasp. Signed-off-by:
Jarno Rajahalme <jrajahalme@nicira.com> Signed-off-by:
Jesse Gross <jesse@nicira.com>
-