From: Tonghao Zhang
The bond of openvswitch has not good performance. In some
cases we would recommend that you use Linux bonds instead
of Open vSwitch bonds. In userspace datapath, we wants use
bond to improve bandwidth. The DPDK has implemented it as lib.
These
From: Tonghao Zhang
If users set the interface options with multi-pci or device names
with ',' as a separator, we try to parse it as dpdk-bond args.
For example, set an interface as:
ovs-vsctl add-port br0 dpdk0 -- \
set Interface dpdk0 type=dpdk \
From: Tonghao Zhang
This patch allows users to set the dpdk-bond mode,
such as round_robin, active_backup and balance and so on.
ovs-vsctl add-port br0 dpdk0 -- \
set Interface dpdk0 type=dpdk \
options:dpdk-devargs=:06:00.0,:06:00.1
From: Tonghao Zhang
The bond device in dpdk-17.11 does not support setting mtu,
but dpdk upstream supports it now. For more information, see:
http://dpdk.org/browse/dpdk/commit/?id=55b58a7374554cd1c86f4a13a0e2f54e9ba6fe4d
This patch allows to create bond devices which
From: Tonghao Zhang
netdev_dpdk_bond struct will be a member in netdev_dpdk struct.
and its init/uinit will be done in the common_construct/destruct.
By default, the mode of bond device is active-backup mode.
Signed-off-by: Tonghao Zhang
---
From: Tonghao Zhang
Extend the function, when looking up the dpdk netdev
by port id, if the port id is a slave port id, return
its master device.
The patch changes the function 'netdev_dpdk_lookup_by_port_id'.
Signed-off-by: Tonghao Zhang
From: Tonghao Zhang
This patch implements, mostly the dpdk-bond support.
vswitchd try to parse devargs as dpdk-bond device.
If success, create a bond device and add slave ports
to it. And the bond device id will be set to dev->port_id
as a normal interface.
* check
From: Tonghao Zhang
In some case, we may not use the openvswitch tc to limit the ingress
police rate. And before we add the port to openvswitch bridge, we may
set the ingress policer, so don't remove the ingress when we configured
it in openvswitch.
Signed-off-by: Tonghao Zhang
---
From: Tonghao Zhang
In some case, we may not use the openvswitch tc to limit the ingress
police rate. And before we add the port to openvswitch bridge, we may
set the ingress policer, so don't remove the ingress when we not configured
it in openvswitch.
Signed-off-by: Tonghao Zhang
---
From: Tonghao Zhang
When using the kernel datapath, the upcall don't
add skb hash info relatived. That will introduce
some problem, because the hash of skb is very
important (e.g. vxlan module uses it for udp src port,
tx queue selection on tx path.).
For example, there will be one upcall,
From: Tonghao Zhang
When using the kernel datapath, the upcall don't
add skb hash info relatived. That will introduce
some problem, because the hash of skb is very
important (e.g. vxlan module uses it for udp src port,
tx queue selection on tx path.).
For example, there will be one upcall,
From: Tonghao Zhang
The commit 69c51582ff786 ("dpif-netlink: don't allocate per
thread netlink sockets"), in Open vSwitch ovs-vswitchd, has
changed the number of allocated sockets to just one per port
by moving the socket array from a per handler structure to
a per datapath one. In the kernel
From: Tonghao Zhang
The commit 69c51582ff786 ("dpif-netlink: don't allocate per
thread netlink sockets"), in Open vSwitch ovs-vswitchd, has
changed the number of allocated sockets to just one per port
by moving the socket array from a per handler structure to
a per datapath one. In the kernel
From: Tonghao Zhang
When using the kernel datapath, the upcall don't
include skb hash info relatived. That will introduce
some problem, because the hash of skb is important
in kernel stack. For example, VXLAN module uses
it to select UDP src port. The tx queue selection
may also use the hash in
From: Tonghao Zhang
The nla_put_u16/nla_put_u32 makes sure that
*attrlen is align. The call tree is that:
nla_put_u16/nla_put_u32
-> nla_putattrlen = sizeof(u16) or sizeof(u32)
-> __nla_put attrlen
-> __nla_reserve attrlen
-> skb_put(skb,
From: Tonghao Zhang
When using the kernel datapath, the upcall don't
include skb hash info relatived. That will introduce
some problem, because the hash of skb is important
in kernel stack. For example, VXLAN module uses
it to select UDP src port. The tx queue selection
may also use the hash in
From: Tonghao Zhang
Port the codes to linux upstream and with little changes.
Pravin B Shelar, says:
| mask caches index of mask in mask_list. On packet recv OVS
| need to traverse mask-list to get cached mask. Therefore array
| is better for retrieving cached mask. This also allows better
|
From: Tonghao Zhang
This series patch optimize openvswitch for performance or simplify
codes.
Patch 1, 2, 4: Port Pravin B Shelar patches to
linux upstream with little changes.
Patch 5, 6, 7: Optimize the flow looking up and
simplify the flow hash.
Patch 8, 9: are bugfix.
The performance
From: Tonghao Zhang
The idea of this optimization comes from a patch which
is committed in 2014, openvswitch community. The author
is Pravin B Shelar. In order to get high performance, I
implement it again. Later patches will use it.
Pravin B Shelar, says:
| On every packet OVS needs to lookup
From: Tonghao Zhang
use the specified functions to init resource.
Signed-off-by: Tonghao Zhang
Tested-by: Greg Rose
---
net/openvswitch/datapath.c | 60 +-
1 file changed, 38 insertions(+), 22 deletions(-)
diff --git a/net/openvswitch/datapath.c
From: Tonghao Zhang
When creating and inserting flow-mask, if there is no available
flow-mask, we realloc the mask array. When removing flow-mask,
if necessary, we shrink mask array.
Signed-off-by: Tonghao Zhang
Tested-by: Greg Rose
---
net/openvswitch/flow_table.c | 33
From: Tonghao Zhang
The full looking up on flow table traverses all mask array.
If mask-array is too large, the number of invalid flow-mask
increase, performance will be drop.
One bad case, for example: M means flow-mask is valid and NULL
of flow-mask means deleted.
From: Tonghao Zhang
Port the codes to linux upstream and with little changes.
Pravin B Shelar, says:
| In case hash collision on mask cache, OVS does extra flow
| lookup. Following patch avoid it.
Link:
https://github.com/openvswitch/ovs/commit/0e6efbe2712da03522532dc5e84806a96f6a0dd1
From: Tonghao Zhang
When we destroy the flow tables which may contain the flow_mask,
so release the flow mask struct.
Signed-off-by: Tonghao Zhang
Tested-by: Greg Rose
---
net/openvswitch/flow_table.c | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git
From: Tonghao Zhang
Unlocking of a not locked mutex is not allowed.
Other kernel thread may be in critical section while
we unlock it because of setting user_feature fail.
Fixes: 95a7233c4 ("net: openvswitch: Set OvS recirc_id from tc chain index")
Cc: Paul Blakey
Signed-off-by: Tonghao Zhang
From: Tonghao Zhang
The most case *index < ma->max, and flow-mask is not NULL.
We add un/likely for performance.
Signed-off-by: Tonghao Zhang
Tested-by: Greg Rose
---
net/openvswitch/flow_table.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
From: Tonghao Zhang
Simplify the code and remove the unnecessary BUILD_BUG_ON.
Signed-off-by: Tonghao Zhang
Tested-by: Greg Rose
---
net/openvswitch/flow_table.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/net/openvswitch/flow_table.c
From: Tonghao Zhang
Port the codes to linux upstream and with little changes.
Pravin B Shelar, says:
| In case hash collision on mask cache, OVS does extra flow
| lookup. Following patch avoid it.
Link:
https://github.com/openvswitch/ovs/commit/0e6efbe2712da03522532dc5e84806a96f6a0dd1
From: Tonghao Zhang
The full looking up on flow table traverses all mask array.
If mask-array is too large, the number of invalid flow-mask
increase, performance will be drop.
One bad case, for example: M means flow-mask is valid and NULL
of flow-mask means deleted.
From: Tonghao Zhang
Port the codes to linux upstream and with little changes.
Pravin B Shelar, says:
| mask caches index of mask in mask_list. On packet recv OVS
| need to traverse mask-list to get cached mask. Therefore array
| is better for retrieving cached mask. This also allows better
|
From: Tonghao Zhang
The idea of this optimization comes from a patch which
is committed in 2014, openvswitch community. The author
is Pravin B Shelar. In order to get high performance, I
implement it again. Later patches will use it.
Pravin B Shelar, says:
| On every packet OVS needs to lookup
From: Tonghao Zhang
This series patch optimize openvswitch for performance or simplify
codes.
Patch 1, 2, 4: Port Pravin B Shelar patches to
linux upstream with little changes.
Patch 5, 6, 7: Optimize the flow looking up and
simplify the flow hash.
Patch 8, 9: are bugfix.
The performance
From: Tonghao Zhang
Port the codes to linux upstream and with little changes.
Pravin B Shelar, says:
| In case hash collision on mask cache, OVS does extra flow
| lookup. Following patch avoid it.
Link:
https://github.com/openvswitch/ovs/commit/0e6efbe2712da03522532dc5e84806a96f6a0dd1
From: Tonghao Zhang
The full looking up on flow table traverses all mask array.
If mask-array is too large, the number of invalid flow-mask
increase, performance will be drop.
One bad case, for example: M means flow-mask is valid and NULL
of flow-mask means deleted.
From: Tonghao Zhang
When creating and inserting flow-mask, if there is no available
flow-mask, we realloc the mask array. When removing flow-mask,
if necessary, we shrink mask array.
Signed-off-by: Tonghao Zhang
Tested-by: Greg Rose
Acked-by: William Tu
---
net/openvswitch/flow_table.c | 33
From: Tonghao Zhang
Simplify the code and remove the unnecessary BUILD_BUG_ON.
Signed-off-by: Tonghao Zhang
Tested-by: Greg Rose
Acked-by: William Tu
---
net/openvswitch/flow_table.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/net/openvswitch/flow_table.c
From: Tonghao Zhang
The most case *index < ma->max, and flow-mask is not NULL.
We add un/likely for performance.
Signed-off-by: Tonghao Zhang
Tested-by: Greg Rose
Acked-by: William Tu
---
net/openvswitch/flow_table.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
From: Tonghao Zhang
use the specified functions to init resource.
Signed-off-by: Tonghao Zhang
Tested-by: Greg Rose
---
net/openvswitch/datapath.c | 60 +-
1 file changed, 38 insertions(+), 22 deletions(-)
diff --git a/net/openvswitch/datapath.c
From: Tonghao Zhang
When we destroy the flow tables which may contain the flow_mask,
so release the flow mask struct.
Signed-off-by: Tonghao Zhang
Tested-by: Greg Rose
---
net/openvswitch/flow_table.c | 185 +++
1 file changed, 97 insertions(+), 88
From: Tonghao Zhang
Unlocking of a not locked mutex is not allowed.
Other kernel thread may be in critical section while
we unlock it because of setting user_feature fail.
Fixes: 95a7233c4 ("net: openvswitch: Set OvS recirc_id from tc chain index")
Cc: Paul Blakey
Signed-off-by: Tonghao Zhang
From: Tonghao Zhang
The idea of this optimization comes from a patch which
is committed in 2014, openvswitch community. The author
is Pravin B Shelar. In order to get high performance, I
implement it again. Later patches will use it.
Pravin B Shelar, says:
| On every packet OVS needs to lookup
From: Tonghao Zhang
Port the codes to linux upstream and with little changes.
Pravin B Shelar, says:
| mask caches index of mask in mask_list. On packet recv OVS
| need to traverse mask-list to get cached mask. Therefore array
| is better for retrieving cached mask. This also allows better
|
From: Tonghao Zhang
This series patch optimize openvswitch for performance or simplify
codes.
Patch 1, 2, 4: Port Pravin B Shelar patches to
linux upstream with little changes.
Patch 5, 6, 7: Optimize the flow looking up and
simplify the flow hash.
Patch 8, 9: are bugfix.
The performance
From: Tonghao Zhang
use the specified functions to init resource.
Signed-off-by: Tonghao Zhang
Tested-by: Greg Rose
---
net/openvswitch/datapath.c | 60 +-
1 file changed, 38 insertions(+), 22 deletions(-)
diff --git a/net/openvswitch/datapath.c
From: Tonghao Zhang
Unlocking of a not locked mutex is not allowed.
Other kernel thread may be in critical section while
we unlock it because of setting user_feature fail.
Fixes: 95a7233c4 ("net: openvswitch: Set OvS recirc_id from tc chain index")
Cc: Paul Blakey
Signed-off-by: Tonghao Zhang
From: Tonghao Zhang
When creating and inserting flow-mask, if there is no available
flow-mask, we realloc the mask array. When removing flow-mask,
if necessary, we shrink mask array.
Signed-off-by: Tonghao Zhang
Tested-by: Greg Rose
Acked-by: William Tu
---
net/openvswitch/flow_table.c | 33
From: Tonghao Zhang
When we destroy the flow tables which may contain the flow_mask,
so release the flow mask struct.
Signed-off-by: Tonghao Zhang
Tested-by: Greg Rose
---
net/openvswitch/flow_table.c | 186 +++
1 file changed, 98 insertions(+), 88
From: Tonghao Zhang
The most case *index < ma->max, and flow-mask is not NULL.
We add un/likely for performance.
Signed-off-by: Tonghao Zhang
Tested-by: Greg Rose
Acked-by: William Tu
---
net/openvswitch/flow_table.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
From: Tonghao Zhang
Simplify the code and remove the unnecessary BUILD_BUG_ON.
Signed-off-by: Tonghao Zhang
Tested-by: Greg Rose
Acked-by: William Tu
---
net/openvswitch/flow_table.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/net/openvswitch/flow_table.c
From: Tonghao Zhang
When we destroy the flow tables which may contain the flow_mask,
so release the flow mask struct.
Signed-off-by: Tonghao Zhang
---
net/openvswitch/flow_table.c | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/net/openvswitch/flow_table.c
From: Tonghao Zhang
The most case *index < ma->count, and flow-mask is not NULL.
We add un/likely for performance.
Signed-off-by: Tonghao Zhang
---
net/openvswitch/flow_table.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/openvswitch/flow_table.c
From: Tonghao Zhang
The idea of this optimization comes from a patch which
is committed in 2014, openvswitch community. The author
is Pravin B Shelar. In order to get high performance, I
implement it again. Later patches will use it.
Pravin B Shelar, says:
| On every packet OVS needs to lookup
From: Tonghao Zhang
use the specified functions to init resource.
Signed-off-by: Tonghao Zhang
---
net/openvswitch/datapath.c | 60 +-
1 file changed, 38 insertions(+), 22 deletions(-)
diff --git a/net/openvswitch/datapath.c
From: Tonghao Zhang
Port the codes to linux upstream and with little changes.
Pravin B Shelar, says:
| mask caches index of mask in mask_list. On packet recv OVS
| need to traverse mask-list to get cached mask. Therefore array
| is better for retrieving cached mask. This also allows better
|
From: Tonghao Zhang
Unlocking of a not locked mutex is not allowed.
Other kernel thread may be in critical section while
we unlock it because of setting user_feature fail.
Fixes: 95a7233c4 ("net: openvswitch: Set OvS recirc_id from tc chain index")
Cc: Paul Blakey
Signed-off-by: Tonghao Zhang
From: Tonghao Zhang
This series patch optimize openvswitch for performance or simplify
codes.
Patch 1, 2, 4: Port Pravin B Shelar patches to
linux upstream with little changes.
Patch 5, 6, 7: Optimize the flow looking up and
simplify the flow hash.
Patch 8, 9: are bugfix.
The performance
From: Tonghao Zhang
The full looking up on flow table traverses all mask array.
If mask-array is too large, the number of invalid flow-mask
increase, performance will be drop.
This patch optimizes mask-array operation:
* Inserting, insert it [ma->count- 1] directly.
* Removing, only change
From: Tonghao Zhang
When creating and inserting flow-mask, if there is no available
flow-mask, we realloc the mask array. When removing flow-mask,
if necessary, we shrink mask array.
Signed-off-by: Tonghao Zhang
---
net/openvswitch/flow_table.c | 33 +++--
1 file
From: Tonghao Zhang
Port the codes to linux upstream and with little changes.
Pravin B Shelar, says:
| In case hash collision on mask cache, OVS does extra flow
| lookup. Following patch avoid it.
Link:
https://github.com/openvswitch/ovs/commit/0e6efbe2712da03522532dc5e84806a96f6a0dd1
From: Tonghao Zhang
Simplify the code and remove the unnecessary BUILD_BUG_ON.
Signed-off-by: Tonghao Zhang
---
net/openvswitch/flow_table.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
index
From: Tonghao Zhang
There may be too many flows (> MAX_FLOWS 65536) on
dpif-netdev at same time. For this case, we support
the ovs-appctl command to change the flow max number.
Signed-off-by: Tonghao Zhang
---
lib/dpif-netdev.c | 51 +--
1 file
From: Tonghao Zhang
netdev_assign_flow_api will try to init the netdev,
if success, the netdev will use the offload api.
If we init the type of netdev is dpdk, using the tc offload
api (netdev_tc_init_flow_api, which may be called firstly.),
the err log always is showing up. This patch adds a
From: Tonghao Zhang
For installing more than MAX_FLOWS (65536) flows to netdev datapath.
Add the ovs-appctl subcommand "dpif-netdev/pmd-set-max-flow" which
can change the flow number which netdev datapath support.
Signed-off-by: Tonghao Zhang
---
v3:
* change the UINT_MAX to UINT32_MAX
* add
From: Tonghao Zhang
netdev_assign_flow_api will try to init the netdev,
if success, the netdev will use the offload api.
If we init the type of netdev is dpdk, using the tc offload
api (netdev_tc_init_flow_api, which may be called firstly.),
the err log always is showing up. This patch adds a
From: Tonghao Zhang
Implement the meter offload api in the netdev.
Signed-off-by: Tonghao Zhang
---
lib/dpif-netdev.c | 96 +--
1 file changed, 93 insertions(+), 3 deletions(-)
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index
From: Tonghao Zhang
This patch will be used later.
Signed-off-by: Tonghao Zhang
---
include/openvswitch/ofp-meter.h | 1 +
lib/ofp-meter.c | 13 +
2 files changed, 14 insertions(+)
diff --git a/include/openvswitch/ofp-meter.h b/include/openvswitch/ofp-meter.h
From: Tonghao Zhang
This patch introduce the dpdk_meter_offload_api struct
and implement the meter offload api for dpdk.
* ovs-ofctl can create the meter resource but the meter
offload action is not created yet. The meter action
will be created actually when installing the flow,
and the
From: Tonghao Zhang
This patch will be used in later patch.
Signed-off-by: Tonghao Zhang
---
lib/dpif-netdev.c | 17 -
lib/dpif-netdev.h | 17 +
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index
From: Tonghao Zhang
This series patch support the meter action offload.
We add the general struct, api and implement the
dpdk meter offload. Any suggestion is welcome.
Tonghao Zhang (7):
dpif-netdev: Remove dp_meter_* struct to header file
netdev-offload: Pass dpif as an argument to
From: Tonghao Zhang
When offloading the meter action, we may access the
"datapath" resource, such as the meter[] of struct
dp_netdev. We will store meter offload info to it.
Signed-off-by: Tonghao Zhang
---
lib/dpif-netdev.c | 2 +-
lib/dpif-netlink.c| 2 +-
From: Tonghao Zhang
Introduce the meter offload struct and dp_meter use it.
Signed-off-by: Tonghao Zhang
---
lib/dpif-netdev.h | 2 ++
lib/netdev-offload-provider.h | 10 ++
2 files changed, 12 insertions(+)
diff --git a/lib/dpif-netdev.h b/lib/dpif-netdev.h
index
From: Tonghao Zhang
Add the callback which will be called when we operate
the meter offload.
Signed-off-by: Tonghao Zhang
---
lib/dpif-netdev.c | 3 +++
lib/dpif-netlink.c | 3 +++
lib/dpif-provider.h | 5
lib/dpif.c | 66
From: Tonghao Zhang
For installing more than MAX_FLOWS (65536) flows to netdev datapath.
Add the ovs-appctl subcommand "dpif-netdev/pmd-set-max-flow" which
can change the flow number which netdev datapath support.
Signed-off-by: Tonghao Zhang
---
v2:
* change int type to atomic_uint32_t
*
From: Tonghao Zhang
For now, ovs-vswitchd use the array of the dp_meter struct
to store meter's data, and at most, there are only 65536
(defined by MAX_METERS) meters that can be used. But in some
case, for example, in the edge gateway, we should use 200,000+,
at least, meters for IP address
From: Tonghao Zhang
The cmap can address the meter capacity issue,
but using cmap, there is 1% performance loss compared
with previous array implementation.
This patch add a meter cache in dp_netdev for fast
lookup. With this patch, forwarding between p0 and
p1, is 4,929,904 pps, the test
From: Tonghao Zhang
For now, ovs-vswitchd use the array of the dp_meter struct
to store meter's data, and at most, there are only 65536
(defined by MAX_METERS) meters that can be used. But in some
case, for example, in the edge gateway, we should use 200,000+,
at least, meters for IP address
From: Tonghao Zhang
The cmap can address the meter capacity issue,
but using cmap, there is 1% performance loss
compared with previous array implementation.
This patch add a meter cache in dp_netdev for
fast lookup. With this patch, forwarding
between p0 and p1, is 4,929,904 pps, the test
method
From: Tonghao Zhang
When offloading the flows which matching the vlan feild,
there is an error[1]. Then we can't offload them, though
TC flower supports this. To fix it, we should use the
*dl_type_is_ip_any* instead of *is_ip_any*. Use ovs-appctl
command to reproduce it.
$ ovs-appctl
From: Tonghao Zhang
The patch set expands or shrink the meter table when necessary.
and other patch fixes bug or improve codes.
Tonghao Zhang (5):
net: openvswitch: expand the meters supported number
net: openvswitch: set max limitation to meters
net: openvswitch: remove the unnecessary
From: Tonghao Zhang
In kernel datapath of Open vSwitch, there are only 1024
buckets of meter in one dp. If installing more than 1024
(e.g. 8192) meters, it may lead to the performance drop.
But in some case, for example, Open vSwitch used as edge
gateway, there should be 200,000+ at least,
From: Tonghao Zhang
Before calling the ovs_meter_cmd_reply_stats, "meter"
is checked, so don't check it agin in that function.
Cc: Pravin B Shelar
Cc: Andy Zhou
Signed-off-by: Tonghao Zhang
---
net/openvswitch/meter.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff
From: Tonghao Zhang
Don't allow user to create meter unlimitedly,
which may cause to consume a large amount of kernel memory.
The 200,000 meters may be fine in general case.
Cc: Pravin B Shelar
Cc: Andy Zhou
Signed-off-by: Tonghao Zhang
---
net/openvswitch/meter.c | 21 +++--
From: Tonghao Zhang
Cc: Pravin B Shelar
Cc: Andy Zhou
Signed-off-by: Tonghao Zhang
---
net/openvswitch/meter.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c
index f552c64ae8df..77fe39cf4f18 100644
---
From: Tonghao Zhang
When setting the meter rate to 4+Gbps, there is an
overflow, the meters don't work as expected.
Cc: Pravin B Shelar
Cc: Andy Zhou
Signed-off-by: Tonghao Zhang
---
net/openvswitch/meter.c | 2 +-
net/openvswitch/meter.h | 2 +-
2 files changed, 2 insertions(+), 2
From: Tonghao Zhang
syzbot wrote:
| =
| WARNING: suspicious RCU usage
| 5.7.0-rc1+ #45 Not tainted
| -
| net/openvswitch/conntrack.c:1898 RCU-list traversed in non-reader section!!
|
| other info that might help us debug this:
|
From: Tonghao Zhang
The max number of flow in dpif-netdev is MAX_FLOWS,
the previous patch[1] try to install more flows,
and introduce the subcommand "dpif-netdev/pmd-set-max-flow"
to change the max flow limitation. But 'other_config:flow-limit'
option can limit that too.
As Ilya Maximets say
From: Tonghao Zhang
In kernel datapath of Open vSwitch, there are only 1024
buckets of meter in one dp. If installing more than 1024
(e.g. 8192) meters, it may lead to the performance drop.
But in some case, for example, Open vSwitch used as edge
gateway, there should be 200,000+ at least,
From: Tonghao Zhang
Don't allow user to create meter unlimitedly, which
may cause to consume a large amount of kernel memory.
The 200,000 meters may be fine in general case.
Cc: Pravin B Shelar
Cc: Andy Zhou
Signed-off-by: Tonghao Zhang
---
net/openvswitch/meter.c | 14 +-
From: Tonghao Zhang
Before calling the ovs_meter_cmd_reply_stats, "meter"
is checked, so don't check it agin in that function.
Cc: Pravin B Shelar
Cc: Andy Zhou
Signed-off-by: Tonghao Zhang
---
net/openvswitch/meter.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff
From: Tonghao Zhang
The struct sw_flow is protected by RCU, when traversing them,
use hlist_for_each_entry_rcu.
Signed-off-by: Tonghao Zhang
---
net/openvswitch/flow_table.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/net/openvswitch/flow_table.c
From: Tonghao Zhang
Before invoking the ovs_meter_cmd_reply_stats, "meter"
was checked, so don't check it agin in that function.
Cc: Pravin B Shelar
Cc: Andy Zhou
Signed-off-by: Tonghao Zhang
Acked-by: Pravin B Shelar
---
net/openvswitch/meter.c | 9 -
1 file changed, 4
From: Tonghao Zhang
In kernel datapath of Open vSwitch, there are only 1024
buckets of meter in one datapath. If installing more than
1024 (e.g. 8192) meters, it may lead to the performance drop.
But in some case, for example, Open vSwitch used as edge
gateway, there should be 20K at least,
From: Tonghao Zhang
The patch set expand or shrink the meter table when necessary.
and other patches fix bug or improve codes.
Tonghao Zhang (5):
net: openvswitch: expand the meters supported number
net: openvswitch: set max limitation to meters
net: openvswitch: remove the unnecessary
From: Tonghao Zhang
When setting the meter rate to 4+Gbps, there is an
overflow, the meters don't work as expected.
Cc: Pravin B Shelar
Cc: Andy Zhou
Signed-off-by: Tonghao Zhang
Acked-by: Pravin B Shelar
---
net/openvswitch/meter.c | 2 +-
net/openvswitch/meter.h | 2 +-
2 files changed,
From: Tonghao Zhang
Don't allow user to create meter unlimitedly, which may cause
to consume a large amount of kernel memory. The max number
supported is decided by physical memory and 20K meters as default.
Cc: Pravin B Shelar
Cc: Andy Zhou
Signed-off-by: Tonghao Zhang
Acked-by: Pravin B
From: Tonghao Zhang
Cc: Pravin B Shelar
Cc: Andy Zhou
Signed-off-by: Tonghao Zhang
Acked-by: Pravin B Shelar
---
net/openvswitch/meter.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c
index
From: Tonghao Zhang
The patch set expand or shrink the meter table when necessary.
and other patches fix bug or improve codes.
Tonghao Zhang (4):
dpif-netdev: Expand the meters supported number
dpif-netdev: Add burst size to buckets
dpif-netdev: Use the u32 instead of u64 for buckets
From: Tonghao Zhang
When setting the meter rate to 4+Gbps, there is an overflow, the
meters don't work as expected.
Cc: Ilya Maximets
Cc: William Tu
Cc: Jarno Rajahalme
Cc: Ben Pfaff
Cc: Andy Zhou
Signed-off-by: Tonghao Zhang
---
include/openvswitch/ofp-meter.h | 2 +-
lib/dpif-netdev.c
From: Tonghao Zhang
For now, ovs-vswitchd use the array of the dp_meter struct
to store meter's data, and at most, there are only 65536
(defined by MAX_METERS) meters that can be used. But in some
case, for example, in the edge gateway, we should use 200,000,
at least, meters for IP address
From: Tonghao Zhang
For now, the meter of the userspace datapath, don't include
the bucket burst size to buckets. This patch includes it now.
Cc: Ilya Maximets
Cc: William Tu
Cc: Jarno Rajahalme
Cc: Ben Pfaff
Cc: Andy Zhou
Signed-off-by: Tonghao Zhang
---
lib/dpif-netdev.c | 7 +--
1
1 - 100 of 188 matches
Mail list logo