src/dpdk/drivers/net/ixgbe/ixgbe_bypass.c
void
ixgbe_bypass_init(struct rte_eth_dev *dev)
{
	struct ixgbe_adapter *adapter;
	struct ixgbe_hw *hw;

	adapter = IXGBE_DEV_TO_ADPATER(dev);
	hw = &adapter->hw;

	/* Only allow BYPASS ops on the first port */
	if (hw->device_id != IXGBE_DEV_ID_82599_BYPASS ||
			hw->bus.func != 0) {
		PMD_DRV_LOG(ERR, "bypass function is not supported on that device");
		return;
	}

	/* set bypass ops. */
	adapter->bps.ops.bypass_rw = &ixgbe_bypass_rw_generic;
	adapter->bps.ops.bypass_valid_rd = &ixgbe_bypass_valid_rd_generic;
	adapter->bps.ops.bypass_set = &ixgbe_bypass_set_generic;
	adapter->bps.ops.bypass_rd_eep = &ixgbe_bypass_rd_eep_generic;

	/* set the time for logging. */
	ixgbe_bypass_set_time(adapter);

	/* Don't have the SDP to the laser */
	hw->mac.ops.disable_tx_laser = NULL;
	hw->mac.ops.enable_tx_laser = NULL;
	hw->mac.ops.flap_tx_laser = NULL;
}
/**
 * ixgbe_bypass_init - Make some environment changes for bypass
 *
 * @adapter: pointer to ixgbe_adapter structure for access to state bits
 *
 * This function collects all the modifications needed by the bypass
 * driver.
 **/
Make some environment changes for bypass
@adapter: pointer to ixgbe_adapter structure for access to state bits

This function collects all the modifications needed by the bypass
driver.
Make some environment changes for bypass @adapter : pointer to ixgbe_adapter structure for access to state bits This function collects all the modifications needed by the bypass driver .
void
ixgbe_bypass_init(struct rte_eth_dev *dev)
{
	struct ixgbe_adapter *adapter;
	struct ixgbe_hw *hw;
	adapter = IXGBE_DEV_TO_ADPATER(dev);
	hw = &adapter->hw;
	if (hw->device_id != IXGBE_DEV_ID_82599_BYPASS ||
			hw->bus.func != 0) {
		PMD_DRV_LOG(ERR, "bypass function is not supported on that device");
		return;
	}
	adapter->bps.ops.bypass_rw = &ixgbe_bypass_rw_generic;
	adapter->bps.ops.bypass_valid_rd = &ixgbe_bypass_valid_rd_generic;
	adapter->bps.ops.bypass_set = &ixgbe_bypass_set_generic;
	adapter->bps.ops.bypass_rd_eep = &ixgbe_bypass_rd_eep_generic;
	ixgbe_bypass_set_time(adapter);
	hw->mac.ops.disable_tx_laser = NULL;
	hw->mac.ops.enable_tx_laser = NULL;
	hw->mac.ops.flap_tx_laser = NULL;
}
void ixgbe_bypass_init ( struct rte_eth_dev * dev ) { struct ixgbe_adapter * adapter ; struct ixgbe_hw * hw ; adapter = IXGBE_DEV_TO_ADPATER ( dev ) ; hw = & adapter -> hw ; if ( hw -> device_id != IXGBE_DEV_ID_82599_BYPASS || hw -> bus . func != 0 ) { PMD_DRV_LOG ( ERR , " " ) ; return ; } adapter -> bps . ops . bypass_rw = & ixgbe_bypass_rw_generic ; adapter -> bps . ops . bypass_valid_rd = & ixgbe_bypass_valid_rd_generic ; adapter -> bps . ops . bypass_set = & ixgbe_bypass_set_generic ; adapter -> bps . ops . bypass_rd_eep = & ixgbe_bypass_rd_eep_generic ; ixgbe_bypass_set_time ( adapter ) ; hw -> mac . ops . disable_tx_laser = NULL ; hw -> mac . ops . enable_tx_laser = NULL ; hw -> mac . ops . flap_tx_laser = NULL ; }
ixgbe_bypass_init - Make some environment changes for bypass
 @adapter: pointer to ixgbe_adapter structure for access to state bits
ixgbe_bypass_init - Make some environment changes for bypass @adapter : pointer to ixgbe_adapter structure for access to state bits
/* Only allow BYPASS ops on the first port */ /* set bypass ops. */ /* set the time for logging. */ /* Don't have the SDP to the laser */