/freebsd/usr.sbin/ppp/ |
H A D | mbuf.h | 31 struct mbuf { struct 36 struct mbuf *m_next; /* link to next mbuf */ argument 37 struct mbuf *m_nextpkt; /* link to next packet */ argument 43 struct mbuf *top; argument 44 struct mbuf *last; 99 #define M_MAXLEN (4352 - sizeof(struct mbuf)) /* > HDLCSIZE */ 103 extern size_t m_length(struct mbuf *); 104 extern struct mbuf *m_get(size_t, int); 105 extern struct mbuf *m_free(struct mbuf *); 106 extern void m_freem(struct mbuf *); [all …]
|
H A D | mbuf.c | 60 struct mbuf m; 63 } *bucket[(M_MAXLEN + sizeof(struct mbuf)) / BUCKET_HASH]; 65 #define M_BINDEX(sz) (((sz) + sizeof(struct mbuf) - 1) / BUCKET_HASH) 70 struct mbuf *queue; 78 m_length(struct mbuf *bp) in m_length() 103 struct mbuf * 107 struct mbuf *bp; in m_get() 153 memset(bp, '\0', sizeof(struct mbuf)); in m_get() 164 struct mbuf * 165 m_free(struct mbuf *bp) in m_free() [all …]
|
/freebsd/sys/sys/ |
H A D | mbuf.h | 92 struct mbuf; 93 #define MHSIZE offsetof(struct mbuf, m_dat) 94 #define MPKTHSIZE offsetof(struct mbuf, m_pktdat) 265 typedef void m_ext_free_t(struct mbuf *); 329 struct mbuf { struct 338 struct mbuf *m_next; argument 339 SLIST_ENTRY(mbuf) m_slist; 340 STAILQ_ENTRY(mbuf) m_stailq; 343 struct mbuf *m_nextpkt; argument 344 SLIST_ENTRY(mbuf) m_slistpkt; [all …]
|
H A D | sockbuf.h | 68 struct mbuf; 116 struct mbuf *sb_mb; 117 struct mbuf *sb_mbtail; 119 struct mbuf *sb_lastrecord; 121 struct mbuf *sb_sndptr; 123 struct mbuf *sb_fnrdy; 129 struct mbuf *sb_mtls; /* TLS mbuf chain */ 130 struct mbuf *sb_mtlstail; /* last mbuf in TLS chain */ 151 STAILQ_HEAD(, mbuf) uxdg_mb; 153 struct mbuf *uxdg_peeked; [all …]
|
/freebsd/sys/dev/ena/ |
H A D | ena_datapath.c | 52 struct mbuf *); 53 static struct mbuf *ena_rx_mbuf(struct ena_ring *, struct ena_com_rx_buf_info *, 56 struct mbuf *); 57 static void ena_tx_csum(struct ena_com_tx_ctx *, struct mbuf *, bool); 59 struct mbuf **mbuf); 60 static int ena_xmit_mbuf(struct ena_ring *, struct mbuf **); 136 ena_mq_start(if_t ifp, struct mbuf *m) in ena_mq_start() 219 if (unlikely(tx_ring->tx_buffer_info[*req_id].mbuf == NULL)) { in ena_get_tx_req_id() 268 struct mbuf *mbuf; in ena_tx_cleanup() local 276 mbuf = tx_info->mbuf; in ena_tx_cleanup() [all …]
|
/freebsd/sbin/dhclient/ |
H A D | errwarn.c | 52 static char mbuf[1024]; variable 68 vsnprintf(mbuf, sizeof(mbuf), fbuf, list); in error() 72 cap_syslog(capsyslog, log_priority | LOG_ERR, "%s", mbuf); in error() 77 write(2, mbuf, strlen(mbuf)); in error() 102 vsnprintf(mbuf, sizeof(mbuf), fbuf, list); in warning() 106 cap_syslog(capsyslog, log_priority | LOG_ERR, "%s", mbuf); in warning() 110 write(2, mbuf, strlen(mbuf)); in warning() 128 vsnprintf(mbuf, sizeof(mbuf), fbuf, list); in note() 132 cap_syslog(capsyslog, log_priority | LOG_INFO, "%s", mbuf); in note() 136 write(2, mbuf, strlen(mbuf)); in note() [all …]
|
/freebsd/sys/nfsserver/ |
H A D | nfs.h | 165 struct nfssvc_sock *slp, struct mbuf **mreqp); 181 struct mbuf *nd_mrep; /* Request mbuf list */ 182 struct mbuf *nd_md; /* Current dissect mbuf */ 183 struct mbuf *nd_mreq; /* Reply mbuf list */ 247 struct mbuf *nfs_rephead(int, struct nfsrv_descript *, int, struct mbuf **, 252 struct vattr *, struct mbuf **, char **); 254 struct mbuf **, char **); 256 int, struct nfssvc_sock *, struct sockaddr *, struct mbuf **, 258 void nfsm_adj(struct mbuf *, int, int); 259 int nfsm_mbuftouio(struct mbuf **, struct uio *, int, caddr_t *); [all …]
|
/freebsd/sys/netipsec/ |
H A D | ipsec_support.h | 34 struct mbuf; 55 int udp_ipsec_input(struct mbuf *, int, int); 59 int ipsec4_in_reject(const struct mbuf *, struct inpcb *); 60 int ipsec4_in_reject1(const struct mbuf *m, struct ip *ip1, struct inpcb *inp); 61 int ipsec4_input(struct mbuf *, int, int); 62 int ipsec4_forward(struct mbuf *); 64 int ipsec4_output(struct ifnet *, struct mbuf *, struct inpcb *, u_long); 65 int ipsec4_capability(struct mbuf *, u_int); 70 int ipsec6_input(struct mbuf *, int, int); 71 int ipsec6_in_reject(const struct mbuf *, struct inpcb *); [all …]
|
/freebsd/sys/dev/sfxge/ |
H A D | sfxge_tx.c | 146 static int sfxge_tx_queue_tso(struct sfxge_txq *txq, struct mbuf *mbuf, 162 sfxge_tx_maybe_toggle_cksum_offload(struct sfxge_txq *txq, struct mbuf *mbuf, in sfxge_tx_maybe_toggle_cksum_offload() argument 168 if (mbuf->m_pkthdr.csum_flags & in sfxge_tx_maybe_toggle_cksum_offload() 176 } else if (mbuf->m_pkthdr.csum_flags & CSUM_DELAY_IP) { in sfxge_tx_maybe_toggle_cksum_offload() 196 sfxge_tx_maybe_insert_tag(struct sfxge_txq *txq, struct mbuf *mbuf, in sfxge_tx_maybe_insert_tag() argument 199 uint16_t this_tag = ((mbuf->m_flags & M_VLANTAG) ? in sfxge_tx_maybe_insert_tag() 200 mbuf->m_pkthdr.ether_vtag : in sfxge_tx_maybe_insert_tag() 235 struct mbuf *m = stmp->u.mbuf; in sfxge_tx_qcomplete() 259 sfxge_is_mbuf_non_tcp(struct mbuf *mbuf) in sfxge_is_mbuf_non_tcp() argument 264 return (!(mbuf->m_pkthdr.csum_flags & (CSUM_IP_TCP | CSUM_IP6_TCP))); in sfxge_is_mbuf_non_tcp() [all …]
|
/freebsd/sys/netinet6/ |
H A D | ip6_var.h | 174 struct mbuf *ip6po_m; /* Pointer to mbuf storing the data */ 372 void ip6_input(struct mbuf *); 373 void ip6_direct_input(struct mbuf *); 376 int ip6_unknown_opt(u_int8_t *, struct mbuf *, int); 377 int ip6_get_prevhdr(const struct mbuf *, int); 378 int ip6_nexthdr(const struct mbuf *, int, int, int *); 379 int ip6_lasthdr(const struct mbuf *, int, int, int *); 382 struct mbuf *); 384 int ip6_process_hopopts(struct mbuf *, u_int8_t *, int, u_int32_t *, 386 struct mbuf **ip6_savecontrol_v4(struct inpcb *, struct mbuf *, [all …]
|
/freebsd/sys/dev/gve/ |
H A D | gve_rx_dqo.c | 46 if (!buf->mbuf) in gve_free_rx_mbufs_dqo() 52 m_freem(buf->mbuf); in gve_free_rx_mbufs_dqo() 53 buf->mbuf = NULL; in gve_free_rx_mbufs_dqo() 311 buf->mbuf = m_getcl(how, MT_DATA, M_PKTHDR); in gve_rx_post_new_mbuf_dqo() 312 if (__predict_false(!buf->mbuf)) { in gve_rx_post_new_mbuf_dqo() 319 buf->mbuf->m_len = MCLBYTES; in gve_rx_post_new_mbuf_dqo() 322 buf->mbuf, segs, &nsegs, BUS_DMA_NOWAIT); in gve_rx_post_new_mbuf_dqo() 336 m_freem(buf->mbuf); in gve_rx_post_new_mbuf_dqo() 337 buf->mbuf = NULL; in gve_rx_post_new_mbuf_dqo() 468 gve_rx_set_hashtype_dqo(struct mbuf *mbuf, struct gve_ptype *ptype, bool *is_tcp) in gve_rx_set_hashtype_dqo() argument [all …]
|
H A D | gve_rx.c | 389 gve_set_rss_type(__be16 flag, struct mbuf *mbuf) in gve_set_rss_type() argument 393 M_HASHTYPE_SET(mbuf, M_HASHTYPE_RSS_TCP_IPV4); in gve_set_rss_type() 395 M_HASHTYPE_SET(mbuf, M_HASHTYPE_RSS_UDP_IPV4); in gve_set_rss_type() 397 M_HASHTYPE_SET(mbuf, M_HASHTYPE_RSS_IPV4); in gve_set_rss_type() 403 M_HASHTYPE_SET(mbuf, M_HASHTYPE_RSS_TCP_IPV6); in gve_set_rss_type() 405 M_HASHTYPE_SET(mbuf, M_HASHTYPE_RSS_UDP_IPV6); in gve_set_rss_type() 407 M_HASHTYPE_SET(mbuf, M_HASHTYPE_RSS_IPV6); in gve_set_rss_type() 420 static struct mbuf * 426 struct mbuf *mbuf; in gve_rx_create_mbuf() local 434 mbuf = m_get2(len, M_NOWAIT, MT_DATA, M_PKTHDR); in gve_rx_create_mbuf() [all …]
|
H A D | gve_tx_dqo.c | 61 if (!pending_pkt->mbuf) in gve_free_tx_mbufs_dqo() 69 m_freem(pending_pkt->mbuf); in gve_free_tx_mbufs_dqo() 70 pending_pkt->mbuf = NULL; in gve_free_tx_mbufs_dqo() 230 gve_extract_tx_metadata_dqo(const struct mbuf *mbuf, in gve_extract_tx_metadata_dqo() argument 233 uint32_t hash = mbuf->m_pkthdr.flowid; in gve_extract_tx_metadata_dqo() 276 const struct mbuf *mbuf, const struct gve_tx_metadata_dqo *metadata, in gve_tx_fill_tso_ctx_desc() argument 294 desc->tso_total_len = mbuf->m_pkthdr.len - header_len; in gve_tx_fill_tso_ctx_desc() 295 desc->mss = mbuf->m_pkthdr.tso_segsz; in gve_tx_fill_tso_ctx_desc() 329 gve_prep_tso(struct mbuf *mbuf, int *header_len) in gve_prep_tso() argument 336 PULLUP_HDR(mbuf, sizeof(*eh)); in gve_prep_tso() [all …]
|
H A D | gve_tx.c | 392 struct mbuf *mbuf = info->mbuf; in gve_tx_cleanup_tq() local 395 if (mbuf == NULL) in gve_tx_cleanup_tq() 398 info->mbuf = NULL; in gve_tx_cleanup_tq() 400 counter_u64_add_protected(tx->stats.tbytes, mbuf->m_pkthdr.len); in gve_tx_cleanup_tq() 403 m_freem(mbuf); in gve_tx_cleanup_tq() 453 gve_tx_fill_mtd_desc(struct gve_tx_mtd_desc *mtd_desc, struct mbuf *mbuf) in gve_tx_fill_mtd_desc() argument 457 mtd_desc->path_hash = htobe32(mbuf->m_pkthdr.flowid); in gve_tx_fill_mtd_desc() 599 gve_xmit(struct gve_tx_ring *tx, struct mbuf *mbuf) in gve_xmit() argument 611 struct mbuf *mbuf_next; in gve_xmit() 622 csum_flags = mbuf->m_pkthdr.csum_flags; in gve_xmit() [all …]
|
/freebsd/sys/netinet/ |
H A D | sctp_output.h | 42 struct mbuf * 46 struct mbuf *m_at, 74 struct sctp_nets *, struct mbuf *, 81 struct mbuf * 82 sctp_arethere_unrecognized_parameters(struct mbuf *, int, int *, 86 void sctp_queue_op_err(struct sctp_tcb *, struct mbuf *); 89 sctp_send_cookie_echo(struct mbuf *, int, int, struct sctp_tcb *, 95 sctp_send_heartbeat_ack(struct sctp_tcb *, struct mbuf *, int, int, 134 sctp_output(struct sctp_inpcb *, struct mbuf *, struct sockaddr *, 135 struct mbuf *, struct thread *, int); [all …]
|
H A D | sctputil.h | 48 struct mbuf *sctp_m_free(struct mbuf *m); 49 void sctp_m_freem(struct mbuf *m); 129 uint32_t sctp_calculate_len(struct mbuf *); 131 caddr_t sctp_m_getptr(struct mbuf *, int, int, uint8_t *); 134 sctp_get_next_param(struct mbuf *, int, 137 struct mbuf *sctp_add_pad_tombuf(struct mbuf *, int); 139 struct mbuf *sctp_pad_lastmbuf(struct mbuf *, int, struct mbuf *); 163 sctp_abort_association(struct sctp_inpcb *, struct sctp_tcb *, struct mbuf *, 165 struct sctphdr *, struct mbuf *, 172 struct mbuf *, bool, int); [all …]
|
H A D | ip_options.h | 53 int ip_checkrouteralert(struct mbuf *); 54 int ip_dooptions(struct mbuf *, int); 55 struct mbuf *ip_insertoptions(struct mbuf *, struct mbuf *, int *); 57 int ip_pcbopts(struct inpcb *, int, struct mbuf *); 58 void ip_stripoptions(struct mbuf *); 59 struct mbuf *ip_srcroute(struct mbuf *);
|
/freebsd/sys/net/altq/ |
H A D | altq_classq.h | 60 struct mbuf *tail_; /* Tail of packet queue */ 84 extern void _addq(class_queue_t *, struct mbuf *); 85 extern struct mbuf *_getq(class_queue_t *); 86 extern struct mbuf *_getq_tail(class_queue_t *); 87 extern struct mbuf *_getq_random(class_queue_t *); 88 extern void _removeq(class_queue_t *, struct mbuf *); 96 _addq(class_queue_t *q, struct mbuf *m) in _addq() 98 struct mbuf *m0; in _addq() 110 static __inline struct mbuf * 113 struct mbuf *m, *m0; in _getq() [all …]
|
/freebsd/sys/netgraph/bluetooth/hci/ |
H A D | ng_hci_cmds.c | 40 #include <sys/mbuf.h> 61 static int complete_command (ng_hci_unit_p, int, struct mbuf **); 64 (ng_hci_unit_p, u_int16_t, struct mbuf *, struct mbuf *); 66 (ng_hci_unit_p, u_int16_t, struct mbuf *, struct mbuf *); 68 (ng_hci_unit_p, u_int16_t, struct mbuf *, struct mbuf *); 70 (ng_hci_unit_p, u_int16_t, struct mbuf *, struct mbuf *); [all...] |
/freebsd/sys/net/ |
H A D | ifq.c | 45 drbr_enqueue(struct ifnet *ifp, struct buf_ring *br, struct mbuf *m) in drbr_enqueue() 63 drbr_putback(struct ifnet *ifp, struct buf_ring *br, struct mbuf *m_new) in drbr_putback() 80 struct mbuf * 83 struct mbuf *m; in drbr_peek() 94 return ((struct mbuf *)buf_ring_peek_clear_sc(br)); in drbr_peek() 100 struct mbuf *m; in drbr_flush() 104 while ((m = (struct mbuf *)buf_ring_dequeue_sc(br)) != NULL) in drbr_flush() 108 struct mbuf * 111 struct mbuf *m; in drbr_dequeue() 117 return ((struct mbuf *)buf_ring_dequeue_sc(br)); in drbr_dequeue() [all …]
|
H A D | ifq.h | 55 struct mbuf *ifq_head; 56 struct mbuf *ifq_tail; 137 struct mbuf *m; \ 152 int if_handoff(struct ifqueue *ifq, struct mbuf *m, struct ifnet *ifp, 275 struct mbuf *m0; \ 305 struct mbuf *m, *n = (ifq)->ifq_drv_head; \ 316 int drbr_enqueue(struct ifnet *ifp, struct buf_ring *br, struct mbuf *m); 317 void drbr_putback(struct ifnet *ifp, struct buf_ring *br, struct mbuf *m_new); 318 struct mbuf *drbr_peek(struct ifnet *ifp, struct buf_ring *br); 320 struct mbuf *drbr_dequeue(struct ifnet *ifp, struct buf_ring *br); [all …]
|
/freebsd/sys/dev/vnic/ |
H A D | nicvf_queues.c | 100 static struct mbuf * nicvf_get_rcv_mbuf(struct nicvf *, struct cqe_rx_t *); 108 static int nicvf_tx_mbuf_locked(struct snd_queue *, struct mbuf **); 116 struct mbuf * mbuf; member 260 struct mbuf *mbuf; in nicvf_alloc_rcv_buffer() local 266 mbuf = m_getjcl(mflags, MT_DATA, M_PKTHDR, MCLBYTES); in nicvf_alloc_rcv_buffer() 267 if (mbuf == NULL) in nicvf_alloc_rcv_buffer() 274 mbuf->m_len = mbuf->m_pkthdr.len = buf_len; in nicvf_alloc_rcv_buffer() 276 err = bus_dmamap_load_mbuf_sg(rbdr->rbdr_buff_dmat, dmap, mbuf, segs, in nicvf_alloc_rcv_buffer() 282 m_freem(mbuf); in nicvf_alloc_rcv_buffer() 292 rinfo = (struct rbuf_info *)mbuf->m_data; in nicvf_alloc_rcv_buffer() [all …]
|
/freebsd/sys/net80211/ |
H A D | ieee80211_superg.h | 61 struct mbuf *head; /* frames linked w/ m_nextpkt */ 62 struct mbuf *tail; /* last frame in queue */ 107 struct mbuf * ieee80211_amsdu_check(struct ieee80211_node *ni, struct mbuf *m); 108 struct mbuf *ieee80211_ff_check(struct ieee80211_node *, struct mbuf *); 140 struct mbuf *ieee80211_ff_encap(struct ieee80211vap *, struct mbuf *, 142 struct mbuf * ieee80211_amsdu_encap(struct ieee80211vap *vap, struct mbuf *m1, 145 struct mbuf *ieee80211_ff_decap(struct ieee80211_node *, struct mbuf *); 147 static __inline struct mbuf * 149 struct mbuf *m) in ieee80211_decap_fastframe()
|
H A D | ieee80211_proto.h | 85 int ieee80211_input_all(struct ieee80211com *, struct mbuf *, int, int); 87 int ieee80211_input_mimo(struct ieee80211_node *, struct mbuf *); 88 int ieee80211_input_mimo_all(struct ieee80211com *, struct mbuf *); 91 int ieee80211_mgmt_output(struct ieee80211_node *, struct mbuf *, int, 93 int ieee80211_raw_xmit(struct ieee80211_node *, struct mbuf *, 95 int ieee80211_output(struct ifnet *, struct mbuf *, 97 int ieee80211_vap_pkt_send_dest(struct ieee80211vap *, struct mbuf *, 100 struct mbuf *, const struct ieee80211_bpf_params *); 101 void ieee80211_send_setup(struct ieee80211_node *, struct mbuf *, int, int, 104 int ieee80211_vap_transmit(struct ifnet *ifp, struct mbuf *m); [all …]
|
/freebsd/sys/xdr/ |
H A D | xdr_mbuf.c | 43 static bool_t xdrmbuf_putmbuf(XDR *, struct mbuf *); 66 xdrmbuf_create(XDR *xdrs, struct mbuf *m, enum xdr_op op) in xdrmbuf_create() 87 xdrmbuf_putmbuf(XDR *xdrs, struct mbuf *madd) in xdrmbuf_putmbuf() 89 struct mbuf *m; in xdrmbuf_putmbuf() 96 m = (struct mbuf *) xdrs->x_private; in xdrmbuf_putmbuf() 106 struct mbuf * 109 struct mbuf *m0, *m; in xdrmbuf_getall() 114 m0 = (struct mbuf *) xdrs->x_base; in xdrmbuf_getall() 115 m = (struct mbuf *) xdrs->x_private; in xdrmbuf_getall() 138 m_freem((struct mbuf *) xdrs->x_base); in xdrmbuf_destroy() [all …]
|