From: "Zhang, Helin" <helin.zhang@intel.com>
To: "Xu, Rosen" <rosen.xu@intel.com>,
"Xing, Beilei" <beilei.xing@intel.com>,
"Zhang, Qi Z" <qi.z.zhang@intel.com>,
"Lu, Wenzhuo" <wenzhuo.lu@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/i40e/avf/ixgbe: remove unnecessary mbuf field initialization in PMD
Date: Sat, 20 Jan 2018 09:51:04 +0000 [thread overview]
Message-ID: <F35DEAC7BCE34641BA9FAC6BCA4A12E71AD1477A@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1516330925-27845-1-git-send-email-rosen.xu@intel.com>
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-bounces@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; stable@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: stable@dpdk.org
>
> Signed-off-by: Rosen Xu <rosen.xu@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
prev parent reply other threads:[~2018-01-20 9:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-19 3:02 Rosen Xu
2018-01-20 9:51 ` Zhang, Helin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F35DEAC7BCE34641BA9FAC6BCA4A12E71AD1477A@SHSMSX103.ccr.corp.intel.com \
--to=helin.zhang@intel.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=rosen.xu@intel.com \
--cc=stable@dpdk.org \
--cc=wenzhuo.lu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).