Re: [PATCH v20 13/25] net/pcap: add link status for interface mode

Bruce Richardson
2026-03-16T14:11:59Z

On Tue, Mar 10, 2026 at 09:09:51AM -0700, Stephen Hemminger wrote:
> When the PCAP PMD is used in pass-through mode with a physical
> interface (iface=X), the link status was always reported with
> hardcoded values regardless of the actual interface state.
>
> Add OS-dependent function to query the real link state from
> the underlying interface.
>
> Linux and FreeBSD use SIOCGIFFLAGS to check IFF_UP and
> IFF_RUNNING. Windows uses GetAdaptersAddresses() to check
> OperStatus.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Any reason we can't in future similarly query the link speed of the
interface in use, and the other link parameters?