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
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
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
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
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
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
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
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
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
---
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 1 -
1 file c
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
When max modify header action is zero, we return -EOPNOTSUPP
directly. In this way, we can ignore wrong message info (e.g.
"mlx5: parsed 0 pedit actions, can't do more").
This happens when offloading pedit actions on mlx VFs.
For example:
$ tc filter add dev mlx_vfs parent f
From: Tonghao Zhang
This patch is a little improvement. Simplify the parse_tc_fdb_actions().
Signed-off-by: Tonghao Zhang
---
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
From: Tonghao Zhang
This patch allow users to enable/disable VFs link state
on switchdev mode.
Signed-off-by: Tonghao Zhang
---
drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 +
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c |
From: Tonghao Zhang
This serial patches are not bugfixes, and just little improvement for mlx5e.
v1->v2
Patch 1: remove the duplicated error messages and stick to extack only
Patch 2: use the 'unknown' instead of empty string
Patch 5: is new patch
Tonghao Zhang (5):
net/mlx5e: Return -EOPNOTS
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
---
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 1 -
1 file c
From: Tonghao Zhang
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.
For example: (p2p1_0 is VF net device)
tc filter add dev p2p1_0 protocol ip pa
From: Tonghao Zhang
When max modify header action is zero, we return -EOPNOTSUPP
directly. In this way, we can ignore wrong message info (e.g.
"mlx5: parsed 0 pedit actions, can't do more").
This happens when offloading pedit actions on mlx VFs.
For example:
$ tc filter add dev mlx5_vf parent f
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
---
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
From: Tonghao Zhang
This serial patches are not bugfixes, and just little improvement for mlx5e.
v2->v3:
Patch 1 and 5 are merged to patch 4 now.
v1->v2
Patch 1: remove the duplicated error messages and stick to extack only
Patch 2: use the 'unknown' instead of empty string
Patch 5: is new patch
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
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
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
* 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
The capacity of FDB offloading and NIC offloading table are
different, and when allocating the pedit actions, we should
use the correct namespace type.
Fixes: c500c86b0c75d ("net/mlx5e: support for two independent packet edit
actions")
Cc: Pablo Neira Ayuso
Signed-off-by: T
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
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 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
* 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
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
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
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
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
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
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:
| 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 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
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
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
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
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:
| 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 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
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
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 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
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
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
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
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
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
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
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
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
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,
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
[ 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
[ 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
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
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 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
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
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: 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.
If Rx checksum is disabled, LRO should also be disabled.
Cc: Michael S. T
From: Tonghao Zhang
When we offload tc filters to hardware, hardware flows can
be updated when mac of encap destination ip is changed.
But we ignore one case, that the mac of local encap ip can
be changed too, so we should also update them.
To fix it, add route_dev in mlx5e_encap_entry struct to
From: Tonghao Zhang
When we offload tc filters to hardware, hardware flows can
be updated when mac of encap destination ip is changed.
But we ignore one case, that the mac of local encap ip can
be changed too, so we should also update them.
To fix it, add route_dev in mlx5e_encap_entry struct to
From: Tonghao Zhang
The devconf setting on the init_net will affect other
namespace when them created. For example:
$ cat /proc/sys/net/ipv4/conf/all/rp_filter
0
$ echo 2 > /proc/sys/net/ipv4/conf/all/rp_filter
$ cat /proc/sys/net/ipv4/conf/all/rp_filter
2
$ ip netns add ns100
$ ip netns exec n
From: Tonghao Zhang
In some case, we may use multiple pedit actions to modify packets.
The command shown as below: the last pedit action is effective.
$ tc filter add dev netdev_rep parent : protocol ip prio 1 \
flower skip_sw ip_proto icmp dst_ip 3.3.3.3 \
From: Tonghao Zhang
Allow default ip_proto to offload, so icmp, tcp, and udp
will match the flow as show below, otherwise we must type the
ip_proto for icmp, tcp and udp respectively.
$ tc filter add dev netdev01_rep parent : protocol ip prio 1 \
flower skip_sw dst_ip 3.3.3.3 \
From: Tonghao Zhang
In some case, we may use multiple pedit actions to modify packets.
The command shown as below: the last pedit action is effective.
$ tc filter add dev netdev_rep parent : protocol ip prio 1 \
flower skip_sw ip_proto icmp dst_ip 3.3.3.3 \
From: Tonghao Zhang
When we offload tc filters to hardware, hardware flows can
be updated when mac of encap destination ip is changed.
But we ignore one case, that the mac of local encap ip can
be changed too, so we should also update them.
To fix it, add route_dev in mlx5e_encap_entry struct to
From: Tonghao Zhang
When we offload tc filters to hardware, hardware flows can
be updated when mac of encap destination ip is changed.
But we ignore one case, that the mac of local encap ip can
be changed too, so we should also update them.
To fix it, add route_dev in mlx5e_encap_entry struct to
1 - 100 of 141 matches
Mail list logo