7907 i40e prevents fast reboot

Review Request #382 - Created Feb. 23, 2017 and updated

Information
Paul Winder
illumos-gate
Reviewers
general

The quiesce entry point in the driver is currently ddi_quiesce_not_supported(). This puts in place a quiesce routine to disable the rings and interrupts, disables the lan hmc and clears hardware registers.

This code has been in use local for quite some time.

Tested by using both fast reboot and reset reboot whilst there has been load on the driver.

Issues

  • 2
  • 0
  • 0
  • 2
Description From Last Updated
can you replace spaces with tab here, next line and 346? Toomas Soome Toomas Soome
Is it safe for us to not properly shut down the adminq on the card? Robert Mustacchi Robert Mustacchi
Paul Winder
Review request changed
Paul Winder

   
usr/src/uts/common/io/i40e/i40e_sw.h (Diff revision 2)
 
 

This was added by an earlier commit as change to a core file, i40e_admimq_cmd.. Moved here to avoid changes to core files.

Toomas Soome

   
usr/src/uts/common/io/i40e/i40e_sw.h (Diff revision 2)
 
 

can you replace spaces with tab here, next line and 346?

  1. Sure

Robert Mustacchi

Do we need to issue a general PF reset as part of quiesce?

  1. It was a belt-and-braces approach. I had without initially and it seemed to have no effect, and I noticed ixgbe quiesce does something similar, so I thought it would be a good idea.

usr/src/uts/common/io/i40e/i40e_main.c (Diff revision 2)
 
 
Is it safe for us to not properly shut down the adminq on the card?
  1. I wanted to do this but the core function to do this acquires locks which is a no-no for the quiesce. I have seen no ill effects from it, but instead I could do (and have tested) this:

    /*
     * Taken from the common code to shutdown an adminq ring
     */
    static void
    i40e_stop_adminq_ring(i40e_hw_t *hw, struct i40e_adminq_ring *q)
    {
            I40E_WRITE_REG(hw, q->head, 0);
            I40E_WRITE_REG(hw, q->tail, 0);
            I40E_WRITE_REG(hw, q->len, 0);
            I40E_WRITE_REG(hw, q->bal, 0);
            I40E_WRITE_REG(hw, q->bah, 0);
    }
    

    called in i40e_quiesce:

            i40e_shutdown_rx_rings(i40e);
            i40e_shutdown_tx_rings(i40e);
    
            /*
             * Stop the adminq send and receive 
    
             */
            i40e_stop_adminq_ring(hw, &hw->aq.asq);
            i40e_stop_adminq_ring(hw, &hw->aq.arq);
    
            i40e_intr_chip_fini(i40e);
    
            (void) i40e_shutdown_lan_hmc(hw);
    

    The call to i40e_intr_chip_fini() will ensure the interrupts for adminq are disabled.

Loading...