> > On Wed, Mar 31, 2021 at 11:17 AM Leyi Rong <leyi.r...@intel.com> 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.r...@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; > > I find this a bit surprising to set this op at two different locations. > Why not simply leave the value set in i40e_ethdev.c? >
Actually I wonder should we set dev->tx_pkt_prepare to point to i40e_prep_pkts() for simple TX path? As I remember, simple TX path doesn't support neither multi-segment packets, neither TX offloads. While i40e_prep_pkts() assumes that selected tx_burst() supports all that. If you don't want to keep dev->tx_pkt_prepare==NULL for simple TX path, why not create a new one: i40e_simple_prep_pkts() or so? Konstantin