DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tony Lu <zlu@ezchip.com>
To: 'Liming Sun' <lsun@ezchip.com>, <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 3/3] driver/net/mpipe: fix a mpipe link	initialization ordering issue
Date: Fri, 8 Jan 2016 11:08:35 +0800	[thread overview]
Message-ID: <003401d149c1$ed3e3d90$c7bab8b0$@com> (raw)
In-Reply-To: <1450193851-9100-4-git-send-email-lsun@ezchip.com>

>-----Original Message-----
>From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Liming Sun
>Sent: Tuesday, December 15, 2015 11:38 PM
>To: dev@dpdk.org
>Subject: [dpdk-dev] [PATCH 3/3] driver/net/mpipe: fix a mpipe link
initialization
>ordering issue
>
>Mpipe link structure is initialized in function mpipe_link_init().
>Currently it's only called from the eth_dev_ops.dev_start, which
>caused crashes when link mgmt APIs (like promiscuous_enable)
>was called before eth_dev_ops.dev_start(). This submit fixed it
>by calling mpipe_link_init() in rte_pmd_mpipe_devinit().
>
>Signed-off-by: Liming Sun <lsun@ezchip.com>
>---
> drivers/net/mpipe/mpipe_tilegx.c |   14 +++++++-------
> 1 files changed, 7 insertions(+), 7 deletions(-)
>
>diff --git a/drivers/net/mpipe/mpipe_tilegx.c
>b/drivers/net/mpipe/mpipe_tilegx.c
>index be7b6f2..5845511 100644
>--- a/drivers/net/mpipe/mpipe_tilegx.c
>+++ b/drivers/net/mpipe/mpipe_tilegx.c
>@@ -752,13 +752,6 @@ mpipe_init(struct mpipe_dev_priv *priv)
> 	if (priv->initialized)
> 		return 0;
>
>-	rc = mpipe_link_init(priv);
>-	if (rc < 0) {
>-		RTE_LOG(ERR, PMD, "%s: Failed to init link.\n",
>-			mpipe_name(priv));
>-		return rc;
>-	}
>-
> 	rc = mpipe_recv_init(priv);
> 	if (rc < 0) {
> 		RTE_LOG(ERR, PMD, "%s: Failed to init rx.\n",
>@@ -1633,6 +1626,13 @@ rte_pmd_mpipe_devinit(const char *ifname,
> 	eth_dev->rx_pkt_burst = &mpipe_recv_pkts;
> 	eth_dev->tx_pkt_burst = &mpipe_xmit_pkts;
>
>+	rc = mpipe_link_init(priv);
>+	if (rc < 0) {
>+		RTE_LOG(ERR, PMD, "%s: Failed to init link.\n",
>+			mpipe_name(priv));
>+		return rc;
>+	}
>+
> 	return 0;
> }
>
>--
>1.7.1

Acked-by: Zhigang Lu <zlu@ezchip.com>

  reply	other threads:[~2016-01-08  3:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 15:37 [dpdk-dev] [PATCH 0/3] Some misc fixes and optimization for the mpipe driver Liming Sun
2015-12-15 15:37 ` [dpdk-dev] [PATCH 1/3] driver/net/mpipe: support native build on tilegx platform Liming Sun
2016-01-08  2:59   ` Tony Lu
2015-12-15 15:37 ` [dpdk-dev] [PATCH 2/3] driver/net/mpipe: optimize mpipe buffer return mechanism Liming Sun
2016-01-08  3:04   ` Tony Lu
2015-12-15 15:37 ` [dpdk-dev] [PATCH 3/3] driver/net/mpipe: fix a mpipe link initialization ordering issue Liming Sun
2016-01-08  3:08   ` Tony Lu [this message]
2016-01-08 14:30   ` [dpdk-dev] [PATCH v2 1/3] driver/net/mpipe: support native build on tilegx platform Liming Sun
2016-01-08 14:30     ` [dpdk-dev] [PATCH v2 2/3] driver/net/mpipe: optimize mpipe buffer return mechanism Liming Sun
2016-01-08 14:30     ` [dpdk-dev] [PATCH v2 3/3] driver/net/mpipe: fix a mpipe link initialization ordering issue Liming Sun
2016-02-09 15:49     ` [dpdk-dev] [PATCH v2 1/3] driver/net/mpipe: support native build on tilegx platform Bruce Richardson
2016-02-09 16:16     ` Thomas Monjalon
2016-02-09 18:37       ` Liming Sun
2016-02-09 20:33         ` Thomas Monjalon
2016-02-09 21:15           ` Liming Sun
2016-02-09 22:47             ` Thomas Monjalon
2016-02-10  9:49               ` Bruce Richardson
2016-02-10 10:00                 ` Thomas Monjalon
2016-03-08 19:48           ` Thomas Monjalon

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='003401d149c1$ed3e3d90$c7bab8b0$@com' \
    --to=zlu@ezchip.com \
    --cc=dev@dpdk.org \
    --cc=lsun@ezchip.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).