src/dpdk/drivers/net/txgbe/base/txgbe_hw.c
int txgbe_disable_sec_tx_path(struct txgbe_hw *hw)
{
#define TXGBE_MAX_SECTX_POLL 40

	int i;
	u32 sectxreg;

	sectxreg = rd32(hw, TXGBE_SECTXCTL);
	sectxreg |= TXGBE_SECTXCTL_XDSA;
	wr32(hw, TXGBE_SECTXCTL, sectxreg);
	for (i = 0; i < TXGBE_MAX_SECTX_POLL; i++) {
		sectxreg = rd32(hw, TXGBE_SECTXSTAT);
		if (sectxreg & TXGBE_SECTXSTAT_RDY)
			break;
		/* Use interrupt-safe sleep just in case */
		usec_delay(1000);
	}

	/* For informational purposes only */
	if (i >= TXGBE_MAX_SECTX_POLL)
		PMD_DRV_LOG(DEBUG, "Tx unit being enabled before security "
			 "path fully disabled.  Continuing with init.");

	return 0;
}
/**
 *  txgbe_disable_sec_tx_path - Stops the transmit data path
 *  @hw: pointer to hardware structure
 *
 *  Stops the transmit data path and waits for the HW to internally empty
 *  the Tx security block
 **/
Stops the transmit data path
@hw: pointer to hardware structure

Stops the transmit data path and waits for the HW to internally empty
the Tx security block
Stops the transmit data path @hw : pointer to hardware structure Stops the transmit data path and waits for the HW to internally empty the Tx security block
int txgbe_disable_sec_tx_path(struct txgbe_hw *hw)
{
#define TXGBE_MAX_SECTX_POLL 40
	int i;
	u32 sectxreg;
	sectxreg = rd32(hw, TXGBE_SECTXCTL);
	sectxreg |= TXGBE_SECTXCTL_XDSA;
	wr32(hw, TXGBE_SECTXCTL, sectxreg);
	for (i = 0; i < TXGBE_MAX_SECTX_POLL; i++) {
		sectxreg = rd32(hw, TXGBE_SECTXSTAT);
		if (sectxreg & TXGBE_SECTXSTAT_RDY)
			break;
		usec_delay(1000);
	}
	if (i >= TXGBE_MAX_SECTX_POLL)
		PMD_DRV_LOG(DEBUG, "Tx unit being enabled before security "
			 "path fully disabled.  Continuing with init.");
	return 0;
}
int txgbe_disable_sec_tx_path ( struct txgbe_hw * hw ) { #define TXGBE_MAX_SECTX_POLL  40 int i ; u32 sectxreg ; sectxreg = rd32 ( hw , TXGBE_SECTXCTL ) ; sectxreg |= TXGBE_SECTXCTL_XDSA ; wr32 ( hw , TXGBE_SECTXCTL , sectxreg ) ; for ( i = 0 ; i < TXGBE_MAX_SECTX_POLL ; i ++ ) { sectxreg = rd32 ( hw , TXGBE_SECTXSTAT ) ; if ( sectxreg & TXGBE_SECTXSTAT_RDY ) break ; usec_delay ( 1000 ) ; } if ( i >= TXGBE_MAX_SECTX_POLL ) PMD_DRV_LOG ( DEBUG , " " " " ) ; return 0 ; }
txgbe_disable_sec_tx_path - Stops the transmit data path
  @hw: pointer to hardware structure
txgbe_disable_sec_tx_path - Stops the transmit data path @hw : pointer to hardware structure
/* Use interrupt-safe sleep just in case */ /* For informational purposes only */