Re: ifioctl() cleanup

2017-10-10 Thread Michele Curti
On Mon, Oct 09, 2017 at 04:34:38PM +0200, Martin Pieuchot wrote: > Here's a small cleanup to make it easy to push the NET_LOCK() further > down. > > Diff below factorize all ioctl requests need root privileges in one > switch () block. > > It moves SIOCIFAFATTACH/SIOCIFAFDETACH where it belongs,

em: minimum ethernet frame size

2018-02-02 Thread Michele Curti
Hi, in sys/dev/pci/if_em.c at line 469 there is: sc->hw.min_frame_size = ETHER_MIN_LEN + ETHER_CRC_LEN; But ETHER_MIN_LEN already includes the CRC size: #define ETHER_MIN_LEN 64 /* Minimum frame length, CRC included */ In revision 1.41 the code changed in this way:

ether_input: more goto dropanyway

2018-02-01 Thread Michele Curti
Hi, this diff makes more use of the goto dropanyway instead of repeating m_freem() and return. Also change the sizeof(etherbroadcastaddr) with ETHER_ADDR_LEN for consistency with the other memcmps. Regards, Michele Index: sys/net/if_ethersubr.c

Re: em: minimum ethernet frame size

2018-02-13 Thread Michele Curti
On Fri, Feb 09, 2018 at 03:40:13PM +0100, Martin Pieuchot wrote: > On 02/02/18(Fri) 12:18, Michele Curti wrote: > > Hi, > > in sys/dev/pci/if_em.c at line 469 there is: > > sc->hw.min_frame_size = > > ETHER_MIN_LEN + ETHER_CRC_LEN; > > > >