From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Shannon Nelson <snelson@pensando.io>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH v2 net-next 17/19] ionic: Add RSS support
Date: Sat, 29 Jun 2019 11:48:39 -0700 [thread overview]
Message-ID: <20190629114839.6cf1f048@cakuba.netronome.com> (raw)
In-Reply-To: <20190628213934.8810-18-snelson@pensando.io>
On Fri, 28 Jun 2019 14:39:32 -0700, Shannon Nelson wrote:
> @@ -1260,10 +1266,24 @@ static struct lif *ionic_lif_alloc(struct ionic *ionic, unsigned int index)
> if (err)
> goto err_out_free_lif_info;
>
> + /* allocate rss indirection table */
> + tbl_sz = le16_to_cpu(lif->ionic->ident.lif.eth.rss_ind_tbl_sz);
> + lif->rss_ind_tbl_sz = sizeof(*lif->rss_ind_tbl) * tbl_sz;
> + lif->rss_ind_tbl = dma_alloc_coherent(dev, lif->rss_ind_tbl_sz,
> + &lif->rss_ind_tbl_pa,
> + GFP_KERNEL);
> +
> + if (!lif->rss_ind_tbl) {
> + dev_err(dev, "Failed to allocate rss indirection table, aborting\n");
> + goto err_out_free_qcqs;
> + }
> +
> list_add_tail(&lif->list, &ionic->lifs);
>
> return lif;
>
> +err_out_free_qcqs:
> + ionic_qcqs_free(lif);
> err_out_free_lif_info:
> dma_free_coherent(dev, lif->info_sz, lif->info, lif->info_pa);
> lif->info = NULL;
> @@ -1302,6 +1322,14 @@ static void ionic_lif_free(struct lif *lif)
> {
> struct device *dev = lif->ionic->dev;
>
> + /* free rss indirection table */
> + if (lif->rss_ind_tbl) {
> + dma_free_coherent(dev, lif->rss_ind_tbl_sz, lif->rss_ind_tbl,
> + lif->rss_ind_tbl_pa);
dma_free_coherent() should be able to deal with NULLs just fine.
Besides you fail hard if the allocation failed, no?
> + lif->rss_ind_tbl = NULL;
> + lif->rss_ind_tbl_pa = 0;
> + }
next prev parent reply other threads:[~2019-06-29 18:48 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-28 21:39 [PATCH v2 net-next 00/19] Add ionic driver Shannon Nelson
2019-06-28 21:39 ` [PATCH v2 net-next 01/19] ionic: Add basic framework for IONIC Network device driver Shannon Nelson
2019-06-28 21:39 ` [PATCH v2 net-next 02/19] ionic: Add hardware init and device commands Shannon Nelson
2019-06-28 21:39 ` [PATCH v2 net-next 03/19] ionic: Add port management commands Shannon Nelson
2019-06-28 21:39 ` [PATCH v2 net-next 04/19] ionic: Add basic lif support Shannon Nelson
2019-06-29 18:45 ` Jakub Kicinski
2019-07-01 18:00 ` Shannon Nelson
2019-06-28 21:39 ` [PATCH v2 net-next 05/19] ionic: Add interrupts and doorbells Shannon Nelson
2019-06-28 21:39 ` [PATCH v2 net-next 06/19] ionic: Add basic adminq support Shannon Nelson
2019-06-28 21:39 ` [PATCH v2 net-next 07/19] ionic: Add adminq action Shannon Nelson
2019-06-28 21:39 ` [PATCH v2 net-next 08/19] ionic: Add notifyq support Shannon Nelson
2019-06-28 21:39 ` [PATCH v2 net-next 09/19] ionic: Add the basic NDO callbacks for netdev support Shannon Nelson
2019-06-28 21:39 ` [PATCH v2 net-next 10/19] ionic: Add management of rx filters Shannon Nelson
2019-06-28 21:39 ` [PATCH v2 net-next 11/19] ionic: Add Rx filter and rx_mode ndo support Shannon Nelson
2019-06-28 21:39 ` [PATCH v2 net-next 12/19] ionic: Add async link status check and basic stats Shannon Nelson
2019-06-28 21:39 ` [PATCH v2 net-next 13/19] ionic: Add initial ethtool support Shannon Nelson
2019-06-28 21:39 ` [PATCH v2 net-next 14/19] ionic: Add Tx and Rx handling Shannon Nelson
2019-06-29 18:57 ` Jakub Kicinski
2019-07-01 18:17 ` Shannon Nelson
2019-06-28 21:39 ` [PATCH v2 net-next 15/19] ionic: Add netdev-event handling Shannon Nelson
2019-06-28 21:39 ` [PATCH v2 net-next 16/19] ionic: Add driver stats Shannon Nelson
2019-06-29 18:53 ` Jakub Kicinski
2019-07-01 18:06 ` Shannon Nelson
2019-06-28 21:39 ` [PATCH v2 net-next 17/19] ionic: Add RSS support Shannon Nelson
2019-06-29 18:48 ` Jakub Kicinski [this message]
2019-07-01 18:03 ` Shannon Nelson
2019-06-28 21:39 ` [PATCH v2 net-next 18/19] ionic: Add coalesce and other features Shannon Nelson
2019-06-28 21:39 ` [PATCH v2 net-next 19/19] ionic: Add basic devlink interface Shannon Nelson
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=20190629114839.6cf1f048@cakuba.netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=netdev@vger.kernel.org \
--cc=snelson@pensando.io \
/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