From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org
Subject: Re: [PATCH v8 5/9] nfp: adding link functionality
Date: Wed, 25 Nov 2015 17:30:20 +0100 [thread overview]
Message-ID: <2533348.HH4ZyNmTXY@xps13> (raw)
In-Reply-To: <20151125082923.19bafdea@xeon-e3>
2015-11-25 08:29, Stephen Hemminger:
> 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.
Because nobody made the patch.
Stephen, how is your mood today?
next prev parent reply other threads:[~2015-11-25 16:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 16:19 [PATCH v8 0/9] support for netronome nfp-6xxx card Alejandro.Lucero
2015-11-25 16:19 ` [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 ` [PATCH v8 2/9] nfp: adding tx/tx functionality Alejandro.Lucero
2015-11-25 16:19 ` [PATCH v8 3/9] nfp: adding rss Alejandro.Lucero
2015-11-25 16:19 ` [PATCH v8 4/9] nfp: adding stats Alejandro.Lucero
2015-11-25 16:19 ` [PATCH v8 5/9] nfp: adding link functionality Alejandro.Lucero
2015-11-25 16:29 ` Stephen Hemminger
2015-11-25 16:30 ` Thomas Monjalon [this message]
2015-11-25 16:33 ` Alejandro Lucero
2015-11-25 16:19 ` [PATCH v8 6/9] nfp: adding extra functionality Alejandro.Lucero
2015-11-25 16:19 ` [PATCH v8 7/9] nfp: link status change interrupt support Alejandro.Lucero
2015-11-25 16:32 ` Stephen Hemminger
2015-11-25 16:19 ` [PATCH v8 8/9] nfp: adding nic guide Alejandro.Lucero
2015-11-25 16:19 ` [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=2533348.HH4ZyNmTXY@xps13 \
--to=thomas.monjalon@6wind.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.