DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Yanling Song <songyl@ramaxel.com>, <dev@dpdk.org>
Cc: <yanling.song@linux.dev>, <yanggan@ramaxel.com>,
	<xuyun@ramaxel.com>, <stephen@networkplumber.org>,
	<lihuisong@huawei.com>
Subject: Re: [PATCH v6 02/26] net/spnic: initialize the HW interface
Date: Wed, 19 Jan 2022 17:05:14 +0000	[thread overview]
Message-ID: <d9e5352f-fd63-e4ed-5097-5f61e31070e0@intel.com> (raw)
In-Reply-To: <6c3420e1bf7371550c9e450675b5dc55591a7164.1640838702.git.songyl@ramaxel.com>

On 12/30/2021 6:08 AM, Yanling Song wrote:
> Add HW interface registers and initialize the HW
> interface.
> 
> Signed-off-by: Yanling Song <songyl@ramaxel.com>

<...>

> diff --git a/drivers/net/spnic/base/spnic_hwdev.h b/drivers/net/spnic/base/spnic_hwdev.h
> new file mode 100644
> index 0000000000..c89a4fa840
> --- /dev/null
> +++ b/drivers/net/spnic/base/spnic_hwdev.h
> @@ -0,0 +1,29 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2021 Ramaxel Memory Technology, Ltd
> + */
> +
> +#ifndef _SPNIC_HWDEV_H_
> +#define _SPNIC_HWDEV_H_
> +
> +#include <rte_ether.h>
> +

Why is this header required in this file?


<...>

> +#ifdef SPNIC_RELEASE
> +static int wait_until_doorbell_flush_states(struct spnic_hwif *hwif,
> +					    enum spnic_doorbell_ctrl states)
> +{
> +	enum spnic_doorbell_ctrl db_ctrl;
> +	u32 cnt = 0;
> +
> +	if (!hwif)
> +		return -EINVAL;
> +
> +	while (cnt < SPNIC_WAIT_DOORBELL_AND_OUTBOUND_TIMEOUT) {
> +		db_ctrl = spnic_get_doorbell_ctrl_status(hwif);
> +		if (db_ctrl == states)
> +			return 0;
> +
> +		rte_delay_ms(1);
> +		cnt++;
> +	}
> +
> +	return -EFAULT;
> +}
> +#endif

What is this 'SPNIC_RELEASE' macro and why it exists?

Please get rid of all all compile time macros, if the code is not required you
can delete it while upstreaming.

<...>

>   struct spnic_nic_dev {
> +	struct spnic_hwdev *hwdev; /* Hardware device */
> +
> +	struct spnic_txq **txqs;
> +	struct spnic_rxq **rxqs;
> +	struct rte_mempool *cpy_mpool;
> +
> +	u16 num_sqs;
> +	u16 num_rqs;
> +	u16 max_sqs;
> +	u16 max_rqs;
> +
> +	u16 rx_buff_len;
> +	u16 mtu_size;
> +
> +	u16 rss_state;
> +	u8 num_rss;
> +	u8 rsvd0;
> +
> +	u32 rx_mode;
> +	u8 rx_queue_list[SPNIC_MAX_QUEUE_NUM];
> +	rte_spinlock_t queue_list_lock;
> +	pthread_mutex_t rx_mode_mutex;
> +
> +	u32 default_cos;
> +	u32 rx_csum_en;
> +
>   	u32 dev_status;
> +
> +	bool pause_set;
> +	pthread_mutex_t pause_mutuex;
> +
> +	struct rte_ether_addr default_addr;
> +	struct rte_ether_addr *mc_list;
> +
>   	char dev_name[SPNIC_DEV_NAME_LEN];
> +	u32 vfta[SPNIC_VFTA_SIZE]; /* VLAN bitmap */
>   };


