From: Stephen Hemminger <stephen@networkplumber.org>
To: "Alejandro.Lucero" <alejandro.lucero@netronome.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v8 5/9] nfp: adding link functionality
Date: Wed, 25 Nov 2015 08:29:23 -0800 [thread overview]
Message-ID: <20151125082923.19bafdea@xeon-e3> (raw)
In-Reply-To: <1448468395-15577-6-git-send-email-alejandro.lucero@netronome.com>
On Wed, 25 Nov 2015 16:19:51 +0000
"Alejandro.Lucero" <alejandro.lucero@netronome.com> wrote:
> +/*
> + * Atomically reads link status information from global structure rte_eth_dev.
> + *
> + * @param dev
> + * - Pointer to the structure rte_eth_dev to read from.
> + * - Pointer to the buffer to be saved with the link status.
> + *
> + * @return
> + * - On success, zero.
> + * - On failure, negative value.
> + */
> +static inline int
> +nfp_net_dev_atomic_read_link_status(struct rte_eth_dev *dev,
> + struct rte_eth_link *link)
> +{
> + struct rte_eth_link *dst = link;
> + struct rte_eth_link *src = &dev->data->dev_link;
> +
> + if (rte_atomic64_cmpset((uint64_t *)dst, *(uint64_t *)dst,
> + *(uint64_t *)src) == 0)
> + return -1;
> +
> + return 0;
> +}
> +
> +/
Sigh, this code has been copied and pasted to every driver.
Why is it not part of standard rte_ethdev code.
next prev parent reply other threads:[~2015-11-25 16:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 16:19 [dpdk-dev] [PATCH v8 0/9] support for netronome nfp-6xxx card Alejandro.Lucero
2015-11-25 16:19 ` [dpdk-dev] [PATCH v8 1/9] nfp: basic initialization Alejandro.Lucero
2015-11-25 18:47 ` Thomas Monjalon
2015-11-25 18:48 ` Thomas Monjalon
2015-11-25 16:19 ` [dpdk-dev] [PATCH v8 2/9] nfp: adding tx/tx functionality Alejandro.Lucero
2015-11-25 16:19 ` [dpdk-dev] [PATCH v8 3/9] nfp: adding rss Alejandro.Lucero
2015-11-25 16:19 ` [dpdk-dev] [PATCH v8 4/9] nfp: adding stats Alejandro.Lucero
2015-11-25 16:19 ` [dpdk-dev] [PATCH v8 5/9] nfp: adding link functionality Alejandro.Lucero
2015-11-25 16:29 ` Stephen Hemminger [this message]
2015-11-25 16:30 ` Thomas Monjalon
2015-11-25 16:33 ` Alejandro Lucero
2015-11-25 16:19 ` [dpdk-dev] [PATCH v8 6/9] nfp: adding extra functionality Alejandro.Lucero
2015-11-25 16:19 ` [dpdk-dev] [PATCH v8 7/9] nfp: link status change interrupt support Alejandro.Lucero
2015-11-25 16:32 ` Stephen Hemminger
2015-11-25 16:19 ` [dpdk-dev] [PATCH v8 8/9] nfp: adding nic guide Alejandro.Lucero
2015-11-25 16:19 ` [dpdk-dev] [PATCH v8 9/9] nfp: Updating MAINTAINERS Alejandro.Lucero
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=20151125082923.19bafdea@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=alejandro.lucero@netronome.com \
--cc=dev@dpdk.org \
/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).