tech-net archive

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

Re: mbuf initialization macros



    Date:        Mon, 18 Apr 2016 13:34:07 +0900
    From:        Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost>
    Message-ID:  <571463BF.30607%iij.ad.jp@localhost>

  | Some of the functions set m_flags and m_nextpkt, however m_flags is
  | almost set 0 and m_nextpkt is always set NULL. So I don't add these
  | fields.

That's fine.

  | Hmm, in the mbuf stack allocating functions, only dp8390_ipkdb_send()
  | @sys/dev/ic/dp8390.c sets M_PKTHDR to m_flags. The function doesn't
  | set m_pkthdr fields explicitly. Furthermore, other M_PKTHDR mbuf using
  | functions use MGETDHR() or m_gethdr(). So, I think m_pkthdr_init()
  | don't need to add params except for mbuf.

Also fine.

  | I reflect above comments. Here is updated patch.
[...]
  | Could you comment this patch?

As Christos said, you don't need prototypes for inline functions declared
in a header file (the declaration is its own prototype) unless they are going
to refer to each other (in which case they couldn't really be inline).

Aside from that, the changes you're proposing look fine to me.  The __unused
that Christos mentioned, and the prototype for m_length, is not one of your
changes, and should probably be considered as a separate issue.

kre



Home | Main Index | Thread Index | Old Index