kubeovn / kube-ovn

A Bridge between SDN and Cloud Native (Project under CNCF)
https://kubeovn.github.io/docs/stable/en/
Apache License 2.0
1.94k stars 441 forks source link

Set socket priority and vlan_qos #2009

Closed oilbeater closed 1 year ago

oilbeater commented 1 year ago

In TSN(Time-Sensitive Networking) scenario, application, os and hardware work together to achieve very low transmission latency and high availability.

The traditional workflow may look like this:

  1. Application use SO_PRIORITY argument in setsockopt to set socket priority which will set the priority field in sk_buff structure.
  2. Use vconfig set_egress_map command to map skb-priority to vlan-qos, which is the pcp field in vlan 802.1Q header.
  3. Underlay switch will use the pcp value to QoS packets.

In Kube-OVN, we need to implement the Step 2 above to achieve same function that map skb-priority to vlan-qos. From ovs-fields.7 there is skb_priority to match however the doc said it's not supported. We need to try if it can work.

From ovs-ofctl.8 the mod_vlan_pcp action can be used to modify vlan priority.

hongzhen-ma commented 1 year ago

https://confluence.alauda.cn/pages/viewpage.action?pageId=130575555