Starting a port always brings its link up, so the link partner sees the port as soon as the application starts it. An application that enables ports only after its own configuration is applied, such as a firewall or a switch, cannot keep a disabled port dark: it can only bring the link down right after rte_eth_dev_start(), and the link partner may still see the link flap.
The ice driver already has the link_state_on_close device argument to choose the link state when the port is stopped. This series adds its counterpart, link_state_on_start, to the ice, i40e and ixgbe drivers: -a <pci>,link_state_on_start=down With "down", the port is started with the link down, and the application brings it up later with rte_eth_dev_set_link_up(). The default "up" keeps the current behavior. ixgbe has no firmware command to bring the link down, so "down" leaves the port in the same state as rte_eth_dev_set_link_down(): the laser is kept off on fiber links, the copper PHY is powered off right after the link setup. Tested with testpmd on E810-C (ice, firmware 4.60) connected to a network packet broker: with link_state_on_start=down the link stays down after the port start and the link partner does not see it until "set link-up"; without the device argument the link comes up on start as before. i40e and ixgbe are build tested only. Roman Khromenok (3): net/ice: make link state configurable on device start net/i40e: make link state configurable on device start net/ixgbe: make link state configurable on device start doc/guides/nics/i40e.rst | 13 ++++++ doc/guides/nics/ice.rst | 13 ++++++ doc/guides/nics/ixgbe.rst | 13 ++++++ doc/guides/rel_notes/release_26_11.rst | 13 +++++- drivers/net/intel/i40e/i40e_ethdev.c | 58 +++++++++++++++++++++++++- drivers/net/intel/i40e/i40e_ethdev.h | 2 + drivers/net/intel/ice/ice_ethdev.c | 36 +++++++++++++++- drivers/net/intel/ice/ice_ethdev.h | 1 + drivers/net/intel/ixgbe/ixgbe_ethdev.c | 44 ++++++++++++++++++- drivers/net/intel/ixgbe/ixgbe_ethdev.h | 2 + 10 files changed, 187 insertions(+), 8 deletions(-) -- 2.47.3