Most of these additions to the struct is not used at all, can you please add them
when they are used?

  reply	other threads:[~2022-01-19 17:05 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-30  6:08 [PATCH v6 00/26] Net/SPNIC: support SPNIC into DPDK 22.03 Yanling Song
2021-12-30  6:08 ` [PATCH v6 01/26] drivers/net: introduce a new PMD driver Yanling Song
2022-01-19 16:58   ` Ferruh Yigit
2021-12-30  6:08 ` [PATCH v6 02/26] net/spnic: initialize the HW interface Yanling Song
2022-01-19 17:05   ` Ferruh Yigit [this message]
2022-01-21  9:32     ` Yanling Song
2021-12-30  6:08 ` [PATCH v6 03/26] net/spnic: add mbox message channel Yanling Song
2021-12-30  6:08 ` [PATCH v6 04/26] net/spnic: introduce event queue Yanling Song
2021-12-30  6:08 ` [PATCH v6 05/26] net/spnic: add mgmt module Yanling Song
2022-01-19 17:22   ` Ferruh Yigit
2022-01-21  9:33     ` Yanling Song
2021-12-30  6:08 ` [PATCH v6 06/26] net/spnic: add cmdq and work queue Yanling Song
2021-12-30  6:08 ` [PATCH v6 07/26] net/spnic: add interface handling cmdq message Yanling Song
2021-12-30  6:08 ` [PATCH v6 08/26] net/spnic: add hardware info initialization Yanling Song
2021-12-30  6:08 ` [PATCH v6 09/26] net/spnic: support MAC and link event handling Yanling Song
2022-01-19 17:26   ` Ferruh Yigit
2022-01-21  9:36     ` Yanling Song
2021-12-30  6:08 ` [PATCH v6 10/26] net/spnic: add function info initialization Yanling Song
2021-12-30  6:08 ` [PATCH v6 11/26] net/spnic: add queue pairs context initialization Yanling Song
2021-12-30  6:08 ` [PATCH v6 12/26] net/spnic: support mbuf handling of Tx/Rx Yanling Song
2021-12-30  6:08 ` [PATCH v6 13/26] net/spnic: support Rx congfiguration Yanling Song
2021-12-30  6:08 ` [PATCH v6 14/26] net/spnic: add port/vport enable Yanling Song
2021-12-30  6:08 ` [PATCH v6 15/26] net/spnic: support IO packets handling Yanling Song
2021-12-30  6:08 ` [PATCH v6 16/26] net/spnic: add device configure/version/info Yanling Song
2021-12-30  6:08 ` [PATCH v6 17/26] net/spnic: support RSS configuration update and get Yanling Song
2021-12-30  6:08 ` [PATCH v6 18/26] net/spnic: support VLAN filtering and offloading Yanling Song
2021-12-30  6:08 ` [PATCH v6 19/26] net/spnic: support promiscuous and allmulticast Rx modes Yanling Song
2021-12-30  6:08 ` [PATCH v6 20/26] net/spnic: support flow control Yanling Song
2021-12-30  6:08 ` [PATCH v6 21/26] net/spnic: support getting Tx/Rx queues info Yanling Song
2021-12-30  6:09 ` [PATCH v6 22/26] net/spnic: net/spnic: support xstats statistics Yanling Song
2021-12-30  6:09 ` [PATCH v6 23/26] net/spnic: support VFIO interrupt Yanling Song
2021-12-30  6:09 ` [PATCH v6 24/26] net/spnic: support Tx/Rx queue start/stop Yanling Song
2021-12-30  6:09 ` [PATCH v6 25/26] net/spnic: add doc infrastructure Yanling Song
2022-01-19 17:27   ` Ferruh Yigit
2022-01-21  9:39     ` Yanling Song
2021-12-30  6:09 ` [PATCH v6 26/26] net/spnic: fixes unsafe C style code Yanling Song
2022-01-19 17:28   ` Ferruh Yigit
2022-01-21  9:40     ` Yanling Song
2022-01-19 16:56 ` [PATCH v6 00/26] Net/SPNIC: support SPNIC into DPDK 22.03 Ferruh Yigit
2022-01-21  9:27   ` Yanling Song
2022-01-21 10:22     ` Ferruh Yigit
2022-01-24  5:12       ` Hemant Agrawal
2022-02-12 14:01       ` Yanling Song
2022-02-13 18:07         ` Thomas Monjalon
2022-02-18  9:30           ` Yanling Song
2023-04-13  9:02             ` Ferruh Yigit
2023-07-31 14:08               ` Thomas Monjalon
2022-02-16 14:19         ` 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=d9e5352f-fd63-e4ed-5097-5f61e31070e0@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=lihuisong@huawei.com \
    --cc=songyl@ramaxel.com \
    --cc=stephen@networkplumber.org \
    --cc=xuyun@ramaxel.com \
    --cc=yanggan@ramaxel.com \
    --cc=yanling.song@linux.dev \
    /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).