From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Igor Russkikh <Igor.Russkikh@aquantia.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: Pavel Belous <Pavel.Belous@aquantia.com>
Subject: Re: [dpdk-dev] [PATCH v4 07/22] net/atlantic: rte device start, stop, initial configuration
Date: Wed, 10 Oct 2018 11:26:30 +0100 [thread overview]
Message-ID: <0e73b8a1-e176-fbd7-065e-99bb47ccf375@intel.com> (raw)
In-Reply-To: <380a05f203152fafdd9efcc922a7841c416bbdc8.1539075891.git.igor.russkikh@aquantia.com>
On 10/9/2018 10:31 AM, Igor Russkikh wrote:
> From: Pavel Belous <Pavel.Belous@aquantia.com>
>
> Start, stop and reset are all done via hw_atl layer.
> Link interrupt configuration is also done here.
>
> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
> Signed-off-by: Pavel Belous <pavel.belous@aquantia.com>
> Signed-off-by: Pavel Belous <Pavel.Belous@aquantia.com>
<...>
> +static void
> +atl_print_adapter_info(struct aq_hw_s *hw __rte_unused)
"hw" is used below, you can drop __rte_unused
<...>
> + /* For secondary processes, the primary process has done all the work */
> + if (rte_eal_process_type() != RTE_PROC_PRIMARY)
> + return 0;
> +
> + rte_eth_copy_pci_info(eth_dev, pci_dev);
This shouldn't be required, done in rte_eth_dev_pci_allocate() just before
calling this function, can you please double check?
<...>
> + /* Copy the permanent MAC address */
> + if (hw->aq_fw_ops->get_mac_permanent(hw,
> + (u8 *)ð_dev->data->mac_addrs[0]) != 0)
You can use "eth_dev->data->mac_addrs->addr_bytes" to prevent casting but both
same eventually
<...>
> +#ifdef RTE_LIBRTE_SECURITY
> + rte_free(eth_dev->security_ctx);
> +#endif
I think "eth_dev->security_ctx" should be allocated in the driver, if you are
not allocating it, you don't need to free it.
<...>
> static void
> -atl_dev_stop(struct rte_eth_dev *dev __rte_unused)
> +atl_dev_stop(struct rte_eth_dev *dev)
> {
> + struct aq_hw_s *hw =
> + ATL_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> +
> + /* reset the NIC */
> + atl_reset_hw(hw);
> + hw->adapter_stopped = 0;
Just to double check, below in close() there is an "atl_dev_stop(dev);" called,
which look like for stop, should it be called here too?
And the state "hw->adapter_stopped", should it be "0" or "1" when device stopped?
<...>
> +static int
> +atl_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size)
> +{
> + struct aq_hw_s *hw = ATL_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> + uint32_t fw_ver = 0;
> + unsigned int ret = 0;
> +
> + ret = hw_atl_utils_get_fw_version(hw, &fw_ver);
> + if (ret)
> + return 0;
Why not return error for this case?
next prev parent reply other threads:[~2018-10-10 10:26 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-09 9:31 [dpdk-dev] [PATCH v4 00/22] net/atlantic: Aquantia aQtion 10G NIC Family DPDK PMD driver Igor Russkikh
2018-10-09 9:31 ` [dpdk-dev] [PATCH v4 01/22] net/atlantic: atlantic PMD driver skeleton Igor Russkikh
2018-10-10 10:30 ` Ferruh Yigit
2018-10-09 9:31 ` [dpdk-dev] [PATCH v4 02/22] net/atlantic: logging macroes and some typedefs Igor Russkikh
2018-10-10 10:24 ` Ferruh Yigit
2018-10-09 9:31 ` [dpdk-dev] [PATCH v4 03/22] net/atlantic: hardware register access routines Igor Russkikh
2018-10-09 9:31 ` [dpdk-dev] [PATCH v4 04/22] net/atlantic: hw_atl register declarations Igor Russkikh
2018-10-10 10:31 ` Ferruh Yigit
2018-10-09 9:31 ` [dpdk-dev] [PATCH v4 05/22] net/atlantic: firmware operations layer Igor Russkikh
2018-10-09 9:31 ` [dpdk-dev] [PATCH v4 06/22] net/atlantic: b0 hardware layer main logic Igor Russkikh
2018-10-09 9:31 ` [dpdk-dev] [PATCH v4 07/22] net/atlantic: rte device start, stop, initial configuration Igor Russkikh
2018-10-10 10:26 ` Ferruh Yigit [this message]
2018-10-09 9:31 ` [dpdk-dev] [PATCH v4 08/22] net/atlantic: TX/RX function prototypes Igor Russkikh
2018-10-09 9:31 ` [dpdk-dev] [PATCH v4 09/22] net/atlantic: RX side structures and implementation Igor Russkikh
2018-10-10 10:29 ` Ferruh Yigit
2018-10-09 9:31 ` [dpdk-dev] [PATCH v4 10/22] net/atlantic: TX " Igor Russkikh
2018-10-09 9:31 ` [dpdk-dev] [PATCH v4 11/22] net/atlantic: link status and interrupt management Igor Russkikh
2018-10-10 10:27 ` Ferruh Yigit
2018-10-09 9:31 ` [dpdk-dev] [PATCH v4 12/22] net/atlantic: device statistics, xstats Igor Russkikh
2018-10-10 10:27 ` Ferruh Yigit
2018-10-09 9:31 ` [dpdk-dev] [PATCH v4 13/22] net/atlantic: support for RX/TX descriptors information Igor Russkikh
2018-10-09 9:31 ` [dpdk-dev] [PATCH v4 14/22] net/atlantic: promisc and allmulti configuration Igor Russkikh
2018-10-09 9:31 ` [dpdk-dev] [PATCH v4 15/22] net/atlantic: RSS and RETA manipulation API Igor Russkikh
2018-10-09 9:31 ` [dpdk-dev] [PATCH v4 16/22] net/atlantic: flow control configuration Igor Russkikh
2018-10-09 9:31 ` [dpdk-dev] [PATCH v4 17/22] net/atlantic: MAC address manipulations Igor Russkikh
2018-10-10 10:28 ` Ferruh Yigit
2018-10-09 9:32 ` [dpdk-dev] [PATCH v4 18/22] net/atlantic: VLAN filters and offloads Igor Russkikh
2018-10-09 9:32 ` [dpdk-dev] [PATCH v4 19/22] net/atlantic: eeprom and register manipulation routines Igor Russkikh
2018-10-09 9:32 ` [dpdk-dev] [PATCH v4 20/22] net/atlantic: LED control DPDK and private APIs Igor Russkikh
2018-10-10 10:32 ` Ferruh Yigit
2018-10-10 13:35 ` Igor Russkikh
2018-10-10 13:54 ` Ferruh Yigit
2018-10-09 9:32 ` [dpdk-dev] [PATCH v4 21/22] net/atlantic: support for read MAC registers for debug purposes Igor Russkikh
2018-10-09 9:32 ` [dpdk-dev] [PATCH v4 22/22] net/atlantic: documentation and rel notes Igor Russkikh
2018-10-10 10:29 ` Ferruh Yigit
2018-10-10 10:32 ` [dpdk-dev] [PATCH v4 00/22] net/atlantic: Aquantia aQtion 10G NIC Family DPDK PMD driver Ferruh Yigit
2018-10-10 13:21 ` Igor Russkikh
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=0e73b8a1-e176-fbd7-065e-99bb47ccf375@intel.com \
--to=ferruh.yigit@intel.com \
--cc=Igor.Russkikh@aquantia.com \
--cc=Pavel.Belous@aquantia.com \
--cc=dev@dpdk.org \
/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).