All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Gagandeep Singh <g.singh@nxp.com>, dev@dpdk.org
Cc: pankaj.chauhan@nxp.com
Subject: Re: [PATCH v4 2/4] net/enetc: enable Rx and Tx
Date: Mon, 1 Oct 2018 16:59:53 +0100	[thread overview]
Message-ID: <5e573435-742b-e3e6-cef2-b83d21c1d93d@intel.com> (raw)
In-Reply-To: <20180928074601.4287-3-g.singh@nxp.com>

On 9/28/2018 8:45 AM, Gagandeep Singh wrote:
> Add RX and TX queue setup, datapath functions
> 
> Signed-off-by: Gagandeep Singh <g.singh@nxp.com>

<...>

> @@ -104,16 +104,19 @@ enum enetc_bdr_type {TX, RX};
>  #define ETH_ADDR_LEN			6
>  
>  /* general register accessors */
> -#define enetc_rd_reg(reg)	rte_read32((reg))
> -#define enetc_wr_reg(reg, val)	rte_write32((val), (reg))
> -#define enetc_rd(hw, off)	enetc_rd_reg((hw)->reg + (off))
> -#define enetc_wr(hw, off, val)	enetc_wr_reg((hw)->reg + (off), val)
> +#define enetc_rd_reg(reg)	rte_read32((void *)(reg))
> +#define enetc_wr_reg(reg, val)	rte_write32((val), (void *)(reg))
> +#define enetc_rd(hw, off)	enetc_rd_reg((size_t)(hw)->reg + (off))
> +#define enetc_wr(hw, off, val)	enetc_wr_reg((size_t)(hw)->reg + (off), val)
>  /* port register accessors - PF only */
> -#define enetc_port_rd(hw, off)		enetc_rd_reg((hw)->port + (off))
> -#define enetc_port_wr(hw, off, val)	enetc_wr_reg((hw)->port + (off), val)
> +#define enetc_port_rd(hw, off)	enetc_rd_reg((size_t)(hw)->port + (off))
> +#define enetc_port_wr(hw, off, val) \
> +				enetc_wr_reg((size_t)(hw)->port + (off), val)
>  /* global register accessors - PF only */
> -#define enetc_global_rd(hw, off)	enetc_rd_reg((hw)->global + (off))
> -#define enetc_global_wr(hw, off, val)	enetc_wr_reg((hw)->global + (off), val)
> +#define enetc_global_rd(hw, off) \
> +				enetc_rd_reg((size_t)(hw)->global + (off))
> +#define enetc_global_wr(hw, off, val) \
> +				enetc_wr_reg((size_t)(hw)->global + (off), val)

Is there any reason to not add these functions as updated version at first plane
at previous patch?

>  /* BDR register accessors, see ENETC_BDR() */
>  #define enetc_bdr_rd(hw, t, n, off) \
>  				enetc_rd(hw, ENETC_BDR(t, n, off))
> diff --git a/drivers/net/enetc/enetc.h b/drivers/net/enetc/enetc.h
> index 9fa7c726c..140daf0dd 100644
> --- a/drivers/net/enetc/enetc.h
> +++ b/drivers/net/enetc/enetc.h
> @@ -18,7 +18,11 @@
>  #define MAX_RX_RINGS	1
>  
>  /* Max BD counts per Ring. */
> -#define MAX_BD_COUNT	256
> +#define MAX_BD_COUNT	64000

Same here, is there a reason this has not been defined as 64000 in prev patch at
first place.
Or if this variable not used in prev patch at all, why not introduce here.

<...>

