VLAN + PCP bit is not honoured when using CX card in switchdev with OVS

Hi Team,

I am using CX7 card in switchdev mode with OVS for Data path offloading for ROCE testing.
We are using VLAN + PCP is set to 3 for the packets coming out of VM.
ahv6 is the representor for the VF which is assigned to VM and eth3 is the uplink port.

As ROCE need loss less ethernet so we want to use PCP bit in the VLAN for flow control so used mlx_qos for the config. I am not able to see the packets in prio3 queue. Any thing I am missing. Please help on this query.

>> OVS flow which is offloaded to eswitch
ufid:e5e38cda-0d1d-4064-b4ee-ca3af28c0c79, recirc_id(0),dp_hash(0/0),skb_priority(0/0),in_port(ahv6),skb_mark(0/0),ct_state(0/0),ct_zone(0/0),ct_mark(0/0),ct_label(0/0),packet_type(ns=0/0,id=0/0),eth(src=50:6b:8d:77:ec:c2,dst=50:6b:8d:52:cd:9b),eth_type(0x0800),ipv4(src=0.0.0.0/0.0.0.0,dst=0.0.0.0/0.0.0.0,proto=17,tos=0/0,ttl=0/0,frag=no),udp(src=0/0,dst=4791), packets:10009, bytes:5865274, used:1.920s, offloaded:yes, dp:tc, actions:push_vlan(vid=222,pcp=3),eth3

$mlnx_qos -i eth3

DCBX mode: OS controlled
Priority trust state: pcp
default priority:
Receive buffer size (bytes): 20016,156096,0,0,0,0,0,0,max_buffer_size=1027728
Cable len: 7
PFC configuration:
priority 0 1 2 3 4 5 6 7
enabled 0 0 0 1 0 0 0 0
buffer 0 0 0 1 0 0 0 0
tc: 0 ratelimit: unlimited, tsa: vendor
priority: 1
tc: 1 ratelimit: unlimited, tsa: vendor
priority: 0
tc: 2 ratelimit: unlimited, tsa: vendor
priority: 2
tc: 3 ratelimit: unlimited, tsa: vendor
priority: 3
tc: 4 ratelimit: unlimited, tsa: vendor
priority: 4
tc: 5 ratelimit: unlimited, tsa: vendor
priority: 5
tc: 6 ratelimit: unlimited, tsa: vendor
priority: 6
tc: 7 ratelimit: unlimited, tsa: vendor
priority: 7

$ ethtool -S eth3 | grep prio3

rx_prio3_bytes: 28470
rx_prio3_packets: 405
rx_prio3_discards: 0
tx_prio3_bytes: 456602
tx_prio3_packets: 773
rx_prio3_pause: 0
rx_prio3_pause_duration: 0
tx_prio3_pause: 12
tx_prio3_pause_duration: 6
rx_prio3_pause_transition: 0
rx_prio3_buf_discard: 0
rx_prio3_cong_discard: 0
rx_prio3_marked: 0

Hi,

You are already marking VLAN PCP 3 and have PFC enabled on priority 3; the missing piece is that only switchdev-originated traffic on the uplink (eth3) will hit tx_prio3_* counters, and in your setup the offloaded VF→uplink path bypasses that per-priority accounting, so you will not see the expected increment on eth3 even though lossless behavior is in effect.

You can verify that the VLAN tag and PCP are correct on the wire usgin tcpdump on the switch to confirm 802.1p value 3 in the VLAN header.

Please ensure that the remote side uses the same mapping.

Generally - this is an observability limitation and not a misconfiguration.

Thanks,

Jonathan.

Thanks Jonathan for the response.

Under congestion, will flow control is honoured by eth3 and prio3 will receive pause frames?