rte_mbuf_refcnt_set(mbuf, 1); mbuf->next = NULL; mbuf->data_off = RTE_PKTMBUF_HEADROOM; mbuf->nb_segs = 1; mbuf->port = rxq->port_id; dma_addr = rte_cpu_to_le_64(rte_mbuf_data_dma_addr_default(mbuf)); rxd = &rxq->rx_ring[i]; rxd->read.hdr_addr = 0; rxd->read....
to support zero-copy broadcast. * It should only be accessed using the following functions: * rte_mbuf_refcnt_update(), rte_mbuf_refcnt_read(), and * rte_mbuf_refcnt_set(). The functionality of these functions (atomic, * or non-atomic) is controlled by the CONFIG_RTE...
* rte_mbuf_refcnt_update(), rte_mbuf_refcnt_read(), and * rte_mbuf_refcnt_set(). The functionality of these functions (atomic, * or non-atomic) is controlled by the CONFIG_RTE_MBUF_REFCNT_ATOMIC * config option. */ RTE_STD_C11 union { rte_atomic16_t refcnt_atomic; /**< Atomical...
Elixir Cross Referencer - source file of Dpdk (version v24.07). Browsed file: /lib/mbuf/rte_mbuf.h
当前mbuf的虚拟地址,标准buf addr的指向的内存是在mbuf头部开始,偏移一个mbuf头加上一个私有数据的大小。如下所示: m->buf_addr = (char *)m + sizeof(struct rte_mbuf)+ priv_size; 初始化这个变量是在我们创建mbuf的mempool的时候完成的 rte_pktmbuf_pool_create ...
__rte_mbuf_sanity_check(mc,1);returnmc;} staticinlinevoidrte_pktmbuf_attach(structrte_mbuf *mi,structrte_mbuf *m) { RTE_ASSERT(RTE_MBUF_DIRECT(mi)&&rte_mbuf_refcnt_read(mi)==1);if(RTE_MBUF_HAS_EXTBUF(m)) { rte_mbuf_ext_refcnt_update(m->shinfo,1); ...
* Pin lock the mbuf; we will check later to see * whether the mbuf is freed (when we are the last * user) or not. If that's the case, we then could * update the used ring safely. */ rte_mbuf_refcnt_update(pkts[i], 1); ...
We read every piece of feedback, and take your input very seriously. Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Cancel Create saved search Sign in Sign up Reseting focus {...
*/ mbuf = calloc(1, sizeof(struct rte_mbuf) + APP_DEFAULT_MBUF_SIZE); if (mbuf == NULL) { lagopus_msg_error("memory exhausted\n"); return NULL; } mbuf->buf_addr = (void *)&mbuf[1]; mbuf->buf_len = APP_DEFAULT_MBUF_SIZE; rte_pktmbuf_reset(mbuf); rte_mbuf_refcnt_set(...
rte_mbuf_ext_refcnt_read(const struct rte_mbuf_ext_shared_info *shinfo) { - return __atomic_load_n(&shinfo->refcnt, __ATOMIC_RELAXED); + return rte_atomic_load_explicit(&shinfo->refcnt, rte_memory_order_relaxed); } /** @@ -478,7 +478,7 @@ struct rte_pktmbuf_pool_private { ...