> @@ -37,6 +46,10 @@ static const struct eth_dev_ops enetc_ops = {
>  	.dev_close            = enetc_dev_close,
>  	.link_update          = enetc_link_update,
>  	.dev_infos_get        = enetc_dev_infos_get,
> +	.rx_queue_setup       = enetc_rx_queue_setup,
> +	.rx_queue_release     = enetc_rx_queue_release,
> +	.tx_queue_setup       = enetc_tx_queue_setup,
> +	.tx_queue_release     = enetc_tx_queue_release,

It is not very explicit in API doc but generally PMDs clean all queue related
resources in dev_close() too, can you please implement it.

  reply	other threads:[~2018-10-01 15:59 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06  5:54 [PATCH 0/3] introduces the ENETC PMD Gagandeep Singh
2018-09-06  5:54 ` [PATCH 1/3] doc: add usage doc for " Gagandeep Singh
2018-09-06  5:54 ` [PATCH 2/3] net/enetc: add ENETC PMD with basic operations Gagandeep Singh
2018-09-19 12:15   ` Shreyansh Jain
2018-09-06  5:54 ` [PATCH 3/3] net/enetc: enable Rx and Tx Gagandeep Singh
2018-09-13  9:41 ` [PATCH v2 0/3] introduces the enetc PMD driver Gagandeep Singh
2018-09-13  9:41   ` [PATCH v2 1/3] doc: add usage doc for ENETC PMD Gagandeep Singh
2018-09-21 13:22     ` Ferruh Yigit
2018-09-13  9:42   ` [PATCH v2 2/3] net/enetc: add ENETC PMD with basic operations Gagandeep Singh
2018-09-21 13:27     ` Ferruh Yigit
2018-09-13  9:42   ` [PATCH v2 3/3] net/enetc: enable Rx and Tx Gagandeep Singh
2018-09-19 12:26     ` Shreyansh Jain
2018-09-21 13:28     ` Ferruh Yigit
2018-09-28  5:16   ` [PATCH v3 0/3] introduces the enetc PMD driver Gagandeep Singh
2018-09-28  5:16     ` [PATCH v3 1/3] net/enetc: enable Rx and Tx Gagandeep Singh
2018-09-28  5:16     ` [PATCH v3 2/3] net/enetc: support packet parse type Gagandeep Singh
2018-09-28  5:16     ` [PATCH v3 3/3] doc: add usage doc for ENETC PMD Gagandeep Singh
2018-09-28  5:26     ` [PATCH v3 0/3] introduces the enetc PMD driver Gagandeep Singh
2018-09-28  7:45     ` [PATCH v4 0/4] " Gagandeep Singh
2018-09-28  7:45       ` [PATCH v4 1/4] net/enetc: add ENETC PMD with basic operations Gagandeep Singh
2018-10-01 15:58         ` Ferruh Yigit
2018-09-28  7:45       ` [PATCH v4 2/4] net/enetc: enable Rx and Tx Gagandeep Singh
2018-10-01 15:59         ` Ferruh Yigit [this message]
2018-09-28  7:46       ` [PATCH v4 3/4] net/enetc: support packet parse type Gagandeep Singh
2018-09-28 10:17         ` Shreyansh Jain
2018-10-01 15:59           ` Ferruh Yigit
2018-09-28  7:46       ` [PATCH v4 4/4] doc: add usage doc for ENETC PMD Gagandeep Singh
2018-10-01 16:00         ` Ferruh Yigit
2018-09-28 10:36       ` [PATCH v4 0/4] introduces the enetc PMD driver Shreyansh Jain
2018-10-03 13:36       ` [PATCH v5 " Gagandeep Singh
2018-10-03 13:36         ` [PATCH v5 1/4] net/enetc: add ENETC PMD with basic operations Gagandeep Singh
2018-10-03 19:47           ` Ferruh Yigit
2018-10-03 13:36         ` [PATCH v5 2/4] net/enetc: enable Rx and Tx Gagandeep Singh
2018-10-03 13:36         ` [PATCH v5 3/4] net/enetc: support packet parse type Gagandeep Singh
2018-10-03 13:36         ` [PATCH v5 4/4] doc: add usage doc for ENETC PMD Gagandeep Singh
2018-10-03 19:47           ` Ferruh Yigit
2018-10-03 19:48         ` [PATCH v5 0/4] introduces the enetc PMD driver Ferruh Yigit
2018-11-21 17:36           ` Ferruh Yigit
2018-11-22 10:34             ` Shreyansh Jain
2018-11-22 12:08               ` Ferruh Yigit

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=5e573435-742b-e3e6-cef2-b83d21c1d93d@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=g.singh@nxp.com \
    --cc=pankaj.chauhan@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.