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

Bruce Richardson bruce.richardson at intel.com
Mon Mar 16 15:11:47 CET 2026


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 at networkplumber.org>
> ---

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

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


More information about the dev mailing list