On Mon, Feb 10, 2025 at 06:50:37AM +0100, Michal Swiatkowski wrote:
> On Fri, Feb 07, 2025 at 02:57:10PM +0000, Simon Horman wrote:
> > On Fri, Feb 07, 2025 at 11:43:42AM +0100, Michal Swiatkowski wrote:

...

> > > +/**
> > > + * ixgbe_handle_mdd_event - handle mdd event
> > > + * @adapter: structure containing ring specific data
> > > + * @tx_ring: tx descriptor ring to handle
> > > + *
> > > + * Reset VF driver if malicious vf detected or
> > > + * illegal packet in an any queue detected.
> > > + */
> > > +static void ixgbe_handle_mdd_event(struct ixgbe_adapter *adapter,
> > > +                            struct ixgbe_ring *tx_ring)
> > > +{
> > > + u16 vf, q;
> > > +
> > > + if (adapter->vfinfo && ixgbe_check_mdd_event(adapter)) {
> > > +         /* vf mdd info and malicious vf detected */
> > > +         if (!ixgbe_get_vf_idx(adapter, tx_ring->queue_index, &vf))
> > > +                 ixgbe_vf_handle_tx_hang(adapter, vf);
> > > + } else {
> > > +         /* malicious vf not detected */
> > > +         for (q = 0; q < IXGBE_MAX_TX_QUEUES; q++) {
> > > +                 if (ixgbe_check_illegal_queue(adapter, q) &&
> > > +                     !ixgbe_get_vf_idx(adapter, q, &vf))
> > > +                         /* illegal queue detected */
> > > +                         ixgbe_vf_handle_tx_hang(adapter, vf);
> > 
> > It looks like ixgbe_vf_handle_tx_hang() will run for each illegal queue.
> > Could that be more than once for a given vf? If so, is that desirable?
> > 
> 
> Yes, it will be called for each hanged queue of a given VF. I assume
> this is fine, as the function is counting the hang events, not resetting
> VF.

Thanks for the clarification, much appreciated.

I missed that this is just accounting and agree this seems fine.

...

Reply via email to