[linux-yocto] [PATCH 06/29] openvswitch: flow_netlink: Use pr_fmt to OVS_NLERR output

2014-08-20 Thread zhe.he
From: Joe Perches j...@perches.com commit 2235ad1c3ac545bd8fc2c026be5be16d98b9a891 upstream Add openvswitch: prefix to OVS_NLERR output to match the other OVS_NLERR output of datapath.c Signed-off-by: Joe Perches j...@perches.com Signed-off-by: Jesse Gross je...@nicira.com Signed-off-by: He

[linux-yocto] [PATCH 01/29] openvswitch: use const in some local vars and casts

2014-08-20 Thread zhe.he
From: Daniele Di Proietto daniele.di.proie...@gmail.com commit 7085130bab2f9c5b8d61bff73b01dc8195d0f974 upstream In few functions, const formal parameters are assigned or cast to non-const. These changes suppress warnings if compiled with -Wcast-qual. Signed-off-by: Daniele Di Proietto

[linux-yocto] [PATCH 02/29] openvswitch: avoid warnings in vport_from_priv

2014-08-20 Thread zhe.he
From: Daniele Di Proietto daniele.di.proie...@gmail.com commit d0b4da137508db3d38998eae7f62c0f9699ee08c upstream This change, firstly, avoids declaring the formal parameter const, since it is treated as non const. (to avoid -Wcast-qual) Secondly, it cast the pointer from void* to u8*, since it

[linux-yocto] [PATCH 04/29] openvswitch: Added (unsigned long long) cast in printf

2014-08-20 Thread zhe.he
From: Daniele Di Proietto daniele.di.proie...@gmail.com commit cc23ebf3bb4348fb022c0d25494307459bb2e539 upstream This is necessary, since u64 is not unsigned long long in all architectures: u64 could be also uint64_t. Signed-off-by: Daniele Di Proietto daniele.di.proie...@gmail.com

[linux-yocto] [PATCH 03/29] openvswitch: avoid cast-qual warning in vport_priv

2014-08-20 Thread zhe.he
From: Daniele Di Proietto daniele.di.proie...@gmail.com commit 07dc0602c5976cfc36ccffe5c6d73234f204d585 upstream This function must cast a const value to a non const value. By adding an uintptr_t cast the warning is suppressed. To avoid the cast (proper solution) several function signatures must

[linux-yocto] [PATCH 07/29] openvswitch: Use ether_addr_copy

2014-08-20 Thread zhe.he
From: Joe Perches j...@perches.com commit 8c63ff09bddf944ab0033fea97aacfadfffa76de upstream It's slightly smaller/faster for some architectures. Signed-off-by: Joe Perches j...@perches.com Signed-off-by: Jesse Gross je...@nicira.com Signed-off-by: He Zhe zhe...@windriver.com ---

[linux-yocto] [PATCH 05/29] openvswitch: Use net_ratelimit in OVS_NLERR

2014-08-20 Thread zhe.he
From: Joe Perches j...@perches.com commit 1815a8831fb04c60d73627816cb0b596266e9bee upstream Each use of pr_level_once has a per-site flag. Some of the OVS_NLERR messages look as if seeing them multiple times could be useful, so use net_ratelimit() instead of pr_info_once. Signed-off-by: Joe

[linux-yocto] [PATCH 08/29] openvswitch: Remove 5-tuple optimization.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme jrajaha...@nicira.com commit 23dabf88abb48a866fdb19ee08ebcf1ddd9b1840 upstream 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 jrajaha...@nicira.com

[linux-yocto] [PATCH 09/29] openvswitch: Per NUMA node flow stats.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme jrajaha...@nicira.com commit 63e7959c4b9bd6f791061c460a22d9ee32ae2240 upstream Keep kernel flow stats for each NUMA node rather than each (logical) CPU. This avoids using the per-CPU allocator and removes most of the kernel-side OVS locking overhead otherwise on the top of

[linux-yocto] [PATCH 11/29] openvswitch: Use TCP flags in the flow key for stats.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme jrajaha...@nicira.com commit 88d73f6c411ac2f057829b93b3cf202ee551f6cb upstream We already extract the TCP flags for the key, might as well use that for stats. Signed-off-by: Jarno Rajahalme jrajaha...@nicira.com Acked-by: Pravin B Shelar pshe...@nicira.com Signed-off-by:

[linux-yocto] [PATCH 12/29] net/openvswitch: Use with RCU_INIT_POINTER(x, NULL) in vport-gre.c

2014-08-20 Thread zhe.he
From: Monam Agarwal monamagarwal...@gmail.com commit 944df8ae84d88f5e8eb027990dad2cfa4fbe4be5 upstream This patch replaces rcu_assign_pointer(x, NULL) with RCU_INIT_POINTER(x, NULL) The rcu_assign_pointer() ensures that the initialization of a structure is carried out before storing a pointer

[linux-yocto] [PATCH 18/29] openvswitch: Minimize dp and vport critical sections.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme jrajaha...@nicira.com commit 6093ae9abac18871afd0bbc5cf093dff53112fcb upstream 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

