> On 18 Oct 2018, at 15:55, Adrian Close <adr...@close.wattle.id.au> wrote:
>
> Hi all,
>
> When using PF queues on a VLAN interface on 6.3/amd64, I'm seeing the VLAN
> priority field always set to 7 for outbound traffic. For example:
>
> queue rootq_100 on vlan100 bandwidth 1G
> queue ltd_100 parent rootq_100 bandwidth 20M max 50M
> queue std_100 parent rootq_100 bandwidth 500M max 990M default
>
> If I disable these queue definitions on that interface, VLAN priority values
> (as seen with tcpdump on the vlandev) are a mix of things, eg. 0, 3 and 7
> (for CARP traffic), as I'd expect, but as soon as I put the queue rules back
> in, everything outbound is prio 7.
>
> I've tried setting "prio" values in PF rules but they seem to be ignored if
> queueing is enabled. It doesn't seem to make any difference if I use a
> non-default queue.
>
> I'm hoping to use these values else in my network (eg. having switches do
> something intelligent with priority 7 traffic) but that's harder when
> everything is 7!
>
> Does anyone have any clues on this? Hardware is Dell R620, Intel X520 ix
> interfaces with 10Gbps DACs, vlandev is a LACP trunk.
Hi Adrian :)
The HFSC code behind the pf queue configuration has this in it in
src/sys/net/hfsc.c:
struct mbuf *
hfsc_pf_enqueue(void *arg, struct mbuf *m)
{
struct hfsc_classq *cq = arg;
if (ml_len(&cq->q) >= cq->qlimit)
return (m);
ml_enqueue(&cq->q, m);
m->m_pkthdr.pf.prio = IFQ_MAXPRIO;
return (NULL);
}
ie, if HFSC is enabled, it forces packets to the highest priority, which ends
up on the wire with vlan(4).
I think the reasoning is that if hfsc is responsible for queueing packets, prio
on the wire shouldnt matter cos it is hfsc pacing the packets. However, it
could be argued that there is no harm it letting hfsc leave the prio on a
packet, especially as it does end up as a value on the wire you may want
another device to respect. Because hfsc ends up replacing the priq
implementation, leaving the prio on the packets does not affect how packets are
transmitted.
You could try removing the prio = IFQ_MAXPRIO line here and see what the effect
is. If the world doesn't end I can try committing it.
Cheers,
dlg