src/dpdk/drivers/net/cxgbe/cxgbe_main.c
static int adap_init0_tweaks(struct adapter *adapter)
{
	u8 rx_dma_offset;

	/*
	 * Fix up various Host-Dependent Parameters like Page Size, Cache
	 * Line Size, etc.  The firmware default is for a 4KB Page Size and
	 * 64B Cache Line Size ...
	 */
	t4_fixup_host_params_compat(adapter, CXGBE_PAGE_SIZE, L1_CACHE_BYTES,
				    T5_LAST_REV);

	/*
	 * Keep the chip default offset to deliver Ingress packets into our
	 * DMA buffers to zero
	 */
	rx_dma_offset = 0;
	t4_set_reg_field(adapter, A_SGE_CONTROL, V_PKTSHIFT(M_PKTSHIFT),
			 V_PKTSHIFT(rx_dma_offset));

	t4_set_reg_field(adapter, A_SGE_FLM_CFG,
			 V_CREDITCNT(M_CREDITCNT) | M_CREDITCNTPACKING,
			 V_CREDITCNT(3) | V_CREDITCNTPACKING(1));

	t4_set_reg_field(adapter, A_SGE_INGRESS_RX_THRESHOLD,
			 V_THRESHOLD_3(M_THRESHOLD_3), V_THRESHOLD_3(32U));

	t4_set_reg_field(adapter, A_SGE_CONTROL2, V_IDMAARBROUNDROBIN(1U),
			 V_IDMAARBROUNDROBIN(1U));

	/*
	 * Don't include the "IP Pseudo Header" in CPL_RX_PKT checksums: Linux
	 * adds the pseudo header itself.
	 */
	t4_tp_wr_bits_indirect(adapter, A_TP_INGRESS_CONFIG,
			       F_CSUM_HAS_PSEUDO_HDR, 0);

	return 0;
}
/*
 * Tweak configuration based on system architecture, etc.  Most of these have
 * defaults assigned to them by Firmware Configuration Files (if we're using
 * them) but need to be explicitly set if we're using hard-coded
 * initialization. So these are essentially common tweaks/settings for
 * Configuration Files and hard-coded initialization ...
 */
Tweak configuration based on system architecture, etc.  Most of these have
defaults assigned to them by Firmware Configuration Files (if we're using
them) but need to be explicitly set if we're using hard-coded
initialization. So these are essentially common tweaks/settings for
Configuration Files and hard-coded initialization
Tweak configuration based on system architecture etc . Most of these have defaults assigned to them by Firmware Configuration Files ( if we ' re using them ) but need to be explicitly set if we ' re using hard - coded initialization . So these are essentially common tweaks / settings for Configuration Files and hard - coded initialization
static int adap_init0_tweaks(struct adapter *adapter)
{
	u8 rx_dma_offset;
	t4_fixup_host_params_compat(adapter, CXGBE_PAGE_SIZE, L1_CACHE_BYTES,
				    T5_LAST_REV);
	rx_dma_offset = 0;
	t4_set_reg_field(adapter, A_SGE_CONTROL, V_PKTSHIFT(M_PKTSHIFT),
			 V_PKTSHIFT(rx_dma_offset));
	t4_set_reg_field(adapter, A_SGE_FLM_CFG,
			 V_CREDITCNT(M_CREDITCNT) | M_CREDITCNTPACKING,
			 V_CREDITCNT(3) | V_CREDITCNTPACKING(1));
	t4_set_reg_field(adapter, A_SGE_INGRESS_RX_THRESHOLD,
			 V_THRESHOLD_3(M_THRESHOLD_3), V_THRESHOLD_3(32U));
	t4_set_reg_field(adapter, A_SGE_CONTROL2, V_IDMAARBROUNDROBIN(1U),
			 V_IDMAARBROUNDROBIN(1U));
	t4_tp_wr_bits_indirect(adapter, A_TP_INGRESS_CONFIG,
			       F_CSUM_HAS_PSEUDO_HDR, 0);
	return 0;
}
static int adap_init0_tweaks ( struct adapter * adapter ) { u8 rx_dma_offset ; t4_fixup_host_params_compat ( adapter , CXGBE_PAGE_SIZE , L1_CACHE_BYTES , T5_LAST_REV ) ; rx_dma_offset = 0 ; t4_set_reg_field ( adapter , A_SGE_CONTROL , V_PKTSHIFT ( M_PKTSHIFT ) , V_PKTSHIFT ( rx_dma_offset ) ) ; t4_set_reg_field ( adapter , A_SGE_FLM_CFG , V_CREDITCNT ( M_CREDITCNT ) | M_CREDITCNTPACKING , V_CREDITCNT ( 3 ) | V_CREDITCNTPACKING ( 1 ) ) ; t4_set_reg_field ( adapter , A_SGE_INGRESS_RX_THRESHOLD , V_THRESHOLD_3 ( M_THRESHOLD_3 ) , V_THRESHOLD_3 ( 32U ) ) ; t4_set_reg_field ( adapter , A_SGE_CONTROL2 , V_IDMAARBROUNDROBIN ( 1U ) , V_IDMAARBROUNDROBIN ( 1U ) ) ; t4_tp_wr_bits_indirect ( adapter , A_TP_INGRESS_CONFIG , F_CSUM_HAS_PSEUDO_HDR , 0 ) ; return 0 ; }
Tweak configuration based on system architecture, etc.
Tweak configuration based on system architecture etc .
/*
	 * Fix up various Host-Dependent Parameters like Page Size, Cache
	 * Line Size, etc.  The firmware default is for a 4KB Page Size and
	 * 64B Cache Line Size ...
	 */ /*
	 * Keep the chip default offset to deliver Ingress packets into our
	 * DMA buffers to zero
	 */ /*
	 * Don't include the "IP Pseudo Header" in CPL_RX_PKT checksums: Linux
	 * adds the pseudo header itself.
	 */