From: Matt Wilson <msw@amzn.com>
To: Netanel Belgazal <netanel@annapurnalabs.com>
Cc: zorik@annapurnalabs.com, saeed@annapurnalabs.com,
alex@annapurnalabs.com, msw@amazon.com, aliguori@amazon.com,
davem@davemloft.net, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, antoine.tenart@free-electrons.com
Subject: Re: [PATCH] net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)
Date: Tue, 15 Mar 2016 10:41:34 -0700 [thread overview]
Message-ID: <20160315174133.GA23388@u54ee753d2d1854bda401.ant.amazon.com> (raw)
In-Reply-To: <1458039006-19956-1-git-send-email-netanel@annapurnalabs.com>
On Tue, Mar 15, 2016 at 12:50:06PM +0200, Netanel Belgazal wrote:
[...]
> diff --git a/drivers/net/ethernet/amazon/Kconfig b/drivers/net/ethernet/amazon/Kconfig
> new file mode 100644
> index 0000000..bc4f240d
> --- /dev/null
> +++ b/drivers/net/ethernet/amazon/Kconfig
> @@ -0,0 +1,27 @@
> +#
> +# Amazon network device configuration
> +#
> +
> +config NET_VENDOR_AMAZON
> + bool "Amazon Devices"
> + default y
> + ---help---
> + If you have a network (Ethernet) device belonging to this class, say Y.
> +
> + Note that the answer to this question doesn't directly affect the
> + kernel: saying N will just cause the configurator to skip all
> + the questions about amazon devices. If you say Y, you will be asked
> + for your specific device in the following questions.
> +
> +if NET_VENDOR_AMAZON
> +
> +config ENA_ETHERNET
> + tristate "Elastic Network Adapter (ENA) support"
> + depends on (PCI_MSI && X86) || COMPILE_TEST
Remove COMPILE_TEST so that the kbuild-all robot won't complain. I
imagine that the drier should work on other systems that have MSI-X...
> + ---help---
> + This driver supports Elastic Network Adapter (ENA) adapter"
> +
> + To compile this driver as a module, choose M here.
> + The module will be called ena.
> +
> +endif #NET_VENDOR_AMAZON
[...]
> diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> new file mode 100644
> index 0000000..41d7265
> --- /dev/null
> +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
[...]
> +static int ena_init_rx_cpu_rmap(struct ena_adapter *adapter)
> +{
> + u32 i;
> + int rc;
> +
> + adapter->netdev->rx_cpu_rmap = alloc_irq_cpu_rmap(adapter->num_queues);
> + if (!adapter->netdev->rx_cpu_rmap)
> + return -ENOMEM;
> + for (i = 0; i < adapter->num_queues; i++) {
> + int irq_idx = ENA_IO_IRQ_IDX(i);
> +
> + rc = irq_cpu_rmap_add(adapter->netdev->rx_cpu_rmap,
> + adapter->msix_entries[irq_idx].vector);
> + if (rc) {
> + free_irq_cpu_rmap(adapter->netdev->rx_cpu_rmap);
> + adapter->netdev->rx_cpu_rmap = NULL;
> + return rc;
> + }
> + }
> + return 0;
> +}
This should be in #ifdef CONFIG_RSS_ACCEL (and elsewhere where
netdev->rx_cpu_rmap is touched).
--msw
next prev parent reply other threads:[~2016-03-15 17:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-15 10:50 Netanel Belgazal
2016-03-15 12:19 ` kbuild test robot
2016-03-15 15:25 ` Matt Wilson
2016-03-15 17:41 ` Matt Wilson [this message]
2016-03-15 18:19 ` Dan Williams
2016-03-15 18:29 ` Matt Wilson
2016-03-29 15:06 ` Rosen, Rami
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=20160315174133.GA23388@u54ee753d2d1854bda401.ant.amazon.com \
--to=msw@amzn.com \
--cc=alex@annapurnalabs.com \
--cc=aliguori@amazon.com \
--cc=antoine.tenart@free-electrons.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=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
all inboxes | Powered by JetHome®