DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: alvinx.zhang@intel.com, dev@dpdk.org, xiaolong.ye@intel.com,
	haiyue.wang@intel.com, qi.z.zhang@intel.com,
	beilei.xing@intel.com
Subject: Re: [dpdk-dev] [PATCH v2 01/14] net/igc: add igc PMD
Date: Fri, 3 Apr 2020 13:21:35 +0100	[thread overview]
Message-ID: <f3afb8bf-f54a-1c54-8d69-ec06d6e311f3@intel.com> (raw)
In-Reply-To: <1584672375-376187-2-git-send-email-alvinx.zhang@intel.com>

On 3/20/2020 2:46 AM, alvinx.zhang@intel.com wrote:
> From: Alvin Zhang <alvinx.zhang@intel.com>
> 
> Implement device detection and loading.
> Add igc driver guid docs.
> 
> Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
> 
> v2: Update release note. Modify codes according to comments

<...>

> @@ -0,0 +1,39 @@
> +..  SPDX-License-Identifier: BSD-3-Clause
> +    Copyright(c) 2016 Intel Corporation.

Is the copyright date '2016' correct? If so you can update it as 2016-2020. This
comment is for all files.

> +
> +IGC Poll Mode Driver
> +======================
> +
> +The IGC PMD (librte_pmd_igc) provides poll mode driver support for
> +Foxville I225 Series Network Adapters.

Can you please provide some official links to the product? As much as possible
information about device is good.

<...>

> @@ -56,11 +56,16 @@ New Features
>       Also, make sure to start the actual text at the margin.
>       =========================================================
>  
> -* **Updated Mellanox mlx5 driver.**
> +   * **Updated Mellanox mlx5 driver.**
>  
> -  Updated Mellanox mlx5 driver with new features and improvements, including:
> +     Updated Mellanox mlx5 driver with new features and improvements, including:
>  
> -  * Added support for matching on IPv4 Time To Live and IPv6 Hop Limit.
> +     * Added support for matching on IPv4 Time To Live and IPv6 Hop Limit.

Above looks changed by mistake...

> +
> +   * **Added a new driver for Intel Foxville I225 devices.**
> +
> +     Added the new ``igc`` net driver for Intel Foxville I225 devices. See the
> +     :doc:`../nics/igc` NIC guide for more details on this new driver.
>  
>  
>  Removed Items
> diff --git a/drivers/net/Makefile b/drivers/net/Makefile
> index 4a7f155..b57841d 100644
> --- a/drivers/net/Makefile
> +++ b/drivers/net/Makefile
> @@ -61,6 +61,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += thunderx
>  DIRS-$(CONFIG_RTE_LIBRTE_VDEV_NETVSC_PMD) += vdev_netvsc
>  DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio
>  DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += vmxnet3
> +DIRS-$(CONFIG_RTE_LIBRTE_IGC_PMD) += igc

Can you please add it alphabetically sorted?

<...>

