Cleanup packetbuf: use rime attributes and addresses only when rime is enabled. Saves 32 byte per queuebuf in the non-rime case.
This commit is contained in:
parent
415506c3f6
commit
bd4233a953
5 changed files with 23 additions and 6 deletions
|
@ -354,9 +354,11 @@ enum {
|
|||
PACKETBUF_ATTR_RELIABLE,
|
||||
PACKETBUF_ATTR_PACKET_ID,
|
||||
PACKETBUF_ATTR_PACKET_TYPE,
|
||||
#if NETSTACK_CONF_WITH_RIME
|
||||
PACKETBUF_ATTR_REXMIT,
|
||||
PACKETBUF_ATTR_MAX_REXMIT,
|
||||
PACKETBUF_ATTR_NUM_REXMIT,
|
||||
#endif /* NETSTACK_CONF_WITH_RIME */
|
||||
PACKETBUF_ATTR_PENDING,
|
||||
PACKETBUF_ATTR_FRAME_TYPE,
|
||||
#if LLSEC802154_SECURITY_LEVEL
|
||||
|
@ -371,18 +373,22 @@ enum {
|
|||
#endif /* LLSEC802154_SECURITY_LEVEL */
|
||||
|
||||
/* Scope 2 attributes: used between end-to-end nodes. */
|
||||
#if NETSTACK_CONF_WITH_RIME
|
||||
PACKETBUF_ATTR_HOPS,
|
||||
PACKETBUF_ATTR_TTL,
|
||||
PACKETBUF_ATTR_EPACKET_ID,
|
||||
PACKETBUF_ATTR_EPACKET_TYPE,
|
||||
PACKETBUF_ATTR_ERELIABLE,
|
||||
#endif /* NETSTACK_CONF_WITH_RIME */
|
||||
|
||||
/* These must be last */
|
||||
PACKETBUF_ADDR_SENDER,
|
||||
PACKETBUF_ADDR_RECEIVER,
|
||||
#if NETSTACK_CONF_WITH_RIME
|
||||
PACKETBUF_ADDR_ESENDER,
|
||||
PACKETBUF_ADDR_ERECEIVER,
|
||||
|
||||
#endif /* NETSTACK_CONF_WITH_RIME */
|
||||
|
||||
PACKETBUF_ATTR_MAX
|
||||
};
|
||||
|
||||
|
@ -404,7 +410,11 @@ enum {
|
|||
};
|
||||
#endif /* LLSEC802154_USES_EXPLICIT_KEYS */
|
||||
|
||||
#if NETSTACK_CONF_WITH_RIME
|
||||
#define PACKETBUF_NUM_ADDRS 4
|
||||
#else /* NETSTACK_CONF_WITH_RIME */
|
||||
#define PACKETBUF_NUM_ADDRS 2
|
||||
#endif /* NETSTACK_CONF_WITH_RIME */
|
||||
#define PACKETBUF_NUM_ATTRS (PACKETBUF_ATTR_MAX - PACKETBUF_NUM_ADDRS)
|
||||
#define PACKETBUF_ADDR_FIRST PACKETBUF_ADDR_SENDER
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue