All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Dariusz Sosnowski <dsosnowski@nvidia.com>
Cc: Thomas Monjalon <thomas@monjalon.net>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	Bing Zhao <bingz@nvidia.com>, Ori Kam <orika@nvidia.com>,
	Suanming Mou <suanmingm@nvidia.com>,
	Matan Azrad <matan@nvidia.com>,
	Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>, <dev@dpdk.org>,
	<stable@dpdk.org>, Cosmin Ratiu <cratiu@nvidia.com>
Subject: Re: [PATCH] net/mlx5: move to polling for LSC interrupts
Date: Mon, 26 Oct 2026 10:03:36 -0700	[thread overview]
Message-ID: <20261026100336.15d7ae6b@phoenix.local> (raw)
In-Reply-To: <20261026160400.1290443-1-dsosnowski@nvidia.com>

On Mon, 26 Oct 2026 17:04:00 +0100
Dariusz Sosnowski <dsosnowski@nvidia.com> wrote:

> +/**
> + * Retrieve the carrier state of a device.
> + *
> + * The IFF_RUNNING flag reported by SIOCGIFFLAGS reflects the RFC 2863
> + * operational state, which the kernel only refreshes from its link watch
> + * work queue and which may therefore lag the actual carrier by up to a
> + * second. ETHTOOL_GLINK reports the carrier directly, and additionally
> + * flushes any link watch event still pending for the device.
> + *
> + * @param dev
> + *   Pointer to Ethernet device structure.
> + *
> + * @return
> + *   1 if the carrier is up, 0 otherwise.
> + *   Negative errno value is returned on error.
> + */
> +int
> +mlx5_link_carrier_get(struct rte_eth_dev *dev)
> +{
> +	struct ethtool_value ecmd = {
> +		.cmd = ETHTOOL_GLINK,
> +	};
> +	struct ifreq ifr;
> +	int ret;
> +
> +	memset(&ifr, 0, sizeof(ifr));

Odd, why not use structure initialization for both?

  reply	other threads:[~2026-10-26 17:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26 16:04 [PATCH] net/mlx5: move to polling for LSC interrupts Dariusz Sosnowski
2026-10-26 17:03 ` Stephen Hemminger [this message]
2026-10-29 17:21   ` Dariusz Sosnowski
2026-10-26 17:13 ` Stephen Hemminger
2026-10-29 17:19   ` Dariusz Sosnowski

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=20261026100336.15d7ae6b@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=bingz@nvidia.com \
    --cc=cratiu@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=dsosnowski@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=suanmingm@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.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 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.