Re: [PATCH net-next v7 3/7] net: stmmac: refactor FPE verification process

From: Vladimir Oltean
Date: Wed Sep 04 2024 - 09:02:56 EST


On Wed, Sep 04, 2024 at 05:21:18PM +0800, Furong Xu wrote:
> +static void stmmac_fpe_verify_timer_arm(struct stmmac_fpe_cfg *fpe_cfg)
> +{
> + struct ethtool_mm_state *state = &fpe_cfg->state;
> +
> + if (state->pmac_enabled && state->tx_enabled &&
> + state->verify_enabled &&
> + state->verify_status != ETHTOOL_MM_VERIFY_STATUS_FAILED &&
> + state->verify_status != ETHTOOL_MM_VERIFY_STATUS_SUCCEEDED) {
> + /* give caller a chance to release the spinlock */
> + mod_timer(&fpe_cfg->verify_timer, jiffies + 1);
> + }
> +}

Why do you need to give the caller a chance to release the spinlock?
Isn't the timer code blocked anyway, as stmmac_fpe_verify_timer_arm()
runs under irqsoff?