usbd_get_cdesc() malloc(size)/free(,size) sanity

2020-08-28 Thread Marcus Glocker
Since we can't always rely on wTotalLength to be correct, use the variable which has been used to malloc(9) cdesc to free(9) it again, instead of freeing wTotalLength. usbd_get_cdesc() already has the feature built-in to return the length it has used to malloc(9) cdesc. OK? Index: ugen.c

pppx(4)/pipex(4): use per cpu counters with ifnet

2020-08-28 Thread Vitaliy Makkoveev
pppac(4) uses per cpu counters for collect `ifnet' statistics, but in pipex(4) layer this `ifnet' still uses `if_data'. Also pppx(4) doesn't use per cpu counters but `if_data'. I propose to use per cpu counters for pppx(4) and pipex(4) to avoid interface statistics collecting mix. Also this will

pipex(4)/ppp{ac,x}(4): don't include "net/netisr.h"

2020-08-28 Thread Vitaliy Makkoveev
It's not needed here. Index: sys/net/if_pppx.c === RCS file: /cvs/src/sys/net/if_pppx.c,v retrieving revision 1.102 diff -u -p -r1.102 if_pppx.c --- sys/net/if_pppx.c 27 Aug 2020 10:47:52 - 1.102 +++ sys/net/if_pppx.c 28