src/dpdk/drivers/net/igc/base/igc_mac.c
void igc_set_lan_id_multi_port_pci(struct igc_hw *hw)
{
	struct igc_bus_info *bus = &hw->bus;
	u16 pci_header_type;
	u32 status;

	igc_read_pci_cfg(hw, PCI_HEADER_TYPE_REGISTER, &pci_header_type);
	if (pci_header_type & PCI_HEADER_TYPE_MULTIFUNC) {
		status = IGC_READ_REG(hw, IGC_STATUS);
		bus->func = (status & IGC_STATUS_FUNC_MASK)
			    >> IGC_STATUS_FUNC_SHIFT;
	} else {
		bus->func = 0;
	}
}
/**
 *  igc_set_lan_id_multi_port_pci - Set LAN id for PCI multiple port devices
 *  @hw: pointer to the HW structure
 *
 *  Determines the LAN function id by reading PCI config space.
 **/
Set LAN id for PCI multiple port devices
@hw: pointer to the HW structure

Determines the LAN function id by reading PCI config space.
Set LAN id for PCI multiple port devices @hw : pointer to the HW structure Determines the LAN function id by reading PCI config space .
void igc_set_lan_id_multi_port_pci(struct igc_hw *hw)
{
	struct igc_bus_info *bus = &hw->bus;
	u16 pci_header_type;
	u32 status;
	igc_read_pci_cfg(hw, PCI_HEADER_TYPE_REGISTER, &pci_header_type);
	if (pci_header_type & PCI_HEADER_TYPE_MULTIFUNC) {
		status = IGC_READ_REG(hw, IGC_STATUS);
		bus->func = (status & IGC_STATUS_FUNC_MASK)
			    >> IGC_STATUS_FUNC_SHIFT;
	} else {
		bus->func = 0;
	}
}
void igc_set_lan_id_multi_port_pci ( struct igc_hw * hw ) { struct igc_bus_info * bus = & hw -> bus ; u16 pci_header_type ; u32 status ; igc_read_pci_cfg ( hw , PCI_HEADER_TYPE_REGISTER , & pci_header_type ) ; if ( pci_header_type & PCI_HEADER_TYPE_MULTIFUNC ) { status = IGC_READ_REG ( hw , IGC_STATUS ) ; bus -> func = ( status & IGC_STATUS_FUNC_MASK ) >> IGC_STATUS_FUNC_SHIFT ; } else { bus -> func = 0 ; } }
igc_set_lan_id_multi_port_pci - Set LAN id for PCI multiple port devices
  @hw: pointer to the HW structure
igc_set_lan_id_multi_port_pci - Set LAN id for PCI multiple port devices @hw : pointer to the HW structure