Re: refactor m_makespace() to use MCLGETI

2017-05-27 Thread Alexander Bluhm
On Sat, May 27, 2017 at 09:38:28AM +0200, Claudio Jeker wrote: > The MLEN check is for n which never has m_type MT_HEADER. n is allocated > with MGET() and we want to put remain bytes into it. If that is bigger > than MLEN it will not fit and we allocate a cluster. You are right. I was confused b

Re: refactor m_makespace() to use MCLGETI

2017-05-27 Thread Claudio Jeker
On Fri, May 26, 2017 at 10:24:23PM +0200, Alexander Bluhm wrote: > On Fri, May 26, 2017 at 05:38:07PM +0200, Claudio Jeker wrote: > > m_makespace() is using an old way to build up the mbuf chain. By using > > MCLGETI() a lot of the code can be simplified and results at least in my > > opinion in be

Re: refactor m_makespace() to use MCLGETI

2017-05-26 Thread Alexander Bluhm
On Fri, May 26, 2017 at 05:38:07PM +0200, Claudio Jeker wrote: > m_makespace() is using an old way to build up the mbuf chain. By using > MCLGETI() a lot of the code can be simplified and results at least in my > opinion in better readable code. In some cases this may reduce the number Yes, the ne

refactor m_makespace() to use MCLGETI

2017-05-26 Thread Claudio Jeker
m_makespace() is using an old way to build up the mbuf chain. By using MCLGETI() a lot of the code can be simplified and results at least in my opinion in better readable code. In some cases this may reduce the number of MGET and MCLGET calls so it may be a bit quicker... OK? -- :wq Claudio Inde