[dpdk-dev] [PATCH v2 09/13] mlx5: add link update device operation
Adrien Mazarguil
adrien.mazarguil at 6wind.com
Mon Nov 2 19:27:40 CET 2015
On Mon, Nov 02, 2015 at 09:52:17AM -0800, Stephen Hemminger wrote:
> On Fri, 30 Oct 2015 19:52:38 +0100
> Adrien Mazarguil <adrien.mazarguil at 6wind.com> wrote:
>
> > +static int
> > +mlx5_link_update_unlocked(struct rte_eth_dev *dev, int wait_to_complete)
> > +{
> > + struct priv *priv = dev->data->dev_private;
> > + struct ethtool_cmd edata = {
> > + .cmd = ETHTOOL_GSET
> > + };
> > + struct ifreq ifr;
> > + struct rte_eth_link dev_link;
> > + int link_speed = 0;
> > +
> > + (void)wait_to_complete;
>
> DPDK style is to use the __rte_unused attribute rather than dummy statements
> to avoid unused warnings.
Thanks for pointing this out, I'm used to avoiding C extensions whenever
possible but will stick to DPDK style next time.
Still, it would be nice if we could steer DPDK away from such extensions as
much as possible. As a library, we should allow user applications to compile
with flags we can't control (such as -pedantic -std=c99, and various
-Wsomething).
--
Adrien Mazarguil
6WIND
More information about the dev
mailing list