From: Nicholas Bellinger
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 with vhost_scsi_map_
From: Nicholas Bellinger
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 logic in commit 14ef9
From: "Michael S. Tsirkin"
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.
This patch is
From: "Michael S. Tsirkin"
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 helpful
to make th
From: "Michael S. Tsirkin"
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
Signed-off-by: He Zhe
---
drivers/vhost/net
From: Nicholas Bellinger
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.
Also update tcm_vhos
From: "Michael S. Tsirkin"
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 mutex, but incomp
From: Nicholas Bellinger
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, rename TCM_VHOST_PREALLOC
From: Nicholas Bellinger
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: Michael S. Tsirkin
Cc:
From: Al Viro
commit 09aaacf02a3e88870ed5cad038a5bc822c947904 upstream
Signed-off-by: Al Viro
Signed-off-by: He Zhe
---
drivers/vhost/net.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index e1e22e0..be414d2 10064
From: Jarno Rajahalme
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(), as is
already done in
From: Wei Zhang
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
gre_cisco_protocol implementation,
From: Alex Wang
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 it timeout, sinc
From: Jarno Rajahalme
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().
Also, make the ovs_f
From: Ben Pfaff
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 the Open vSwitch
From: Jarno Rajahalme
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
ovs_flow_cmd_fill_info(
From: Jarno Rajahalme
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
Signed-off-by: Pravin B Shelar
Signed-off-by: He Zhe
---
net/openvs
From: Andy Zhou
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
kernel components.)
S
From: Pravin B Shelar
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
Acked-by: Kyle Mestery
Signed-off-by: Pravin B Shelar
Signed-off-by: He Zh
From: Jarno Rajahalme
commit 893f139b9a6c00c097b9082a90f3041cfb3a0d20 upstream
Signed-off-by: Jarno Rajahalme
Signed-off-by: Pravin B Shelar
Signed-off-by: He Zhe
---
net/openvswitch/datapath.c | 192 +++--
1 file changed, 116 insertions(+), 76 deletio
From: Jarno Rajahalme
commit d92ab13558599cf73bbc269ce257fe16575d327a upstream
The 'output' argument of the ovs_nla_put_flow() is the one from which
the bits are written to the netlink attributes. For SCTP we
accidentally used the bits from the 'swkey' instead. This caused the
mask attributes
From: Jarno Rajahalme
commit bb6f9a708d4067713afae2e9eb2637f6b4c01ecb upstream
Remove unnecessary locking from functions that are always called with
appropriate locking.
Signed-off-by: Jarno Rajahalme
Signed-off-by: Thomas Graf
Signed-off-by: Pravin B Shelar
Signed-off-by: He Zhe
---
net/o
From: Jarno Rajahalme
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 actions
pointer to NULL in
From: Jarno Rajahalme
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 smaller on 64-bit
systems (
From: Jarno Rajahalme
commit eb07265904d6ee95497aba0f3cbd2ae6d9c39a97 upstream
Incorrect struct name was confusing, even though otherwise
inconsequental.
Signed-off-by: Jarno Rajahalme
Signed-off-by: Pravin B Shelar
Signed-off-by: He Zhe
---
net/openvswitch/flow_table.c | 2 +-
1 file chang
From: Jarno Rajahalme
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 ovs_flow_free() to be called wi
From: Jarno Rajahalme
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
created very rarely s
From: Jarno Rajahalme
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 reply
for OVS_FLOW_CMD
From: Jarno Rajahalme
commit 88d73f6c411ac2f057829b93b3cf202ee551f6cb upstream
We already extract the TCP flags for the key, might as well use that
for stats.
Signed-off-by: Jarno Rajahalme
Acked-by: Pravin B Shelar
Signed-off-by: Jesse Gross
Signed-off-by: He Zhe
---
net/openvswitch/flow.
From: Jarno Rajahalme
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
Signed-off-by: Jesse Gross
Signed-off-by: He
From: Jarno Rajahalme
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 perf reports
and allo
From: Monam Agarwal
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 to that structure.
And in t
From: Joe Perches
commit 1815a8831fb04c60d73627816cb0b596266e9bee upstream
Each use of pr__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 Perches
Signed-off-by:
From: Joe Perches
commit 8c63ff09bddf944ab0033fea97aacfadfffa76de upstream
It's slightly smaller/faster for some architectures.
Signed-off-by: Joe Perches
Signed-off-by: Jesse Gross
Signed-off-by: He Zhe
---
net/openvswitch/actions.c | 4 ++--
net/openvswitch/flow.c | 16 +
From: Daniele Di Proietto
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
Signed-off-by: Jesse Gross
Signed-off-by: He Zhe
---
net/openvswitch
From: Daniele Di Proietto
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 be changed.
Signed-off-by: D
From: Daniele Di Proietto
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 is used
in arithmetic (to avoid
From: Joe Perches
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
Signed-off-by: Jesse Gross
Signed-off-by: He Zhe
---
net/openvswitch/flow_netlink.c | 2 ++
From: Daniele Di Proietto
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
Signed-off-by: Jesse Gross
Signed-of
39 matches
Mail list logo