[linux-yocto] [PATCH 16/29] openvswitch: Build flow cmd netlink reply only if needed.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme jrajaha...@nicira.com commit fb5d1e9e127ad1542e5db20cd8620a1509baef69 upstream 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

[linux-yocto] [PATCH 17/29] openvswitch: Make flow mask removal symmetric.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme jrajaha...@nicira.com commit 56c19868e115fcf8d62d843e1b9616bb9837d0db upstream Masks are inserted when flows are inserted to the table, so it is logical to correspondingly remove masks when flows are removed from the table, in ovs_flow_table_remove(). This allows

[linux-yocto] [PATCH 15/29] openvswitch: Clarify locking.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme jrajaha...@nicira.com commit bb6f9a708d4067713afae2e9eb2637f6b4c01ecb upstream Remove unnecessary locking from functions that are always called with appropriate locking. Signed-off-by: Jarno Rajahalme jrajaha...@nicira.com Signed-off-by: Thomas Graf tg...@redhat.com

[linux-yocto] [PATCH 14/29] openvswitch: Avoid assigning a NULL pointer to flow actions.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme jrajaha...@nicira.com commit be52c9e96a6657d117bb0ec6e11438fb246af5c7 upstream 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

[linux-yocto] [PATCH 13/29] openvswitch: Compact sw_flow_key.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme jrajaha...@nicira.com commit 1139e241ec436b9e9610c7a33ac5c6657f87fda1 upstream Minimize padding in sw_flow_key and move 'tp' top the main struct. These changes simplify code when accessing the transport port numbers and the tcp flags, and makes the sw_flow_key 8 bytes

[linux-yocto] [PATCH 19/29] openvswitch: Fix typo.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme jrajaha...@nicira.com commit eb07265904d6ee95497aba0f3cbd2ae6d9c39a97 upstream Incorrect struct name was confusing, even though otherwise inconsequental. Signed-off-by: Jarno Rajahalme jrajaha...@nicira.com Signed-off-by: Pravin B Shelar pshe...@nicira.com Signed-off-by:

[linux-yocto] [PATCH 28/29] openvswitch: Fix tracking of flags seen in TCP flows.

2014-08-20 Thread zhe.he
From: Ben Pfaff b...@nicira.com commit ad55200734c65a3ec5d0c39d6ea904008baea536 upstream 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

[linux-yocto] [PATCH 21/29] openvswitch: Reduce locking requirements.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme jrajaha...@nicira.com commit 0e9796b4af9ef490e203158cb738a5a4986eb75c upstream 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

[linux-yocto] [PATCH 23/29] openvswitch: Split ovs_flow_cmd_new_or_set().

2014-08-20 Thread zhe.he
From: Jarno Rajahalme jrajaha...@nicira.com commit 37bdc87ba00dadd0156db77ba48224d042202435 upstream 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 jrajaha...@nicira.com Signed-off-by: Pravin B

[linux-yocto] [PATCH 26/29] openvswitch: Fix a double free bug for the sample action

2014-08-20 Thread zhe.he
From: Andy Zhou az...@nicira.com commit fe984c08e20f0fc2b4666bf8eeeb02605568387b upstream When sample action returns with an error, the skb has already been freed. This patch fix a bug to make sure we don't free it again. This bug introduced by commit ccb1352e76cff05 (net: Add Open vSwitch

[linux-yocto] [PATCH 25/29] openvswitch: Simplify genetlink code.

2014-08-20 Thread zhe.he
From: Pravin B Shelar pshe...@nicira.com commit 0c200ef94c9492205e18a18c25650cf27939889c upstream 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 mest...@noironetworks.com Acked-by: Kyle Mestery

[linux-yocto] [PATCH 24/29] openvswitch: Minimize ovs_flow_cmd_new|set critical sections.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme jrajaha...@nicira.com commit 893f139b9a6c00c097b9082a90f3041cfb3a0d20 upstream Signed-off-by: Jarno Rajahalme jrajaha...@nicira.com Signed-off-by: Pravin B Shelar pshe...@nicira.com Signed-off-by: He Zhe zhe...@windriver.com --- net/openvswitch/datapath.c | 192

[linux-yocto] [PATCH 20/29] openvswitch: Fix ovs_flow_stats_get/clear RCU dereference.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme jrajaha...@nicira.com commit 86ec8dbae27e5fa2b5d54f10f77286d9ef55732a upstream For ovs_flow_stats_get() using ovsl_dereference() was wrong, since flow dumps call this with RCU read lock. ovs_flow_stats_clear() is always called with ovs_mutex, so can use ovsl_dereference().

[linux-yocto] [PATCH 22/29] openvswitch: Minimize ovs_flow_cmd_del critical section.

2014-08-20 Thread zhe.he
From: Jarno Rajahalme jrajaha...@nicira.com commit aed067783e505bf66dcafa8647d08619eb5b1c55 upstream 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(),

[linux-yocto] [PATCH 27/29] openvswitch: supply a dummy err_handler of gre_cisco_protocol to prevent kernel crash

