Hi Rosen You may need to split the patches into 3, one per each PMD. Also please get it reviewed by maintainers, and do/fix any patchwork check issues. Thanks!
/Helin > -----Original Message----- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Rosen Xu > Sent: Friday, January 19, 2018 11:02 AM > To: Xing, Beilei; Zhang, Qi Z; Lu, Wenzhuo > Cc: dev@dpdk.org; sta...@dpdk.org > Subject: [dpdk-dev] [PATCH] net/i40e/avf/ixgbe: remove unnecessary mbuf > field initialization in PMD > > Set the value of m->refcnt to 1, m->nb_segs to 1 and m->next to NULL when > the mbuf is initialized or stored inside the mempool (unused). > All of these are done in rte_pktmbuf_pool_create() and > rte_pktmbuf_prefree_seg(). > So we remove the redundant code from i40e, ixgbe and avf module. > > Fixes: 8f094a9ac5d7 ("mbuf: set mbuf fields while in pool") > Cc: sta...@dpdk.org > > Signed-off-by: Rosen Xu <rosen...@intel.com> > --- > drivers/net/avf/avf_rxtx.c | 6 ------ > drivers/net/i40e/i40e_rxtx.c | 6 ------ > drivers/net/ixgbe/ixgbe_rxtx.c | 1 - > 3 files changed, 13 deletions(-) > > diff --git a/drivers/net/avf/avf_rxtx.c b/drivers/net/avf/avf_rxtx.c index > e0c4583..b9051d6 100644 > --- a/drivers/net/avf/avf_rxtx.c > +++ b/drivers/net/avf/avf_rxtx.c > @@ -221,10 +221,7 @@ > return -ENOMEM; > } > > - 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 = > @@ -1239,10 +1236,7 @@ > rte_prefetch0(rxep[i + 1]); > > mb = rxep[i]; > - rte_mbuf_refcnt_set(mb, 1); > - mb->next = NULL; > mb->data_off = RTE_PKTMBUF_HEADROOM; > - mb->nb_segs = 1; > mb->port = rxq->port_id; > dma_addr = > rte_cpu_to_le_64(rte_mbuf_data_iova_default(mb)); > rxdp[i].read.hdr_addr = 0; > diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index > 23256b7..b578957 100644 > --- a/drivers/net/i40e/i40e_rxtx.c > +++ b/drivers/net/i40e/i40e_rxtx.c > @@ -550,10 +550,7 @@ > rte_prefetch0(rxep[i + 1].mbuf); > > mb = rxep[i].mbuf; > - rte_mbuf_refcnt_set(mb, 1); > - mb->next = NULL; > mb->data_off = RTE_PKTMBUF_HEADROOM; > - mb->nb_segs = 1; > mb->port = rxq->port_id; > dma_addr = rte_cpu_to_le_64(\ > rte_mbuf_data_iova_default(mb)); > @@ -2411,10 +2408,7 @@ > return -ENOMEM; > } > > - 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 = > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c > index 4b38247..72da571 100644 > --- a/drivers/net/ixgbe/ixgbe_rxtx.c > +++ b/drivers/net/ixgbe/ixgbe_rxtx.c > @@ -1629,7 +1629,6 @@ uint16_t ixgbe_xmit_fixed_burst_vec(void > *tx_queue, struct rte_mbuf **tx_pkts, > mb->port = rxq->port_id; > } > > - rte_mbuf_refcnt_set(mb, 1); > mb->data_off = RTE_PKTMBUF_HEADROOM; > > /* populate the descriptors */ > -- > 1.8.3.1