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 patches base DPDK bond to implem
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 \
options:dpdk-devarg
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 not support
setting mtu.
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
---
lib/netdev-dpdk.c | 41 +
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 pci whether it's valid or
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
---
lib/netdev-dpdk.c | 24 ++--
1
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 \
options:dpdk
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 u64 instead of u32 for buckets
Rev
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.
$ ovs-ofctl -O OpenFlow13 add-meter br0 \
'meter=1 pktps burst stats bands=type=drop rate=1 burst_size=2000'
Cc: Ilya Maximets
Cc: William 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 bandw
From: Tonghao Zhang
When setting the meter rate to 4.3+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
Cc: Pravin Shelar
Acked-by: William Tu
Signed-off-by: Tonghao Zhang
---
include/openvswi
From: Tonghao Zhang
This reverts commit 5c41c31ebd64fda821fb733a5784a7a440a794f8.
Use the pktgen-dpdk to test the commit 5c41c31ebd64
("dpif-netdev: includes microsecond delta in meter bucket calculation"), it
does't work as expected. And it broken the meter function (e.g. set rate
200Mbps, the
From: Tonghao Zhang
Not bugfix, make the codes more readable.
Cc: Simon Horman
Cc: Paul Blakey
Cc: Roi Dayan
Cc: Ben Pfaff
Cc: William Tu
Cc: Ilya Maximets
Signed-off-by: Tonghao Zhang
---
lib/netdev-offload-tc.c | 6 ++
lib/tc.c| 6 ++
2 files changed, 4 insertio
From: Tonghao Zhang
To support installing the TC flowers to HW, via "ovs-appctl dpctl/add-flow"
command, there should be an ufid. This patch will check whether ufid exists,
if not, generate an ufid. Should to know that when processing upcall packets,
ufid is generated in parse_odp_packet for kern
From: Tonghao Zhang
This patch allows users to offload the TC flower rules with tunnel
mask. In some case, mask is useful as wildcards.
For example:
$ ovs-appctl dpctl/add-flow \
"tunnel(dst=3.3.3.100,src=3.3.3.200/255.255.255.0,tp_dst=4789),\
recirc_id(0),in_port(3),eth(),eth_type(0x080
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 u64 instead of u32 for buckets.
R
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.
$ ovs-ofctl -O OpenFlow13 add-meter br0 \
'meter=1 pktps burst stats bands=type=drop rate=1 burst_size=2000'
Cc: Ilya Maximets
Cc: William T
From: Tonghao Zhang
When setting the meter rate to 4.3+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
Cc: Pravin Shelar
Acked-by: William Tu
Signed-off-by: Tonghao Zhang
---
include/openvswi
From: Tonghao Zhang
This reverts commit 5c41c31ebd64fda821fb733a5784a7a440a794f8.
Use the pktgen-dpdk to test the commit 5c41c31ebd64
("dpif-netdev: includes microsecond delta in meter bucket calculation"), it
does't work as expected. And it broken the meter function (e.g. set rate
200Mbps, the
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 bandw
From: Tonghao Zhang
The max number of mark is (UINT32_MAX - 1), that is
enough to be used. But theoretically, if there are no
mark available, the later different flows will shared
the mark INVALID_FLOW_MARK, that may break the function.
If there are no available mark to be used, return error
code
From: Tonghao Zhang
When changing the pmd interfaces attribute, ovs-vswitchd will
reload pmd and flush offload flows. reload_affected_pmds may
be invoked twice or more. In that case, the flows may been
queued to "dp_netdev_flow_offload" thread again.
For example:
$ ovs-vsctl -- set interface op
From: Tonghao Zhang
To support installing the TC flowers to HW, via "ovs-appctl dpctl/add-flow"
command, there should be an ufid. This patch will check whether ufid exists,
if not, generate an ufid. Should to know that when processing upcall packets,
ufid is generated in parse_odp_packet for kern
From: Tonghao Zhang
This series patch allows user to match tunnel src/dst
address and port with masked values. User can use that
to match specified IP address or port and then drop packets
(DDOS network attack from a gateway or others) or other actions.
patch [1]: allow user install TC Flowers w
From: Tonghao Zhang
Not bugfix, make the codes more readable.
Cc: Simon Horman
Cc: Paul Blakey
Cc: Roi Dayan
Cc: Ben Pfaff
Cc: William Tu
Cc: Ilya Maximets
Signed-off-by: Tonghao Zhang
Acked-by: Roi Dayan
---
lib/netdev-offload-tc.c | 6 ++
lib/tc.c| 6 ++
2 file
From: Tonghao Zhang
To support more use case, for example, DDOS, which
packets should be dropped in hardware, this patch
allows users to match only the tunnel source IPs with
masked value.
$ ovs-appctl dpctl/add-flow
"tunnel(src=2.2.2.0/255.255.255.0,tp_dst=4789,ttl=64),\
recirc_id(2),in_port
From: Tonghao Zhang
This patch allows users to offload the TC flower rules with
tunnel mask. This patch allows masked match of the following,
where previously supported an exact match was supported:
* Remote (dst) tunnel endpoint address
* Local (src) tunnel endpoint address
* Remote (dst) tunnel
From: Tonghao Zhang
This patch allows to install arp rules to tc dp.
In the future, arp will be offloaded to hardware to
be processed. So OvS enable this now.
$ ovs-appctl dpctl/add-flow 'recirc_id(0),in_port(3),eth(),\
eth_type(0x0806),arp(op=2,tha=00:50:56:e1:4b:ab,tip=10.255.1.116)' 2
$ ov
From: Tonghao Zhang
This patch allows to install arp rules to tc dp.
In the future, arp will be offloaded to hardware to
be processed. So OvS enable this now.
$ ovs-appctl dpctl/add-flow 'recirc_id(0),in_port(3),eth(),\
eth_type(0x0806),arp(op=2,tha=00:50:56:e1:4b:ab,tip=10.255.1.116)' 2
$ ov
From: Tonghao Zhang
This patchset add more robust error handling.
Tested-at:
https://travis-ci.com/github/ovn-open-virtual-networks/ovs/builds/170300796
Tonghao Zhang (2):
dpif-netdev: Add check mark to avoid ovs-vswitchd crash.
dpif-netdev: Return error code when no mark available.
lib/d
From: Tonghao Zhang
When changing the pmd interfaces attribute, ovs-vswitchd will
reload pmd and flush offload flows. reload_affected_pmds may
be invoked twice or more. In that case, the flows may been
queued to "dp_netdev_flow_offload" thread again.
For example:
$ ovs-vsctl -- set interface op
From: Tonghao Zhang
The max number of mark is (UINT32_MAX - 1), that is
enough to be used. But theoretically, if there are no
mark available, the later different flows will shared
the mark INVALID_FLOW_MARK, that may break the function.
If there are no available mark to be used, return error
code
From: Tonghao Zhang
When ports were removed from bridge, we should flush the
offload rules on the ports. The main reason is two factors:
* The ports removed from bridge, will be managed by OvS, so
flush the rules which installed by OvS.
* If using the TC flower offload, for example, tc rules s
From: Tonghao Zhang
Goto label accurately to avoid memleak.
Fixes: a692410af0f7 ("dpctl: Expand the flow dump type filter")
Cc: Gavi Teitz
Signed-off-by: Tonghao Zhang
---
lib/dpctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/dpctl.c b/lib/dpctl.c
index db2b1f896
From: Tonghao Zhang
"ovs-appctl dpctl/dump-flows" added the option
"pmd" which allow user to dump pmd specified.
That option is useful to dump rules of pmd
when we have a large number of rules in dp.
Signed-off-by: Tonghao Zhang
---
NEWS| 2 ++
lib/dpctl.c | 28 ++
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 test
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 f
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
| cac
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
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
Signed-o
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
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 a/net
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 b/net
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 dele
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
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 b/
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 dat
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 dat
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, witho
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, witho
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 s
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 s
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, nla_total_size(attrlen)
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 chang
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 add
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 8485b54.
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 flow_put
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 +-
lib/netde
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 b5f5c12
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
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 051d090
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
inde
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 of
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
* check
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 in
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 add
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
---
lib/netdev-
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
---
lib/net
From: Tonghao Zhang
The same icmp packet may traverse conntrack module more than once.
Or same icmp packets traverse contranck module in orderly.
Don't change stats to CS_ESTABLISHED before receiving reply or related packets.
Fixes: b269a1229df2 ("conntrack: Track ICMP type and code.")
Cc: Dani
From: Tonghao Zhang
When setting the meter rate to 4.3+Gbps, there is an overflow, the
meters don't work as expected.
$ ovs-ofctl -O OpenFlow13 add-meter br-int "meter=1 kbps stats bands=type=drop
rate=4294968"
Before the patch, the buckets of meters was stored in its burst_size
of ofputil_met
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.
$ ovs-ofctl -O OpenFlow13 add-meter br0 \
'meter=1 pktps burst stats bands=type=drop rate=1 burst_size=2000'
Signed-off-by: Tonghao Zhang
--
From: Tonghao Zhang
The same icmp packet may traverse conntrack module more than once.
Or same icmp packets traverse contranck module in orderly.
Don't change state to CS_ESTABLISHED before receiving reply or related packets.
Fixes: a867c010ee91 ("conntrack: Fix conntrack new state")
Signed-off
From: Tonghao Zhang
When setting the meter rate to 4.3+Gbps, there is an overflow, the
meters don't work as expected.
$ ovs-ofctl -O OpenFlow13 add-meter br-int "meter=1 kbps stats bands=type=drop
rate=4294968"
Before the patch, the buckets of meters was stored in its burst_size
of ofputil_met
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.
$ ovs-ofctl -O OpenFlow13 add-meter br0 \
'meter=1 pktps burst stats bands=type=drop rate=1 burst_size=2000'
Signed-off-by: Tonghao Zhang
--
From: Tonghao Zhang
The buckets used was changed, and now dpif-netdev support
burst_size, change the testcase.
Signed-off-by: Tonghao Zhang
---
tests/dpif-netdev.at | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tests/dpif-netdev.at b/tests/dpif-netdev.at
From: Tonghao Zhang
This patch adds more strict limitation to tunnel packets.
If the source and destination address are the local address.
the tunnel packets will be sent to outside.
This is useful, for example, if we upgrade the openvswitch:
One OvS may send these packets outside, and the physi
From: Tonghao Zhang
Now OvS supports building with dpdk 20.11, and uses
the '--with-dpdk=shared' option in fedora.spec. Then
change version of dpdk 17.05.1 to 20.11.
Note that dpdk-devel-20.11.x is not released in fedora
distro, but use '20.11' is fine.
Fixes: 252e1e576443 ("dpdk: Update to use
From: Tonghao Zhang
[resend with cover letter]
Patch 1 fixes the meter overflow, with that change, patch 2
adds burst size to buckets which more accurate. Patch 3
change testcase because the way of computing buckets changed.
v2:
change the testcase.
v1:
split patches from:
http://patchwork.ozl
From: Tonghao Zhang
When setting the meter rate to 4.3+Gbps, there is an overflow, the
meters don't work as expected.
$ ovs-ofctl -O OpenFlow13 add-meter br-int "meter=1 kbps stats bands=type=drop
rate=4294968"
Before the patch, the buckets of meters was stored in its burst_size
of ofputil_met
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.
$ ovs-ofctl -O OpenFlow13 add-meter br0 \
'meter=1 pktps burst stats bands=type=drop rate=1 burst_size=2000'
Signed-off-by: Tonghao Zhang
--
From: Tonghao Zhang
The buckets used was changed, and now dpif-netdev support
burst_size, change the testcase.
Signed-off-by: Tonghao Zhang
---
tests/dpif-netdev.at | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tests/dpif-netdev.at b/tests/dpif-netdev.at
From: Tonghao Zhang
For now, the meter of the userspace datapath, don't include
the bucket burst size to total buckets. This patch includes it now.
$ ovs-ofctl -O OpenFlow13 add-meter br0 \
'meter=1 pktps burst stats bands=type=drop rate=1 burst_size=2000'
Signed-off-by: Tonghao Zhang
From: Tonghao Zhang
v3:
* split path1 to #1, #2, #4
* update testcase in every patch.
* improve testcase
v2:
* change the testcase.
v1:
* split patches from:
http://patchwork.ozlabs.org/project/openvswitch/patch/1588244439-58766-2-git-send-email-xiangxia.m@gmail.com/
http://patchwork.ozlabs
From: Tonghao Zhang
The way that "burst_size" was used as total buckets is
very strange. If user set the "burst_size" too smaller while
"rate" larger, that may affect the meter normal work.
This patch refactor the buckets calculation, and start
with a full buckets.
Signed-off-by: Tonghao Zhang
From: Tonghao Zhang
If user don't set the meter "burst_size", when creating them. OvS
will set "brust_size" to "rate", and there will be a double "rate"
as burst rate. For example:
$ ovs-ofctl -O OpenFlow13 add-meter br0 'meter=1 pktps stats bands=type=drop
rate=100'
The rate expected is 1
From: Tonghao Zhang
If user don't set the meter "burst_size", when creating them. OvS
will set "brust_size" to "rate", and there will be a double "rate"
as burst rate. For example:
$ ovs-ofctl -O OpenFlow13 add-meter br0 'meter=1 pktps stats bands=type=drop
rate=100'
The rate expected is 1
From: Tonghao Zhang
For now, the meter of the userspace datapath, don't include
the bucket burst size to total buckets. This patch includes it now.
$ ovs-ofctl -O OpenFlow13 add-meter br0 'meter=1 pktps burst stats
bands=type=drop rate=1 burst_size=2000'
OvS linux kernel module do that in
From: Tonghao Zhang
When setting the meter rate to 4.3+Gbps, there is an overflow, the
meters don't work as expected.
$ ovs-ofctl -O OpenFlow13 add-meter br-int "meter=1 kbps stats bands=type=drop
rate=4294968"
It was overflow when we set the rate to 4294968, because "burst_size" in
the ofputi
From: Tonghao Zhang
The way that "burst_size" was used as total buckets is
very strange. If user set the "burst_size" too smaller while
"rate" larger, that may affect the meter normal work.
This patch refactor the buckets calculation, and start
with a full buckets.
Signed-off-by: Tonghao Zhang
From: Tonghao Zhang
v3:
* split path1 to #1, #2, #4
* update testcase in every patch.
* improve testcase
v2:
* change the testcase.
v1:
* split patches from:
http://patchwork.ozlabs.org/project/openvswitch/patch/1588244439-58766-2-git-send-email-xiangxia.m@gmail.com/
http://patchwork.ozlabs
From: Tonghao Zhang
When setting the meter rate to 4.3+Gbps, there is an overflow, the
meters don't work as expected.
$ ovs-ofctl -O OpenFlow13 add-meter br-int "meter=1 kbps stats bands=type=drop
rate=4294968"
It was overflow when we set the rate to 4294968, because "burst_size" in
the ofputi
From: Tonghao Zhang
"ovs-appctl dpctl/dump-flows" added the option
"pmd" which allow user to dump pmd specified.
That option is useful to dump rules of pmd
when we have a large number of rules in dp.
Signed-off-by: Tonghao Zhang
---
v2:
* rebase the codes
* add usage
---
NEWS|
From: Tonghao Zhang
ovs_flow_tbl_destroy always is called from RCU callback
or error path. It is no need to check if rcu_read_lock
or lockdep_ovsl_is_held was held.
ovs_dp_cmd_fill_info always is called with ovs_mutex,
So use the rcu_dereference_ovsl instead of rcu_dereference
in ovs_flow_tbl_ma
From: Tonghao Zhang
To avoid some issues, for example RCU usage warning, we should
flush the flows under ovs_lock. This patch refactors
table_instance_destroy and introduces table_instance_flow_flush
which can be invoked by __dp_destroy or ovs_flow_tbl_flush.
Signed-off-by: Tonghao Zhang
---
n
From: Tonghao Zhang
To avoid some issues, for example RCU usage warning and double free,
we should flush the flows under ovs_lock. This patch refactors
table_instance_destroy and introduces table_instance_flow_flush
which can be invoked by __dp_destroy or ovs_flow_tbl_flush.
Fixes: 50b0e61b32ee
From: Tonghao Zhang
Not change the logic, just improve coding style.
Cc: Pravin B Shelar
Signed-off-by: Tonghao Zhang
---
net/openvswitch/actions.c| 5 ++--
net/openvswitch/datapath.c | 35
net/openvswitch/flow_table.c | 44 -
From: Tonghao Zhang
This series patches are not bug fix, just improve codes.
Tonghao Zhang (3):
net: openvswitch: improve coding style
net: openvswitch: refactor flow free function
net: openvswitch: remove unnused keep_flows
net/openvswitch/actions.c| 5 +--
net/openvswitch/datapath
From: Tonghao Zhang
keep_flows was introduced by [1], which used as flag to delete flows or not.
When rehashing or expanding the table instance, we will not flush the flows.
Now don't use it anymore, remove it.
[1] -
https://github.com/openvswitch/ovs/commit/acd051f1761569205827dc9b037e15568a8d
From: Tonghao Zhang
Decrease table->count and ufid_count unconditionally,
and add BUG_ON in flush flows function.
Cc: Pravin B Shelar
Signed-off-by: Tonghao Zhang
---
net/openvswitch/flow_table.c | 19 ---
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/net/open
From: Tonghao Zhang
"ovs-appctl dpctl/dump-flows" added the option
"pmd" which allow user to dump pmd specified.
That option is useful to dump rules of pmd
when we have a large number of rules in dp.
Signed-off-by: Tonghao Zhang
---
NEWS| 2 ++
lib/dpctl.c | 28 ++
1 - 100 of 189 matches
Mail list logo