[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: question about mbuf intialization
On Sep 19, 2013, at 4:21 PM, Christos Zoulas <christos%astron.com@localhost>
> In article <546B8CEC-0675-463F-B5C8-6A0FD5541B83%bbn.com@localhost>,
> Beverly Schwartz <bschwart%bbn.com@localhost> wrote:
>> Any reason why we can't add
>> m->m_len = 0;
>> to m_get, and
>> m->m_pkthdr.len = 0;
>> to m_gethdr?
> 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.
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.
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?
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.
Main Index |
Thread Index |