DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ethdev: read link state interrupt without link_update service
@ 2014-06-20 13:13 Thomas Monjalon
  2014-06-25 11:45 ` Olivier MATZ
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2014-06-20 13:13 UTC (permalink / raw)
  To: dev

It is now possible to read link status updated by interrupt without
having manual link_update() service provided by the PMD.
Indeed link_update() is useless in interrupt case.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 lib/librte_ether/rte_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 7256841..a292b6e 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -1100,11 +1100,11 @@ rte_eth_link_get(uint8_t port_id, struct rte_eth_link *eth_link)
 		return;
 	}
 	dev = &rte_eth_devices[port_id];
-	FUNC_PTR_OR_RET(*dev->dev_ops->link_update);
 
 	if (dev->data->dev_conf.intr_conf.lsc != 0)
 		rte_eth_dev_atomic_read_link_status(dev, eth_link);
 	else {
+		FUNC_PTR_OR_RET(*dev->dev_ops->link_update);
 		(*dev->dev_ops->link_update)(dev, 1);
 		*eth_link = dev->data->dev_link;
 	}
@@ -1120,11 +1120,11 @@ rte_eth_link_get_nowait(uint8_t port_id, struct rte_eth_link *eth_link)
 		return;
 	}
 	dev = &rte_eth_devices[port_id];
-	FUNC_PTR_OR_RET(*dev->dev_ops->link_update);
 
 	if (dev->data->dev_conf.intr_conf.lsc != 0)
 		rte_eth_dev_atomic_read_link_status(dev, eth_link);
 	else {
+		FUNC_PTR_OR_RET(*dev->dev_ops->link_update);
 		(*dev->dev_ops->link_update)(dev, 0);
 		*eth_link = dev->data->dev_link;
 	}
-- 
2.0.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] ethdev: read link state interrupt without link_update service
  2014-06-20 13:13 [dpdk-dev] [PATCH] ethdev: read link state interrupt without link_update service Thomas Monjalon
@ 2014-06-25 11:45 ` Olivier MATZ
  2014-06-27  0:06   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Olivier MATZ @ 2014-06-25 11:45 UTC (permalink / raw)
  To: Thomas Monjalon, dev

On 06/20/2014 03:13 PM, Thomas Monjalon wrote:
> It is now possible to read link status updated by interrupt without
> having manual link_update() service provided by the PMD.
> Indeed link_update() is useless in interrupt case.
>
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Acked-by: Olivier Matz <olivier.matz@6wind.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] ethdev: read link state interrupt without link_update service
  2014-06-25 11:45 ` Olivier MATZ
@ 2014-06-27  0:06   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2014-06-27  0:06 UTC (permalink / raw)
  To: Olivier MATZ; +Cc: dev

> > It is now possible to read link status updated by interrupt without
> > having manual link_update() service provided by the PMD.
> > Indeed link_update() is useless in interrupt case.
> > 
> > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> 
> Acked-by: Olivier Matz <olivier.matz@6wind.com>

Applied for version 1.7.0.

-- 
Thomas

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-27  0:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-20 13:13 [dpdk-dev] [PATCH] ethdev: read link state interrupt without link_update service Thomas Monjalon
2014-06-25 11:45 ` Olivier MATZ
2014-06-27  0:06   ` Thomas Monjalon

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git