Subject: RE: [PATCH net-next v2 2/3] net: txgbe: support Flow Director perfect filters

From: Jiawen Wu <[email-masked]>
Date: Tue, 18 Jun 2024 16:55:25 +0800

> > +	/* determine if we need to drop or route the packet */
> > +	if (fsp->ring_cookie == RX_CLS_FLOW_DISC)
> > +		input->action = TXGBE_RDB_FDIR_DROP_QUEUE;
> > +	else
> > +		input->action = fsp->ring_cookie;
> > +
> > +	spin_lock(&txgbe->fdir_perfect_lock);
> 
>  ethtool ops is already protected with rtnl_lock , which can be confirmed by calling ASSERT_RTNL().
>  Why do we need a spin_lock here ?

When driver performs reset function, it needs to restore FDIR configuration, there is no rtnl_lock.