Setting priority per flow
Meny Yossefi
menyy at mellanox.com
Mon Dec 25 11:34:57 UTC 2017
Hi all,
I'd like to set priority per flow in FreeBSD for PFC use.
In Linux, I can do so using a socket option (SO_PRIORITY) which eventually will be mapped into the PCP bits in the VLAN tag.
Is there a FreeBSD equivalent? So far I could only find an 'ifconfig' option to set PCP ('vlanpcp'), but that's only per VLAN interface, not a specific flow.
Also, is there a way to configure prio-tagging (priority over VLAN ID 0)? It seems that setting VLAN with ID 0 is not permitted:
sys/net/if_vlan.c, vlan_config() lines 1418:
/*
* Don't let the caller set up a VLAN VID with
* anything except VLID bits.
* VID numbers 0x0 and 0xFFF are reserved.
*/
if (vid == 0 || vid == 0xFFF || (vid & ~EVL_VLID_MASK))
return (EINVAL);
Nothing on the receive side suggests this case is being handled as well.
I Would appreciate an elaborated answer in case I'm missing something here.
Thanks in advance,
Meny
More information about the freebsd-net
mailing list