stack devices

壤驷经国
2023-12-01

$ git format-patch -o ~/stack_devices/1 b055ecf5827d81a60144560266a78fea652bdf1a..8914add2c9e5518f6a864936658bba5752510b39

$ ll
total 312K
-rw-r--r-- 1 cmi nvu 8.8K May 25 09:04 0001-net-mlx5e-E-Switch-Maintain-vhca_id-to-vport_num-map.patch
-rw-r--r-- 1 cmi nvu 1.5K May 25 09:04 0002-net-mlx5e-Always-set-attr-mdev-pointer.patch
-rw-r--r-- 1 cmi nvu 8.9K May 25 09:04 0003-net-mlx5-E-Switch-Refactor-rule-offload-forward-acti.patch
-rw-r--r-- 1 cmi nvu  17K May 25 09:04 0004-net-mlx5e-VF-tunnel-TX-traffic-offloading.patch
-rw-r--r-- 1 cmi nvu  14K May 25 09:04 0005-net-mlx5e-Refactor-tun-routing-helpers.patch
-rw-r--r-- 1 cmi nvu  24K May 25 09:04 0006-net-mlx5-E-Switch-Indirect-table-infrastructure.patch
-rw-r--r-- 1 cmi nvu 1.7K May 25 09:04 0007-net-mlx5e-Remove-redundant-match-on-tunnel-destinati.patch
-rw-r--r-- 1 cmi nvu  20K May 25 09:04 0008-net-mlx5e-VF-tunnel-RX-traffic-offloading.patch
-rw-r--r-- 1 cmi nvu 5.7K May 25 09:04 0009-net-mlx5e-Refactor-reg_c1-usage.patch
-rw-r--r-- 1 cmi nvu  13K May 25 09:04 0010-net-mlx5e-Match-recirculated-packet-miss-in-slow-tab.patch
-rw-r--r-- 1 cmi nvu  61K May 25 09:04 0011-net-mlx5e-Extract-tc-tunnel-encap-decap-code-to-dedi.patch
-rw-r--r-- 1 cmi nvu  18K May 25 09:04 0012-net-mlx5e-Create-route-entry-infrastructure.patch
-rw-r--r-- 1 cmi nvu  14K May 25 09:04 0013-net-mlx5e-Refactor-neigh-update-infrastructure.patch
-rw-r--r-- 1 cmi nvu  15K May 25 09:04 0014-net-mlx5e-TC-preparation-refactoring-for-routing-upd.patch
-rw-r--r-- 1 cmi nvu 5.4K May 25 09:04 0015-net-mlx5e-Rename-some-encap-specific-API-to-generic-.patch
-rw-r--r-- 1 cmi nvu  40K May 25 09:04 0016-net-mlx5e-Handle-FIB-events-to-update-tunnel-endpoin.patch

encap

VF2 TC rule

First of all, packet comes from rep2 (match 30000)
encap + header rewrite (MLX5_ESW_DEST_CHAIN_WITH_SRC_PORT_CHANGE) from 3 to 2

=== chain: 0, prio: 2, level: 0 ===
prio ffff902d29839180, ref: 4
next_fdb: ffff902eddc53800, miss_group: ffff902d0a908d98, miss_rule: mlx5_flow_handle ffff902d2fe9c840

flow table name:
flow table id: 80001 table_level: 1,         type: 4 (FS_FT_FDB: 4, FS_FT_NIC_RX: 0, max_fte: 1048576, 100000), refcount: 5
mlx5_flow_table ffff902d31510800
mlx5_flow_group ffff902e9878a8c8
fs_fte ffff902c48685e50
       0:  s: 02:25:d0:05:01:02 d: 24:25:d0:e1:00:00 ipv: 4  reg_c0: 30000 action:   5c
modify_hdr id: 251
                mlx5_flow_rule ffff902e264d2200
                        dest: counter_id: 800000
                mlx5_flow_rule ffff902e264d2a00
                        dest: ft: ffff902eb9034000 (root table)
                        
Recirculate to root table.

VF1 TC rule

After encap, dst mac is 0c:42:a1:60:62:ac which is the remote pf mac.
02:25:d0:05:01:01 is VF1 mac. metadata is 2.

=== chain: 0, prio: 2, level: 0 ===
prio ffff902d29839180, ref: 4
next_fdb: ffff902eddc53800, miss_group: ffff902d0a908d98, miss_rule: mlx5_flow_handle ffff902d2fe9c840