2014-08-20 Thread zhe.he
From: Wei Zhang asuka@163.com commit e0bb8c44ed5cfcc56b571758ed966ee48779024c upstream When use gre vport, openvswitch register a gre_cisco_protocol but does not supply a err_handler with it. The gre_cisco_err() in net/ipv4/gre_demux.c expect err_handler be provided with the

[linux-yocto] [PATCH 29/29] openvswitch: Use exact lookup for flow_get and flow_del.

2014-08-20 Thread zhe.he
From: Alex Wang al...@nicira.com commit 4a46b24e147dfa9b858026da02cad0bdd4e149d2 upstream 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

[linux-yocto] [PATCH 01/10] vhost: don't open-code sockfd_put()

2014-08-20 Thread zhe.he
From: Al Viro v...@zeniv.linux.org.uk commit 09aaacf02a3e88870ed5cad038a5bc822c947904 upstream Signed-off-by: Al Viro v...@zeniv.linux.org.uk Signed-off-by: He Zhe zhe...@windriver.com --- drivers/vhost/net.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

[linux-yocto] [PATCH 03/10] vhost/scsi: Add preallocation of protection SGLs

2014-08-20 Thread zhe.he
From: Nicholas Bellinger n...@linux-iscsi.org commit b1935f687bb93b207ef690f7debc0e9921fc484f upstream This patch updates tcm_vhost_make_nexus() to pre-allocate per descriptor tcm_vhost_cmd-tvc_prot_sgl[] used to expose protection SGLs from within virtio-scsi guest memory to vhost-scsi. Cc:

[linux-yocto] [PATCH 02/10] vhost/scsi: Move sanity check into vhost_scsi_map_iov_to_sgl

2014-08-20 Thread zhe.he
From: Nicholas Bellinger n...@linux-iscsi.org commit 5a01d08217e39f3d36d3ca160361c7b019ff1598 upstream Move the overflow check for sgl_count TCM_VHOST_PREALLOC_SGLS into vhost_scsi_map_iov_to_sgl() so that it's based on the total number of SGLs for all IOVs, instead of single IOVs. Also,

[linux-yocto] [PATCH 08/10] vhost: move acked_features to VQs

2014-08-20 Thread zhe.he
From: Michael S. Tsirkin m...@redhat.com commit ea16c51433510f7f758382dec5b933fc0797f244 upstream Refactor code to make sure features are only accessed under VQ mutex. This makes everything simpler, no need for RCU here anymore. Signed-off-by: Michael S. Tsirkin m...@redhat.com Signed-off-by:

[linux-yocto] [PATCH 05/10] vhost/scsi: Enable T10 PI IOV - SGL memory mapping

2014-08-20 Thread zhe.he
From: Nicholas Bellinger n...@linux-iscsi.org commit 95e7c4341b8e28dae5204378087c1e2a115abc82 upstream This patch updates vhost_scsi_handle_vq() to check for the existance of virtio_scsi_cmd_req_pi comparing vq-iov[0].iov_len in order to calculate seperate data + protection SGLs from data_num.

[linux-yocto] [PATCH 09/10] vhost: move memory pointer to VQs

2014-08-20 Thread zhe.he
From: Michael S. Tsirkin m...@redhat.com commit 47283bef7ed356629467d1fac61687756e48f254 upstream commit 2ae76693b8bcabf370b981cd00c36cd41d33fabc vhost: replace rcu with mutex replaced rcu sync for memory accesses with VQ mutex locl/unlock. This is correct since all accesses are under VQ

[linux-yocto] [PATCH 06/10] vhost-net: extend device allocation to vmalloc

2014-08-20 Thread zhe.he
From: Michael S. Tsirkin m...@redhat.com commit 23cc5a991c7a9fb7e6d6550e65cee4f4173111c5 upstream Michael Mueller provided a patch to reduce the size of vhost-net structure as some allocations could fail under memory pressure/fragmentation. We are still left with high order allocations though.

[linux-yocto] [PATCH 07/10] vhost: replace rcu with mutex

2014-08-20 Thread zhe.he
From: Michael S. Tsirkin m...@redhat.com commit 98f9ca0a3faa99b7388578d55eccecf272be4038 upstream All memory accesses are done under some VQ mutex. So lock/unlock all VQs is a faster equivalent of synchronize_rcu() for memory access changes. Some guests cause a lot of these changes, so it's

[linux-yocto] [PATCH 04/10] vhost/scsi: Add T10 PI IOV - SGL memory mapping logic

2014-08-20 Thread zhe.he
From: Nicholas Bellinger n...@linux-iscsi.org commit e31885dd901e80d5bd528c1cbedde07ebbf051b2 upstream This patch adds vhost_scsi_map_iov_to_prot() to perform the mapping of T10 data integrity memory between virtio iov + struct scatterlist using get_user_pages_fast() following existing code. As

[linux-yocto] [PATCH 10/10] vhost-scsi: Include prot_bytes into expected data transfer length

2014-08-20 Thread zhe.he
From: Nicholas Bellinger n...@linux-iscsi.org commit 9f977ef7b671f6169eca78bf40f230fe84b7c7e5 upstream This patch updates vhost_scsi_get_tag() to accept the combined expected data transfer length + T10 PI bytes as the value passed into target_submit_cmd(). This is required now that target-core