From: Ben Hutchings <ben@decadent.org.uk>
To: Netanel Belgazal <netanel@annapurnalabs.com>,
netdev@vger.kernel.org, davem@davemloft.net,
linux-kernel@vger.kernel.org
Cc: zorik@annapurnalabs.com, saeed@annapurnalabs.com,
alex@annapurnalabs.com, msw@amazon.com, aliguori@amazon.com,
benjamin.poirier@gmail.com, romieu@fr.zoreil.com,
rami.rosen@intel.com, antoine.tenart@free-electrons.com
Subject: Re: [PATCH net-next V2] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)
Date: Thu, 07 Jul 2016 11:56:43 +0200 [thread overview]
Message-ID: <1467885403.4171.17.camel@decadent.org.uk> (raw)
In-Reply-To: <1467871095-26394-1-git-send-email-netanel@annapurnalabs.com>
[-- Attachment #1: Type: text/plain, Size: 2575 bytes --]
On Thu, 2016-07-07 at 08:58 +0300, Netanel Belgazal wrote:
[...]
> +int ena_get_sset_count(struct net_device *netdev, int sset)
> +{
> + if (sset != ETH_SS_STATS)
> + return -EOPNOTSUPP;
> +
> + return netdev->num_tx_queues *
> + (ENA_STATS_ARRAY_TX + ENA_STATS_ARRAY_RX) +
> + ENA_STATS_ARRAY_GLOBAL + ENA_STATS_ARRAY_ENA_COM;
num_tx_queues is the number of software queues originally allocated,
which may be larger than the number in use (real_num_tx_queues).
And when actually generating the strings:
[...]
> +static void ena_queue_strings(struct ena_adapter *adapter, u8 **data)
> +{
> + const struct ena_stats *ena_stats;
> + int i, j;
> +
> + for (i = 0; i < adapter->num_queues; i++) {
you use adapter->num_queues.
[...]
> +static int ena_nway_reset(struct net_device *netdev)
> +{
> + return -ENODEV;
> +}
That doesn't make sense. The device is there but presumably doesn't
support autonegotiation. So don't implement the operation.
[...]
> +static int ena_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key,
> + u8 *hfunc)
> +{
> + struct ena_adapter *adapter = netdev_priv(netdev);
> + enum ena_admin_hash_functions ena_func;
> + u8 func;
> + int rc;
> +
> + rc = ena_com_indirect_table_get(adapter->ena_dev, indir);
> + if (rc)
> + return rc;
> +
> + rc = ena_com_get_hash_function(adapter->ena_dev, &ena_func, key);
> + if (rc)
> + return rc;
> +
> + switch (ena_func) {
> + case ENA_ADMIN_TOEPLITZ:
> + func = ETH_RSS_HASH_TOP;
> + case ENA_ADMIN_CRC32:
> + func = ETH_RSS_HASH_XOR;
Missing break statements.
> + default:
> + netif_err(adapter, drv, netdev,
> + "Command parameter is not supported\n");
> + return -EOPNOTSUPP;
> + }
[...]
> +static const struct ethtool_ops ena_ethtool_ops = {
> + .get_settings = ena_get_settings,
[...]
get_settings is now deprecated in favour of get_link_ksettings.
Ben.
Ben.
--
Ben Hutchings
For every action, there is an equal and opposite criticism. - Harrison
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-07-07 9:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-07 5:58 [PATCH net-next V2] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA) Netanel Belgazal
2016-07-07 7:53 ` kbuild test robot
2016-07-07 9:56 ` Ben Hutchings [this message]
2016-07-07 13:07 ` Netanel Belgazal
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=1467885403.4171.17.camel@decadent.org.uk \
--to=ben@decadent.org.uk \
--cc=alex@annapurnalabs.com \
--cc=aliguori@amazon.com \
--cc=antoine.tenart@free-electrons.com \
--cc=benjamin.poirier@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=msw@amazon.com \
--cc=netanel@annapurnalabs.com \
--cc=netdev@vger.kernel.org \
--cc=rami.rosen@intel.com \
--cc=romieu@fr.zoreil.com \
--cc=saeed@annapurnalabs.com \
--cc=zorik@annapurnalabs.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