On 2016/06/06 23:52, Vincent Gross wrote:
> On Mon, 6 Jun 2016 17:33:36 +0100
> Stuart Henderson <[email protected]> wrote:
> 
> > On 2016/06/06 16:15, Vincent Gross wrote:
> > > When sending ARP requests, or when writing to a bpf handle (as when
> > > sending DHCP Discover), we bypass pf(4) so we have no way to define
> > > the priority (m->m_pkthdr.pf.prio) of the outgoing packets.
> [...]
> > > 
> > > This diff adds
> > > 1) an if_llprio field to struct ifnet  
> > 
> > struct if_data.. this is used by enough ports that changing the abi
> [...]
> > 
> > > diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8  
> > 
> > BTW. patch warns about offsets if you apply this to -current.
> > 
> [...]
> > 
> > Other than these points, it seems a useful thing to do, pppoe could
> > use it too.
> > 
> > I wonder what these broken ISP devices are that require the
> > priority field in the vlan frame header to be 0 (aka "prio 1")...
> > 
> 
> r2 below. I moved if_llprio from if_data to struct ifnet, and went from
> u_char to u_int8_t. I also added a bound check in ifioctl().
> 
> Comments ? ok ?

This works for me, and seeing as it seems somewhat common that
ISPs have such broken equipment, I think it makes sense to provide
a way to do this. Fewer ports use struct ifnet than if_data, and
this positioning in struct ifnet looks good for those that do
use it.

I'd like to hear others' comments though.

It would probably be better to print llprio on the "index X
priority Y" line rather than after the mtu, though this
complicates the "whether to print \t" decision a bit.

Reply via email to