RE: Use of genradix in sctp

2020-08-21 Thread David Laight
From: 'Marcelo Ricardo Leitner' > Sent: 21 August 2020 21:47 ... > > 3) Defer the allocation until the stream is used. > >for outbound streams this could remove the extra buffer. > > This can be tricky. What should happen if it gets a packet on a stream > that it couldn't allocate, and then an

RE: Use of genradix in sctp

2020-08-21 Thread David Laight
From: 'Marcelo Ricardo Leitner' > Sent: 21 August 2020 21:47 ... > > > > 2) Optimise the genradix lookup for the case where there > >is a single page - it can be completely inlined. > > And/or our struct sizes. > > __idx_to_offset() will basically do: > if (!is_power_of_2(obj_size)) {

Re: Use of genradix in sctp

2020-08-21 Thread 'Marcelo Ricardo Leitner'
On Wed, Aug 19, 2020 at 08:18:50AM +, David Laight wrote: > From:'Marcelo Ricardo Leitner > > Sent: 18 August 2020 22:38 > > > > On Tue, Aug 18, 2020 at 03:38:09PM +, David Laight wrote: > > > A few years ago (for 5.1) the 'arrays' that sctp uses for > > > info about data streams was chang

RE: Use of genradix in sctp

2020-08-19 Thread David Laight
From:'Marcelo Ricardo Leitner > Sent: 18 August 2020 22:38 > > On Tue, Aug 18, 2020 at 03:38:09PM +, David Laight wrote: > > A few years ago (for 5.1) the 'arrays' that sctp uses for > > info about data streams was changed to use the 'genradix' > > functions. > > > > I'm not sure of the reason

Re: Use of genradix in sctp

2020-08-18 Thread 'Marcelo Ricardo Leitner'
On Tue, Aug 18, 2020 at 03:38:09PM +, David Laight wrote: > A few years ago (for 5.1) the 'arrays' that sctp uses for > info about data streams was changed to use the 'genradix' > functions. > > I'm not sure of the reason for the change, but I don't > thing anyone looked at the performance imp

Use of genradix in sctp

2020-08-18 Thread David Laight
A few years ago (for 5.1) the 'arrays' that sctp uses for info about data streams was changed to use the 'genradix' functions. I'm not sure of the reason for the change, but I don't thing anyone looked at the performance implications. The code contains lots of SCTP_SI(stream, i) with the probable