Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/mbuf.h
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | struct m_tag { | ||||
SLIST_ENTRY(m_tag) m_tag_link; /* List of packet tags */ | SLIST_ENTRY(m_tag) m_tag_link; /* List of packet tags */ | ||||
u_int16_t m_tag_id; /* Tag ID */ | u_int16_t m_tag_id; /* Tag ID */ | ||||
u_int16_t m_tag_len; /* Length of data */ | u_int16_t m_tag_len; /* Length of data */ | ||||
u_int32_t m_tag_cookie; /* ABI/Module ID */ | u_int32_t m_tag_cookie; /* ABI/Module ID */ | ||||
void (*m_tag_free)(struct m_tag *); | void (*m_tag_free)(struct m_tag *); | ||||
}; | }; | ||||
/* | /* | ||||
* Static network interface owned tag. | |||||
* Allocated through ifp->if_snd_tag_alloc(). | |||||
*/ | |||||
struct m_snd_tag { | |||||
struct ifnet *ifp; /* network interface tag belongs to */ | |||||
}; | |||||
/* | |||||
* Record/packet header in first mbuf of chain; valid only if M_PKTHDR is set. | * Record/packet header in first mbuf of chain; valid only if M_PKTHDR is set. | ||||
* Size ILP32: 48 | * Size ILP32: 48 | ||||
* LP64: 56 | * LP64: 56 | ||||
* Compile-time assertions in uipc_mbuf.c test these values to ensure that | * Compile-time assertions in uipc_mbuf.c test these values to ensure that | ||||
* they are correct. | * they are correct. | ||||
*/ | */ | ||||
struct pkthdr { | struct pkthdr { | ||||
union { | |||||
struct m_snd_tag *snd_tag; /* send tag, if any */ | |||||
struct ifnet *rcvif; /* rcv interface */ | struct ifnet *rcvif; /* rcv interface */ | ||||
}; | |||||
gallatin: I thought we were going to turn the rcvif into a union, and make it a pointer to the snd_tag on… | |||||
Done Inline ActionsYes, we can do that, though I'm a little worried that someone will complain about nameless unions. What do you think? hselasky: Yes, we can do that, though I'm a little worried that someone will complain about nameless… | |||||
SLIST_HEAD(packet_tags, m_tag) tags; /* list of packet tags */ | SLIST_HEAD(packet_tags, m_tag) tags; /* list of packet tags */ | ||||
int32_t len; /* total packet length */ | int32_t len; /* total packet length */ | ||||
/* Layer crossing persistent information. */ | /* Layer crossing persistent information. */ | ||||
uint32_t flowid; /* packet's 4-tuple system */ | uint32_t flowid; /* packet's 4-tuple system */ | ||||
uint64_t csum_flags; /* checksum and offload features */ | uint64_t csum_flags; /* checksum and offload features */ | ||||
uint16_t fibnum; /* this packet should use this fib */ | uint16_t fibnum; /* this packet should use this fib */ | ||||
uint8_t cosqos; /* class/quality of service */ | uint8_t cosqos; /* class/quality of service */ | ||||
▲ Show 20 Lines • Show All 1,165 Lines • Show Last 20 Lines |
I thought we were going to turn the rcvif into a union, and make it a pointer to the snd_tag on xmit?