tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: question about mbuf intialization



On Sep 20, 12:59pm, bschwart%bbn.com@localhost (Beverly Schwartz) wrote:
-- Subject: Re: question about mbuf intialization

| 
| On Sep 19, 2013, at 4:21 PM, Christos Zoulas <christos%astron.com@localhost> =
| wrote:
| 
| > In article <546B8CEC-0675-463F-B5C8-6A0FD5541B83%bbn.com@localhost>,
| > Beverly Schwartz  <bschwart%bbn.com@localhost> wrote:
| >>=20
| >> Any reason why we can't add
| >>    m->m_len =3D 0;
| >> to m_get, and
| >>    m->m_pkthdr.len =3D 0;
| >> to m_gethdr?
| >=20
| > Makes sense, but at the same time we should remove the superfluous =
| zeroing
| > from the other places...
| 
| A quick scan of the code shows that some of the time m_len is set to 0, =
| but more of the time, the library using it just sets it to its ultimate =
| value.
| 
| There are places in uipc_mbuf.c that immediately set m_len to 0 after =
| getting an mbuf, and I think it's fair to remove those.

Those are the ones I saw, how many more are there?

| It would take a commitment of time to go through all architectures, =
| devices and protocols to find every instance where there is a 0 =
| initialization that needs to be removed.  It's not a commitment of time =
| I am willing to make.

I'll check it out.

| So I guess my question is, would the list approve of a merge upstream of =
| changes to uipc_mbuf.c that include the two intializations listed above, =
| and removal of superflous initializations in just uipc_mbuf.c?

I think that the change is good.

| If the answer is yes, would someone who has authority to make changes to =
| the source be willing to put in the change?  I normally have gdt do =
| this, but he is not available to do a checkin at this time.

I would wait for more people to chime in.

christos


Home | Main Index | Thread Index | Old Index