How is physical interface selected in multiport eswitch mode for offloaded tunnel traffic on BlueFiled-2

Hi. I`m trying to use multiport eswitch mode and confused about the outgoing physical interface where I see packets after the hardware tunnel offloading

I have following configuration:

Enabled multiport eswitch mode with the following commands

sudo devlink dev param set pci/0000:03:00.0 name esw_multiport value true cmode runtime
sudo devlink dev param set pci/0000:03:00.1 name esw_multiport value true cmode runtime

Created geneve interface with the following command

sudo ip link add name geneve0 type geneve id 200 remote 192.168.3.2

Added vlan interface on p1 port

sudo ip l add link p1 name p1vlan23 type vlan id 23
sudo ip a add 192.168.23.2/24 dev p1vlan23

p1 port is connected to the router with ip 192.168.23.1 on vlan 23

I can ping 192.168.23.1 from BlueField and also I have the route to the remote of the geneve tunnel via this port p1

ip r get 192.168.3.2
192.168.3.2 via 192.168.23.1 dev p1vlan23 src 192.168.23.2 uid 1001
cache

Local geneve tunnel ip address is configured on loopback interface
ip a add 2.2.2.2/32 dev lo

ip -br a
lo UNKNOWN 127.0.0.1/8 2.2.2.2/32 ::1/128
oob_net0 UP 172.22.254.88/27 fe80::ba3f:d2ff:fe49:8184/64
tmfifo_net0 UP 192.168.100.2/30 fe80::21a:caff:feff:ff01/64
p0 UP fe80::ba3f:d2ff:fe49:817c/64
p1 UP fe80::ba3f:d2ff:fe49:817d/64
ovs-system UNKNOWN fe80::2854:48ff:fe3f:e45b/64
ovsbr1 DOWN
ovsbr2 DOWN
p1vlan23@p1 UP 192.168.23.2/24 fe80::ba3f:d2ff:fe49:817d/64
pf0hpf UP fe80::7011:56ff:fe93:1c5d/64
pf1hpf UP fe80::cc1a:b7ff:fe65:726a/64

ip -br l
lo UNKNOWN 00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>
oob_net0 UP b8:3f:d2:49:81:84 <BROADCAST,MULTICAST,UP,LOWER_UP>
tmfifo_net0 UP 00:1a:ca:ff:ff:01 <BROADCAST,MULTICAST,UP,LOWER_UP>
p0 UP b8:3f:d2:49:81:7c <BROADCAST,MULTICAST,UP,LOWER_UP>
p1 UP b8:3f:d2:49:81:7d <BROADCAST,MULTICAST,UP,LOWER_UP>
ovs-system UNKNOWN 2a:54:48:3f:e4:5b <BROADCAST,MULTICAST,UP,LOWER_UP>
ovsbr1 DOWN 16:a2:58:31:d3:43 <BROADCAST,MULTICAST>
ovsbr2 DOWN b8:3f:d2:49:81:7d <BROADCAST,MULTICAST>
p1vlan23@p1 UP b8:3f:d2:49:81:7d <BROADCAST,MULTICAST,UP,LOWER_UP>
pf0hpf UP 72:11:56:93:1c:5d <BROADCAST,MULTICAST,UP,LOWER_UP>
pf1hpf UP ce:1a:b7:65:72:6a <BROADCAST,MULTICAST,UP,LOWER_UP>
geneve0 UNKNOWN 62:68:55:03:59:31 <BROADCAST,MULTICAST,UP,LOWER_UP>

Add tc rule for ph1hpf representor

tc filter add dev pf1hpf protocol ipv4 parent ffff: \
flower \
skip_sw \
src_mac b8:3f:d2:49:81:77 \
dst_mac 7a:42:54:29:a4:ea \
action tunnel_key set \
src_ip 2.2.2.2 \
dst_ip 192.168.3.2 \
id 200 \
dst_port 6081 \
action mirred egress redirect dev geneve0

On host I use ip address 192.168.200.2, on remote geneve interface I have address 192.168.200.1
openvswitch is stopped

When I ping from host the remote
HOST: ping 192.168.200.1

I see that vlan and geneve headers are added according to p1 settings, but the packet is sent from the port p0

08:06:26.337074 b8:3f:d2:49:81:7d > 9c:74:6f:82:d2:db, ethertype 802.1Q (0x8100), length 152: vlan 23, p 0, ethertype IPv4 (0x0800), 2.2.2.2.58420 > 192.168.3.2.6081: Geneve, Flags [none], vni 0xc8, proto TEB (0x6558): b8:3f:d2:49:81:77 > 7a:42:54:29:a4:ea, ethertype IPv4 (0x0800), length 98: 192.168.200.2 > 192.168.200.1: ICMP echo request, id 48, seq 62, length 64

and if I disconnect the link on p0 port then packets are not sent at all

Is there any way to configure the outgoing interface for offloaded packets according to routing table?

DOCA version is 2.9.1
The network topology is in attachment

Hi,

Thanks for your question.
Please find the below links to the relevant docs.
https://docs.nvidia.com/doca/sdk/ovs-doca+hardware+acceleration/index.html#src-3528038821_id-.OVSDOCAHardwareAccelerationv2.10.0-MultiporteSwitchMode

https://doc.dpdk.org/guides/nics/mlx5.html#multiport-e-switch

In the case the multiport e-switch is not working as described in user manual, we’d recommend you to open a support case in Nvidia portal, or send an email to enterprisesupport@nvidia.com, and this case will be handled according to the support entitlement.

Best Regards,
Anatoly