From: David Marchand <david.marchand@redhat.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: Leyi Rong <leyi.rong@intel.com>, Qi Zhang <qi.z.zhang@intel.com>,
Beilei Xing <beilei.xing@intel.com>, dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/i40e: add Tx preparation for vector data path
Date: Thu, 8 Apr 2021 10:39:47 +0200 [thread overview]
Message-ID: <CAJFAV8xmka=qThHvE=56nFyFDDawdYDWYyoR=vHX0hzkqB+VMQ@mail.gmail.com> (raw)
In-Reply-To: <10399e65-e2c4-fe91-b548-f7bfd55ffc51@intel.com>
On Wed, Apr 7, 2021 at 6:40 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> On 3/31/2021 9:53 AM, Leyi Rong wrote:
> > Fill up dev->tx_pkt_prepare to i40e_pkt_prepare when on vector and simple
> > data path selection, as the sanity check is needed ideally.
> >
> > Signed-off-by: Leyi Rong <leyi.rong@intel.com>
> > ---
> > drivers/net/i40e/i40e_rxtx.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
> > index 61cb204be2..b3d7765e3b 100644
> > --- a/drivers/net/i40e/i40e_rxtx.c
> > +++ b/drivers/net/i40e/i40e_rxtx.c
> > @@ -3412,7 +3412,7 @@ i40e_set_tx_function(struct rte_eth_dev *dev)
> > PMD_INIT_LOG(DEBUG, "Simple tx finally be used.");
> > dev->tx_pkt_burst = i40e_xmit_pkts_simple;
> > }
> > - dev->tx_pkt_prepare = NULL;
> > + dev->tx_pkt_prepare = i40e_prep_pkts;
> > } else {
> > PMD_INIT_LOG(DEBUG, "Xmit tx finally be used.");
> > dev->tx_pkt_burst = i40e_xmit_pkts;
> >
>
> It seems prepare function is doing some sanity checks before handing packets to
> the HW.
> So with this change all Tx paths calls the same Tx prepare function, if so why
> not set the function pointer outside of the if block, instead of setting it in
> both legs of the if/else? This clarifies that Tx prepare used always.
As I said earlier, what is the point of setting it in ethdev.c too?
It would be more consistent to have this in a single location.
drivers/net/i40e/i40e_ethdev.c: dev->tx_pkt_burst = i40e_xmit_pkts;
drivers/net/i40e/i40e_ethdev.c: dev->tx_pkt_prepare = i40e_prep_pkts;
drivers/net/i40e/i40e_ethdev_vf.c: eth_dev->tx_pkt_burst = &i40e_xmit_pkts;
drivers/net/i40e/i40e_rxtx.c: if (dev->tx_pkt_burst ==
i40e_xmit_pkts_vec_avx512) {
drivers/net/i40e/i40e_rxtx.c: if (dev->tx_pkt_burst ==
i40e_xmit_pkts_vec_avx2 ||
drivers/net/i40e/i40e_rxtx.c: dev->tx_pkt_burst ==
i40e_xmit_pkts_vec) {
drivers/net/i40e/i40e_rxtx.c:
dev->tx_pkt_burst = i40e_xmit_pkts_vec_avx512;
drivers/net/i40e/i40e_rxtx.c:
dev->tx_pkt_burst = use_avx2 ?
drivers/net/i40e/i40e_rxtx.c: dev->tx_pkt_burst =
i40e_xmit_pkts_simple;
drivers/net/i40e/i40e_rxtx.c: dev->tx_pkt_prepare = NULL;
drivers/net/i40e/i40e_rxtx.c: dev->tx_pkt_burst = i40e_xmit_pkts;
drivers/net/i40e/i40e_rxtx.c: dev->tx_pkt_prepare = i40e_prep_pkts;
drivers/net/i40e/i40e_rxtx.c: eth_tx_burst_t pkt_burst = dev->tx_pkt_burst;
drivers/net/i40e/i40e_vf_representor.c: ethdev->tx_pkt_burst =
i40e_vf_representor_tx_burst;
--
David Marchand
next prev parent reply other threads:[~2021-04-08 8:40 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-31 8:53 Leyi Rong
2021-04-01 12:27 ` Zhang, Qi Z
2021-04-01 12:33 ` David Marchand
2021-04-01 13:19 ` Ananyev, Konstantin
2021-04-07 16:39 ` Ferruh Yigit
2021-04-08 8:29 ` Rong, Leyi
2021-04-08 10:32 ` Ananyev, Konstantin
2021-04-09 7:19 ` Rong, Leyi
2021-04-09 10:40 ` Ananyev, Konstantin
2021-04-13 10:23 ` Rong, Leyi
2021-04-13 10:41 ` Ananyev, Konstantin
2021-04-08 8:39 ` David Marchand [this message]
2021-04-08 8:49 ` Rong, Leyi
2021-04-19 8:36 ` [dpdk-dev] [PATCH v2] net/i40e: add Tx preparation for simple Tx " Leyi Rong
2021-04-19 9:36 ` Zhang, Qi Z
2021-04-19 10:59 ` Ananyev, Konstantin
2021-04-20 5:31 ` Rong, Leyi
2021-04-20 5:29 ` [dpdk-dev] [PATCH v3] " Leyi Rong
2021-04-20 8:03 ` Ananyev, Konstantin
2021-04-20 14:00 ` Zhang, Qi Z
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='CAJFAV8xmka=qThHvE=56nFyFDDawdYDWYyoR=vHX0hzkqB+VMQ@mail.gmail.com' \
--to=david.marchand@redhat.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=leyi.rong@intel.com \
--cc=qi.z.zhang@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).