From: Tonghao Zhang
Introduce the new function tw_prot_init (inspired by
req_prot_init) to simplify "proto_register" function.
tw_prot_cleanup will take care of a partially initialized
timewait_sock_ops.
Signed-off-by: Tonghao Zhang
Reviewed-by: Alexander Duyck
---
net/core/sock.c | 44 +
From: Tonghao Zhang
Introduce a new function twsk_prot_init, inspired by
req_prot_init, to simplify the "proto_register" function.
Signed-off-by: Tonghao Zhang
---
net/core/sock.c | 44
1 file changed, 28 insertions(+), 16 deletions(-)
diff --git a
From: Tonghao Zhang
Allow user configuring RXCSUM separately with ethtool -K,
reusing the existing virtnet_set_guest_offloads helper
that configures RXCSUM for XDP. This is conditional on
VIRTIO_NET_F_CTRL_GUEST_OFFLOADS.
If Rx checksum is disabled, LRO should also be disabled.
Cc: Michael S. T
From: Tonghao Zhang
Allow user configuring RXCSUM separately with ethtool -K,
reusing the existing virtnet_set_guest_offloads helper
that configures RXCSUM for XDP. This is conditional on
VIRTIO_NET_F_CTRL_GUEST_OFFLOADS.
If Rx checksum is disabled, LRO should also be disabled.
Cc: Michael S. T
From: Tonghao Zhang
Open vSwitch and Linux bridge will disable LRO of the interface
when this interface added to them. Now when disable the LRO, the
virtio-net csum is disable too. That drops the forwarding performance.
Fixes: a02e8964eaf9 ("virtio-net: ethtool configurable LRO")
Cc: Michael S.
From: Tonghao Zhang
Allow user configuring RXCSUM separately with ethtool -K,
reusing the existing virtnet_set_guest_offloads helper
that configures RXCSUM for XDP. This is conditional on
VIRTIO_NET_F_CTRL_GUEST_OFFLOADS.
Cc: Michael S. Tsirkin
Cc: Jason Wang
Signed-off-by: Tonghao Zhang
---
From: Tonghao Zhang
Open vSwitch and Linux bridge will disable LRO of the interface
when this interface added to them. Now when disable the LRO, the
virtio-net csum is disable too. That drops the forwarding performance.
Fixes: e59ff2c49ae1 ("virtio-net: disable guest csum during XDP set")
Cc: Mi
From: Tonghao Zhang
Not change the logic, just improve the coding style.
Cc: Pravin B Shelar
Signed-off-by: Tonghao Zhang
Acked-by: Pravin B Shelar
---
v4:
improve the codes suggested by Stefano
http://patchwork.ozlabs.org/project/netdev/patch/20200825050636.14153-2-xiangxia.m@gmail.com
-
From: Tonghao Zhang
Decrease table->count and ufid_count unconditionally,
because we only don't use count or ufid_count to count
when flushing the flows. To simplify the codes, we
remove the "count" argument of table_instance_flow_free.
To avoid a bug when deleting flows in the future, add
WARN_
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
This series patches are not bug fix, just improve codes.
Tonghao Zhang (3):
net: openvswitch: improve the coding style
net: openvswitch: refactor flow free function
net: openvswitch: remove unused keep_flows
net/openvswitch/actions.c| 5 +--
net/openvswitch/datap
From: Tonghao Zhang
[ Upstream commit 1f3a090b9033f69de380c03db3ea1a1015c850cf ]
Backport this commit to 5.5 - 5.8.3.
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_i
From: Tonghao Zhang
[ Upstream commit 77b981c82c1df7c7ad32a046f17f007450b46954 ]
Backport this commit to 5.6.14 - 5.8.3.
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 tabl
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,
because we only don't use count or ufid_count to count
when flushing the flows. To simplify the codes, we
remove the "count" argument of table_instance_flow_free.
To avoid a bug when deleting flows in the future, add
WARN_
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
Decrease table->count and ufid_count unconditionally,
because we only don't use count or ufid_count to count
when flushing the flows. To simplify the codes, we
remove the "count" argument of table_instance_flow_free.
To avoid a bug when deleting flows in the future, add
BUG_O
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
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
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 unused 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
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
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
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
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
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
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
Signed-off-by: Tonghao Zhang
Reviewed-by: Roi Dayan
---
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
From: Tonghao Zhang
Introduce the mlx5e_rep_uplink_priv helper
to make the codes more readable.
Signed-off-by: Tonghao Zhang
---
.../ethernet/mellanox/mlx5/core/en/rep/tc.c | 9 ++---
.../ethernet/mellanox/mlx5/core/en/tc_ct.c| 4 +---
.../net/ethernet/mellanox/mlx5/core/en_rep.h
From: Tonghao Zhang
The commit 0a7fcb78cc21 ("net/mlx5e: Support inner header rewrite with
goto action"), will decapsulate the tunnel packets if there is a goto
action in chain 0. But in some case, we don't want do that, for example:
$ tc filter add dev $VXLAN protocol ip parent : prio 1 cha
From: Tonghao Zhang
Signed-off-by: Tonghao Zhang
Reviewed-by: Roi Dayan
---
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
From: Tonghao Zhang
Introduce the mlx5e_rep_uplink_priv helper
to make the codes more readable.
Signed-off-by: Tonghao Zhang
---
v2:
* change the name mlx5e_eswitch_rep_uplink_priv to mlx5e_rep_uplink_priv
---
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 4 +--
drivers/net/ethernet/me
From: Tonghao Zhang
The commit 0a7fcb78cc21 ("net/mlx5e: Support inner header rewrite with
goto action"), will decapsulate the tunnel packets if there is a goto
action in chain 0. But in some case, we don't want do that, for example:
$ tc filter add dev $VXLAN protocol ip parent : prio 1 cha
From: Tonghao Zhang
nf_conntrack_max is used to limit the maximum number of
conntrack entries in the conntrack table for every network
namespace. For the containers that reside in the same namespace,
they share the same conntrack table, and the total # of conntrack
entries for all containers are
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
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
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 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
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
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 b/net/openvswitch/flow_tab
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 a/net/openvswitch/flow_tabl
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
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
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
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 a/net/openv
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 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 b/
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 b/net/openvswitch/datapa
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 last
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 b/net/openvswi
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 1b99f8e..7a
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
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
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
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
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 ch
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 b/net/openvswitch/datapa
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 f
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 ch
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 last
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 7e9..66
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 b/net/openvswi
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 b/
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
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
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 most case *index < ma->max, we add likely for performance.
Signed-off-by: Tonghao Zhang
---
net/openvswitch/flow_table.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
index c8e79c1..c21fd5
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 b/
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 5257e4a..c8
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 ch
From: Tonghao Zhang
This series patch optimize openvswitch.
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: is a bugfix.
The performance test is on Intel Xeon E5-2630 v4.
The te
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 b/net/openvswitch/datapa
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.
This patch optimizes mask-array operation:
* Inserting, insert it [ma->count- 1] directly.
* Removing, only change last
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
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 last
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 2d74d74..22
From: Tonghao Zhang
The most case *index < ma->max, we add likely for performance.
Signed-off-by: Tonghao Zhang
---
net/openvswitch/flow_table.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/openvswitch/flow_table.c b/net/openvswitch/flow_table.c
index 223470a..bd7e97
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
This series patch optimize openvswitch.
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.
The performance test is on Intel Xeon E5-2630 v4.
The test topology is show as
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
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 ch
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
If we register a net device which name is not valid
(dev_get_valid_name), register_netdevice will return err
codes and will not run dev->priv_destructor. The memory
will leak. This patch adds check in ovs_vport_free and
set the vport NULL.
Fixes: 309b66970ee2 ("net: openvswit
From: Tonghao Zhang
In some case, we don't want to allow specific tunnel packets
to host that can avoid to take up high CPU (e.g network attacks).
But other tunnel packets which not matched in hardware will be
sent to host too.
$ tc filter add dev vxlan_sys_4789 \
protocol ip cha
From: Tonghao Zhang
Don't allow to remove the vxlan device to other namesapce,
because we maintain the data of vxlan net device on original
net-namespace.
$ ip netns add ns100
$ ip link add vxlan100 type vxlan dstport 4789 external
$ ip link set dev vxlan100 netns ns100
$ ip netn
From: Tonghao Zhang
At most case, we use the ConnectX-5 NIC on compute node for VMs,
but we will offload forwarding rules to NICs on gateway node.
On the gateway node, we will install multiple NICs and set them to
different dockers which contain different net namespace, different
routing table. I
From: Tonghao Zhang
In some case, we don't care the enc_src_ip and enc_dst_ip, and
if we don't match the field enc_src_ip and enc_dst_ip, we can use
fewer flows in hardware when revice the tunnel packets. For example,
the tunnel packets may be sent from different hosts, we must offload
one rule f
From: Tonghao Zhang
If we try to set VFs rate on a VF (not PF) net device, the kernel
will be crash. The commands are show as below:
$ echo 2 > /sys/class/net/$MLX_PF0/device/sriov_numvfs
$ ip link set $MLX_VF0 vf 0 max_tx_rate 2 min_tx_rate 1
If not applied the first patch ("net/mlx5: Avoid pa
From: Tonghao Zhang
If we try to set VFs mac address on a VF (not PF) net device,
the kernel will be crash. The commands are show as below:
$ echo 2 > /sys/class/net/$MLX_PF0/device/sriov_numvfs
$ ip link set $MLX_VF0 vf 0 mac 00:11:22:33:44:00
[exception RIP: mlx5_eswitch_set_vport_mac+41]
[ff
From: Tonghao Zhang
If we try to set VFs rate on a VF (not PF) net device, the kernel
will be crash. The commands are show as below:
$ echo 2 > /sys/class/net/$MLX_PF0/device/sriov_numvfs
$ ip link set $MLX_VF0 vf 0 rate 100
Fixes: c9497c98901c ("net/mlx5: Add support for setting VF min rate")
From: Tonghao Zhang
If we try to set VFs mac address on a VF (not PF) net device,
the kernel will be crash. The commands are show as below:
$ echo 2 > /sys/class/net/$MLX_PF0/device/sriov_numvfs
$ ip link set $MLX_VF0 vf 0 mac 00:11:22:33:44:00
[exception RIP: mlx5_eswitch_set_vport_mac+41]
[ff
From: Tonghao Zhang
* Now the encapsulation is not supported for mlx5 VFs. When we try to
offload that action, the -EINVAL is returned, but not -EOPNOTSUPP.
This patch changes the returned value and ignore to confuse user.
The command is shown as below [1].
* When max modify header action is zer
From: Tonghao Zhang
This patch deletes unnecessary setting of the esw_attr->parse_attr
to parse_attr in parse_tc_fdb_actions() because it is already done
by the mlx5e_flow_esw_attr_init() function.
Signed-off-by: Tonghao Zhang
Reviewed-by: Roi Dayan
---
drivers/net/ethernet/mellanox/mlx5/core
From: Tonghao Zhang
This serial patches are not bugfixes, and just little improvement for mlx5e.
v3->v4:
Patch4: change the long message info and introduce a helper function.
v2->v3:
Patch 1 and 5 are merged to patch 4 now.
v1->v2
Patch 1: remove the duplicated error messages and stick to extac
From: Tonghao Zhang
If we try to offload decapsulation actions to VFs hw, we get the log [1].
It's not friendly, because the kind of net device is null, and we don't
know what '0' means.
[1] "mlx5_core :05:01.2 vf_0: decapsulation offload is not supported for
net device (0)"
Signed-off-by
From: Tonghao Zhang
This patch is a little improvement. Simplify the parse_tc_fdb_actions().
Signed-off-by: Tonghao Zhang
Reviewed-by: Roi Dayan
---
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mel
1 - 100 of 141 matches
Mail list logo