Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mbuf: remove the redundant code for mbuf prefree
For 'rte_pktmbuf_prefree_seg' function, 'rte_mbuf_refcnt_read(m) == 1' and '__rte_mbuf_refcnt_update(m, -1) == 0' are the same cases where mbuf's refcnt value should be 1. Thus we can simplify the code and remove the redundant part. Furthermore, according to [1], when the mbuf is stored inside the mempool, the m->refcnt value should be 1. And then it is detached from its parent for an indirect mbuf. Thus change the description of 'rte_pktmbuf_prefree_seg' function. [1] https://patches.dpdk.org/project/dpdk/patch/20170404162807.20157-4-olivier.matz@6wind.com/ Suggested-by: Ruifeng Wang <ruifeng.wang@arm.com> Signed-off-by: Feifei Wang <feifei.wang2@arm.com> Signed-off-by: 0-day Robot <robot@bytheb.org>
- Loading branch information