[dpdk-dev] [PATCH v2 13/40] bnxt: initial Tx ring code

Bruce Richardson bruce.richardson at intel.com
Thu May 26 12:40:34 CEST 2016


On Fri, May 13, 2016 at 03:46:02PM -0700, Stephen Hurd wrote:
> Initial implementation of rx_pkt_burst

typo: s/rx/tx/

> Add code to allocate rings to bnxt_ring.c
> 
> Signed-off-by: Stephen Hurd <stephen.hurd at broadcom.com>
> Reviewed-by: Ajit Kumar Khaparde <ajit.khaparde at broadcom.com>
> ---
>  drivers/net/bnxt/Makefile              |   1 +
>  drivers/net/bnxt/bnxt_cpr.h            |   4 +-
>  drivers/net/bnxt/bnxt_ethdev.c         |   5 +-
>  drivers/net/bnxt/bnxt_ring.c           | 140 +++++++++
>  drivers/net/bnxt/bnxt_ring.h           |   8 +
>  drivers/net/bnxt/bnxt_txq.c            |  42 ++-
>  drivers/net/bnxt/bnxt_txr.c            | 314 ++++++++++++++++++++
>  drivers/net/bnxt/bnxt_txr.h            |  71 +++++
>  drivers/net/bnxt/hsi_struct_def_dpdk.h | 512 +++++++++++++++++++++++++++++++++
>  9 files changed, 1086 insertions(+), 11 deletions(-)
>  create mode 100644 drivers/net/bnxt/bnxt_txr.c
>  create mode 100644 drivers/net/bnxt/bnxt_txr.h
> 
> diff --git a/drivers/net/bnxt/Makefile b/drivers/net/bnxt/Makefile
> index f6a04f8..0785681 100644
> --- a/drivers/net/bnxt/Makefile
> +++ b/drivers/net/bnxt/Makefile
> @@ -56,6 +56,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_ring.c
>  SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_rxq.c
>  SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_stats.c
>  SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_txq.c
> +SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_txr.c
>  SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += bnxt_vnic.c
>  
>  #
> diff --git a/drivers/net/bnxt/bnxt_cpr.h b/drivers/net/bnxt/bnxt_cpr.h
> index e6333fc..f104281 100644
> --- a/drivers/net/bnxt/bnxt_cpr.h
> +++ b/drivers/net/bnxt/bnxt_cpr.h
> @@ -51,11 +51,11 @@
>  
>  #define B_CP_DB_REARM(cpr, raw_cons)					\
>  		(*(uint32_t *)((cpr)->cp_doorbell) = (DB_CP_REARM_FLAGS | \
> -				RING_CMP(&cpr->cp_ring_struct, raw_cons)))
> +				RING_CMP(cpr->cp_ring_struct, raw_cons)))
>  
>  #define B_CP_DIS_DB(cpr, raw_cons)					\
>  		(*(uint32_t *)((cpr)->cp_doorbell) = (DB_CP_FLAGS |	\
> -				RING_CMP(&cpr->cp_ring_struct, raw_cons)))
> +				RING_CMP(cpr->cp_ring_struct, raw_cons)))
>  
>  struct bnxt_ring_struct;
>  struct bnxt_cp_ring_info {
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index 786318c..61e856a 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -44,6 +44,7 @@
>  #include "bnxt_rxq.h"
>  #include "bnxt_stats.h"
>  #include "bnxt_txq.h"
> +#include "bnxt_txr.h"
>  
>  #define DRV_MODULE_NAME		"bnxt"
>  static const char bnxt_version[] =
> @@ -259,10 +260,8 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
>  		goto error;
>  	}
>  	eth_dev->dev_ops = &bnxt_dev_ops;
> -	/*
> -	eth_dev->rx_pkt_burst = &bnxt_recv_pkts;
> +	/* eth_dev->rx_pkt_burst = &bnxt_recv_pkts; */
>  	eth_dev->tx_pkt_burst = &bnxt_xmit_pkts;
> -	 */

When adding these two lines in the earlier patch, I would suggest just adding
them as two separate commented out lines, which will both clear the checkpatch
issue flagged before, as well as simplifying the diff here.

After this patch is applied, does this mean that the tx burst functions call
be successfully called on the NIC?

/Bruce



More information about the dev mailing list