Re: [PATCHv2 net-next 1/6] sctp: add sctp_info dump api for sctp_diag

2016-04-10 Thread Jamal Hadi Salim
On 16-04-09 01:21 PM, Eric Dumazet wrote: Well, once a hole is there, nothing we can do really, because of compatibility with old kernels / old binaries. But when a _new_ structure is defined, this is the time where we can ask for doing sensible things ;) This one is fixable. sizeof() alre

Re: [PATCHv2 net-next 1/6] sctp: add sctp_info dump api for sctp_diag

2016-04-09 Thread Xin Long
On Sat, Apr 9, 2016 at 11:16 PM, Jamal Hadi Salim wrote: > Appreciate these patches. Finally some love for sctp. > Small comment below: > > > On 16-04-09 12:53 AM, Xin Long wrote: >> >> sctp_diag will dump some important details of sctp's assoc or ep, we use >> sctp_info to describe them, sctp_ge

Re: [PATCHv2 net-next 1/6] sctp: add sctp_info dump api for sctp_diag

2016-04-09 Thread Eric Dumazet
On Sun, 2016-04-10 at 00:10 +0800, Xin Long wrote: > 1. sctp_diag_dump_one -> sctp_transport_lookup_process-> sctp_tsp_dump_one > this one just holds the tsp. and we're using list_for_each_safe here now, > isn't it enough ? list_for_each_safe is 'safe' if you do a list_del() yourself. It is not

Re: [PATCHv2 net-next 1/6] sctp: add sctp_info dump api for sctp_diag

2016-04-09 Thread Eric Dumazet
On Sun, 2016-04-10 at 00:10 +0800, Xin Long wrote: > On Sat, Apr 9, 2016 at 1:19 PM, Eric Dumazet wrote: > > On Sat, 2016-04-09 at 12:53 +0800, Xin Long wrote: > >> sctp_diag will dump some important details of sctp's assoc or ep, we use > >> sctp_info to describe them, sctp_get_sctp_info to get

Re: [PATCHv2 net-next 1/6] sctp: add sctp_info dump api for sctp_diag

2016-04-09 Thread Eric Dumazet
On Sat, 2016-04-09 at 11:19 -0400, Jamal Hadi Salim wrote: > On 16-04-09 01:16 AM, Eric Dumazet wrote: > > > > > Lots of holes in this structure... > > > > > > > I may have mentioned to you that there is 8 bit hole in tcp_info too ;-> > (above tcpi_rto). Adding an 8 bit explicit pad seems useful

Re: [PATCHv2 net-next 1/6] sctp: add sctp_info dump api for sctp_diag

2016-04-09 Thread Xin Long
On Sat, Apr 9, 2016 at 1:19 PM, Eric Dumazet wrote: > On Sat, 2016-04-09 at 12:53 +0800, Xin Long wrote: >> sctp_diag will dump some important details of sctp's assoc or ep, we use >> sctp_info to describe them, sctp_get_sctp_info to get them, and export >> it to sctp_diag.ko. >> > > >> +int sctp

Re: [PATCHv2 net-next 1/6] sctp: add sctp_info dump api for sctp_diag

2016-04-09 Thread Xin Long
On Sat, Apr 9, 2016 at 1:16 PM, Eric Dumazet wrote: > On Sat, 2016-04-09 at 12:53 +0800, Xin Long wrote: >> sctp_diag will dump some important details of sctp's assoc or ep, we use >> sctp_info to describe them, sctp_get_sctp_info to get them, and export >> it to sctp_diag.ko. >> >> Signed-off-by

Re: [PATCHv2 net-next 1/6] sctp: add sctp_info dump api for sctp_diag

2016-04-09 Thread Jamal Hadi Salim
On 16-04-09 01:16 AM, Eric Dumazet wrote: Lots of holes in this structure... I may have mentioned to you that there is 8 bit hole in tcp_info too ;-> (above tcpi_rto). Adding an 8 bit explicit pad seems useful since it is already in the wild. I was going to send the patch after netdev11 bu

Re: [PATCHv2 net-next 1/6] sctp: add sctp_info dump api for sctp_diag

2016-04-09 Thread Jamal Hadi Salim
Appreciate these patches. Finally some love for sctp. Small comment below: On 16-04-09 12:53 AM, Xin Long wrote: sctp_diag will dump some important details of sctp's assoc or ep, we use sctp_info to describe them, sctp_get_sctp_info to get them, and export it to sctp_diag.ko. Signed-off-by: Xi

Re: [PATCHv2 net-next 1/6] sctp: add sctp_info dump api for sctp_diag

2016-04-08 Thread Eric Dumazet
On Sat, 2016-04-09 at 12:53 +0800, Xin Long wrote: > sctp_diag will dump some important details of sctp's assoc or ep, we use > sctp_info to describe them, sctp_get_sctp_info to get them, and export > it to sctp_diag.ko. > > +int sctp_get_sctp_info(struct sock *sk, struct sctp_association *asoc

Re: [PATCHv2 net-next 1/6] sctp: add sctp_info dump api for sctp_diag

2016-04-08 Thread Eric Dumazet
On Sat, 2016-04-09 at 12:53 +0800, Xin Long wrote: > sctp_diag will dump some important details of sctp's assoc or ep, we use > sctp_info to describe them, sctp_get_sctp_info to get them, and export > it to sctp_diag.ko. > > Signed-off-by: Xin Long > --- > include/linux/sctp.h| 65 +

[PATCHv2 net-next 1/6] sctp: add sctp_info dump api for sctp_diag

2016-04-08 Thread Xin Long
sctp_diag will dump some important details of sctp's assoc or ep, we use sctp_info to describe them, sctp_get_sctp_info to get them, and export it to sctp_diag.ko. Signed-off-by: Xin Long --- include/linux/sctp.h| 65 + include/net/sctp/sctp.h | 3 ++ ne