> +static int
> +eth_igc_dev_init(struct rte_eth_dev *dev)
> +{
> +	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
> +
> +	PMD_INIT_FUNC_TRACE();
> +	dev->dev_ops = &eth_igc_ops;
> +
> +	/*
> +	 * for secondary processes, we don't initialize any further as primary
> +	 * has already done this work. Only check we don't need a different
> +	 * RX function.
> +	 */
> +	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
> +		return 0;
> +
> +	rte_eth_copy_pci_info(dev, pci_dev);

This shouldn't be required, since it is done by
'rte_eth_dev_pci_generic_probe()' just before this funtion
('eth_igc_dev_init()') called.

> +
> +	dev->data->mac_addrs = rte_zmalloc("igc",
> +		RTE_ETHER_ADDR_LEN, 0);
> +	if (dev->data->mac_addrs == NULL) {
> +		PMD_INIT_LOG(ERR, "Failed to allocate %d bytes needed to "
> +				"store MAC addresses", RTE_ETHER_ADDR_LEN);
> +		return -ENOMEM;
> +	}
> +
> +	/* Pass the information to the rte_eth_dev_close() that it should also
> +	 * release the private port resources.
> +	 */
> +	dev->data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE;
> +
> +	PMD_INIT_LOG(DEBUG, "port_id %d vendorID=0x%x deviceID=0x%x",
> +			dev->data->port_id, pci_dev->id.vendor_id,
> +			pci_dev->id.device_id);
> +
> +	return 0;
> +}
> +
> +static int
> +eth_igc_dev_uninit(__rte_unused struct rte_eth_dev *eth_dev)
> +{
> +	PMD_INIT_FUNC_TRACE();
> +
> +	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
> +		return -EPERM;

It shouldn't return error for secondary. 'rte_eth_dev_release_port()' has
already process type in it, so returning '0' should work better which will cause
some process specific variables cleared.

<...>

> @@ -0,0 +1,21 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2020 Intel Corporation
> + */
> +
> +#include "igc_logs.h"
> +#include "rte_common.h"

'rte_common.h' should be included with '<>', #include <rte_common.h>

> +
> +/* declared as extern in igc_logs.h */
> +int igc_logtype_init = -1;
> +int igc_logtype_driver = -1;

I guess no need to set initial values for these, by default '0' will work fine
for below logic.

<...>

> @@ -0,0 +1,3 @@
> +DPDK_20.0.1 {

This release it become "DPDK_20.0.2", although it doesn't matter for the PMD at
all, good to be consistent.

> +	local: *;
> +};
> diff --git a/drivers/net/meson.build b/drivers/net/meson.build
> index b0ea8fe..7d0ae3b 100644
> --- a/drivers/net/meson.build
> +++ b/drivers/net/meson.build
> @@ -49,6 +49,7 @@ drivers = ['af_packet',
>  	'vhost',
>  	'virtio',
>  	'vmxnet3',
> +	'igc',

Can you please add it alphabetically sorted?

  reply	other threads:[~2020-04-03 12:21 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-09  8:23 [dpdk-dev] [PATCH v1 01/15] " alvinx.zhang
2020-03-09  8:23 ` [dpdk-dev] [PATCH v1 02/15] net/igc: update base share codes alvinx.zhang
2020-03-09  8:23 ` [dpdk-dev] [PATCH v1 03/15] net/igc: device initialization alvinx.zhang
2020-03-12  4:42   ` Ye Xiaolong
2020-03-09  8:23 ` [dpdk-dev] [PATCH v1 04/15] net/igc: implement device base ops alvinx.zhang
2020-03-09  8:23 ` [dpdk-dev] [PATCH v1 05/15] net/igc: support reception and transmission of packets alvinx.zhang
2020-03-09  8:23 ` [dpdk-dev] [PATCH v1 06/15] net/igc: implement status API alvinx.zhang
2020-03-09  8:23 ` [dpdk-dev] [PATCH v1 07/15] net/igc: enable Rx queue interrupts alvinx.zhang
2020-03-09  8:24 ` [dpdk-dev] [PATCH v1 08/15] net/igc: implement flow control ops alvinx.zhang
2020-03-09  8:24 ` [dpdk-dev] [PATCH v1 09/15] net/igc: implement RSS API alvinx.zhang
2020-03-09  8:24 ` [dpdk-dev] [PATCH v1 10/15] net/igc: implement feature of VLAN alvinx.zhang
2020-03-09  8:24 ` [dpdk-dev] [PATCH v1 11/15] net/igc: implement ether-type filter alvinx.zhang
2020-03-09  8:24 ` [dpdk-dev] [PATCH v1 12/15] net/igc: implement 2-tuple filter alvinx.zhang
2020-03-09  8:24 ` [dpdk-dev] [PATCH v1 13/15] net/igc: implement TCP SYN filter alvinx.zhang
2020-03-09  8:24 ` [dpdk-dev] [PATCH v1 14/15] net/igc: implement hash filter configure alvinx.zhang
2020-03-09  8:24 ` [dpdk-dev] [PATCH v1 15/15] net/igc: implement flow API alvinx.zhang
2020-03-09  8:35 ` [dpdk-dev] [PATCH v1 01/15] net/igc: add igc PMD Ye Xiaolong
2020-03-12  3:09 ` Ye Xiaolong
2020-03-20  2:46 ` [dpdk-dev] [PATCH v2 00/14] " alvinx.zhang
2020-03-20  2:46   ` [dpdk-dev] [PATCH v2 01/14] net/igc: add " alvinx.zhang
2020-04-03 12:21     ` Ferruh Yigit [this message]
2020-03-20  2:46   ` [dpdk-dev] [PATCH v2 02/14] net/igc: support device initialization alvinx.zhang
2020-04-03 12:23     ` Ferruh Yigit
2020-03-20  2:46   ` [dpdk-dev] [PATCH v2 03/14] net/igc: implement device base ops alvinx.zhang
2020-04-03 12:24     ` Ferruh Yigit
2020-03-20  2:46   ` [dpdk-dev] [PATCH v2 04/14] net/igc: support reception and transmission of packets alvinx.zhang
2020-04-03 12:27     ` Ferruh Yigit
2020-03-20  2:46   ` [dpdk-dev] [PATCH v2 05/14] net/igc: implement status API alvinx.zhang
2020-04-03 12:24     ` Ferruh Yigit
2020-03-20  2:46   ` [dpdk-dev] [PATCH v2 06/14] net/igc: enable Rx queue interrupts alvinx.zhang
2020-03-20  2:46   ` [dpdk-dev] [PATCH v2 07/14] net/igc: implement flow control ops alvinx.zhang
2020-03-20  2:46   ` [dpdk-dev] [PATCH v2 08/14] net/igc: implement RSS API alvinx.zhang
2020-03-20  2:46   ` [dpdk-dev] [PATCH v2 09/14] net/igc: implement feature of VLAN alvinx.zhang
2020-03-20  2:46   ` [dpdk-dev] [PATCH v2 10/14] net/igc: implement ether-type filter alvinx.zhang
2020-04-03 12:26     ` Ferruh Yigit
2020-03-20  2:46   ` [dpdk-dev] [PATCH v2 11/14] net/igc: implement 2-tuple filter alvinx.zhang
2020-03-20  2:46   ` [dpdk-dev] [PATCH v2 12/14] net/igc: implement TCP SYN filter alvinx.zhang
2020-03-20  2:46   ` [dpdk-dev] [PATCH v2 13/14] net/igc: implement hash filter configure alvinx.zhang
2020-03-20  2:46   ` [dpdk-dev] [PATCH v2 14/14] net/igc: implement flow API alvinx.zhang
2020-04-03 12:26     ` 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=f3afb8bf-f54a-1c54-8d69-ec06d6e311f3@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=alvinx.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=haiyue.wang@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=xiaolong.ye@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).