flow table name:
flow table id: 80001 table_level: 1,         type: 4 (FS_FT_FDB: 4, FS_FT_NIC_RX: 0, max_fte: 1048576, 100000), refcount: 5
mlx5_flow_table ffff902d31510800
mlx5_flow_group ffff902d0a908000
fs_fte ffff902ea3c76a70
    ffff:  s: 02:25:d0:05:01:01 d: 0c:42:a1:60:62:ac ipv: 4  reg_c0: 20000 action:    c
                mlx5_flow_rule ffff902d229f6400
                        dest: counter_id: 800001
                mlx5_flow_rule ffff902d229f5e00
                        dest: vport: ffff
                        

decap

First of all, packet comes from uplink rep (match 120000)

=== chain: 0, prio: 2, level: 0 ===
prio ffff902d29839180, ref: 4
next_fdb: ffff902eddc53800, miss_group: ffff902d0a908d98, miss_rule: mlx5_flow_handle ffff902d2fe9c840

flow table name:
flow table id: 80001 table_level: 1,         type: 4 (FS_FT_FDB: 4, FS_FT_NIC_RX: 0, max_fte: 1048576, 100000), refcount: 5
mlx5_flow_table ffff902d31510800
mlx5_flow_group ffff902d0a908000
fs_fte ffff902ea3c74000
   10000:  s: 0c:42:a1:60:62:ac d: 02:25:d0:05:01:01 ipv: 4  reg_c0: 120000 action:    c
                mlx5_flow_rule ffff902d229f5600
                        dest: counter_id: 800002
                mlx5_flow_rule ffff902d229f5c00
                        dest: ft: ffff902d31511000 (indir table port 1)
                        
 ========= 1 =========

Only match dst ip and vni and recirculate to root table.
For other packets, forward to vport 1 using miss rule.

flow table name:
flow table id: 10 table_level: 1,         type: 4 (FS_FT_FDB: 4, FS_FT_NIC_RX: 0, max_fte: 128, 80), refcount: 3
mlx5_flow_table ffff902d31511000
mlx5_flow_group ffff902d0a908910
fs_fte ffff902e95b5b080
       0:  s: 00:00:00:00:00:00 d: 00:00:00:00:00:00 ipv: 4  dst_ip:  192.168.1.5 vni:      4 reg_c0: 120000
           s: 00:00:00:00:00:00 d: 00:00:00:00:00:00 et: 0 action:   44
modify_hdr id: 252
                mlx5_flow_rule ffff902d288a9000
                        dest: ft: ffff902eb9034000 (root table)
mlx5_flow_group ffff902d0a90daa0
fs_fte ffff902ea3c77998
      7f:  s: 00:00:00:00:00:00 d: 00:00:00:00:00:00 action:    4
                mlx5_flow_rule ffff902d229f5000
                        dest: vport: 1

=== chain: 0, prio: 2, level: 0 ===
prio ffff902d29839180, ref: 4
next_fdb: ffff902eddc53800, miss_group: ffff902d0a908d98, miss_rule: mlx5_flow_handle ffff902d2fe9c840

flow table name:
flow table id: 80001 table_level: 1,         type: 4 (FS_FT_FDB: 4, FS_FT_NIC_RX: 0, max_fte: 1048576, 100000), refcount: 5
mlx5_flow_table ffff902d31510800
mlx5_flow_group ffff902c7185fa58
fs_fte ffff902e95b5b388
   1fffe:  s: 00:00:00:00:00:00 d: 00:00:00:00:00:00 ip: 17 ipv: 4  dport:   4789 src_ip:  192.168.1.6 dst_ip:  192.168.1.5 vni:      4 reg_c0: 20000
           s: 24:25:d0:e1:00:00 d: 02:25:d0:05:01:02 et: 0 ipv: 4  action:   2c
                mlx5_flow_rule ffff902d3464fc00
                        dest: counter_id: 800003
                mlx5_flow_rule ffff902d288aaa00
                        dest: ft: ffff902d20ce7800 (indir table port 2)
                        
 ========= 2 =========

flow table name:
flow table id: 11 table_level: 1,         type: 4 (FS_FT_FDB: 4, FS_FT_NIC_RX: 0, max_fte: 128, 80), refcount: 3
mlx5_flow_table ffff902d20ce7800
mlx5_flow_group ffff902c7185f5d0
mlx5_flow_group ffff902c7185ecc0
fs_fte ffff902e95b59840
      7f:  s: 00:00:00:00:00:00 d: 00:00:00:00:00:00 action:    4
                mlx5_flow_rule ffff902d288aac00
                        dest: vport: 2

 类似资料:

相关阅读

相关文章

相关问答