From: Steven Smith Subject: Re: [PATCH ixgbe] Fix VMDq operation when maxcpus=1 Date: Wed, 18 Feb 2009 14:10:32 +0000 Message-ID: <20090218141032.GA4936@weybridge.uk.xensource.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1074867572==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Mitch Williams Cc: Steven Smith , "xen-devel@lists.xensource.com" , "joserenato.santos@hp.com" List-Id: xen-devel@lists.xenproject.org --===============1074867572== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jI8keyz6grp/JLjh" Content-Disposition: inline --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Applied, thanks. Steven. > Renato reported a crash in ixgbe when the Dom0 kernel was booted with > maxcpus=3D1. >=20 > Added checks to the single-vector code path to make sure we don't call > any vmq functions before the ring is activated. >=20 > Signed-off-by: Mitch Williams >=20 > (Patch is attached as well as inline due to previous issue with > mangled patches.) >=20 > diff -r 9681e69b222b drivers/net/ixgbe/ixgbe_main.c > --- a/drivers/net/ixgbe/ixgbe_main.c Thu Feb 12 17:38:15 2009 +0000 > +++ b/drivers/net/ixgbe/ixgbe_main.c Tue Feb 17 14:06:44 2009 -0800 > @@ -541,6 +541,11 @@ >=20 > i =3D rx_ring->next_to_use; > bi =3D &rx_ring->rx_buffer_info[i]; > +#ifdef CONFIG_XEN_NETDEV2_VMQ > + if ((adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) && > + (!rx_ring->active)) > + return; > +#endif >=20 > while (cleaned_count--) { > rx_desc =3D IXGBE_RX_DESC_ADV(*rx_ring, i); > @@ -1123,7 +1128,13 @@ >=20 > /* ERR_MASK will only have valid bits if EOP set */ > if (unlikely(staterr & IXGBE_RXDADV_ERR_FRAME_ERR_MASK)) { > - dev_kfree_skb_irq(skb); > +#ifdef CONFIG_XEN_NETDEV2_VMQ > + if ((adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) && > + rx_ring->queue_index) > + vmq_free_skb(skb, rx_ring->queue_index); > + else > +#endif > + dev_kfree_skb_irq(skb); > goto next_desc; > } >=20 > @@ -1600,7 +1611,8 @@ > ixgbe_update_rx_dca(adapter, rx_ring); > #endif >=20 > - ixgbe_clean_rx_irq(adapter, rx_ring, &work_done, budget); > + if (rx_ring->active) > + ixgbe_clean_rx_irq(adapter, rx_ring, &work_done, budget); >=20 > /* If all Rx work done, exit the polling mode */ > if ((work_done =3D=3D 0) || !netif_running(adapter->netdev)) { > @@ -1644,7 +1656,9 @@ > if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) > ixgbe_update_rx_dca(adapter, rx_ring); > #endif > - ixgbe_clean_rx_irq(adapter, rx_ring, &work_done, budget); > + if (rx_ring->active) > + ixgbe_clean_rx_irq(adapter, rx_ring, > + &work_done, budget); > enable_mask |=3D rx_ring->v_idx; > r_idx =3D find_next_bit(q_vector->rxr_idx, adapter->num_rx_queues, > r_idx + 1); --jI8keyz6grp/JLjh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFJnBbYvAgSWYI3DVMRAt6cAKC8GwxcP+yig7jr4tOuiDzWR8p7pACgxi8f DSi2CgNDsw161l+F3cl3LBE= =o4QT -----END PGP SIGNATURE----- --jI8keyz6grp/JLjh-- --===============1074867572== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1074867572==--