From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAeke-0003Yg-EX for qemu-devel@nongnu.org; Thu, 02 Jul 2015 09:42:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAekc-0004Fr-77 for qemu-devel@nongnu.org; Thu, 02 Jul 2015 09:42:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39289) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAekc-0004Fl-1L for qemu-devel@nongnu.org; Thu, 02 Jul 2015 09:42:02 -0400 Date: Thu, 2 Jul 2015 14:04:14 +0100 From: Stefan Hajnoczi Message-ID: <20150702130414.GF21214@stefanha-thinkpad.home> References: <1435717553-36187-1-git-send-email-sfeldma@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="924gEkU1VlJlwnwX" Content-Disposition: inline In-Reply-To: <1435717553-36187-1-git-send-email-sfeldma@gmail.com> Subject: Re: [Qemu-devel] [PATCH v2] rocker: don't queue receive pkts when port is disabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: sfeldma@gmail.com Cc: famz@redhat.com, jiri@resnulli.us, qemu-devel@nongnu.org --924gEkU1VlJlwnwX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 30, 2015 at 07:25:53PM -0700, sfeldma@gmail.com wrote: > From: Scott Feldman >=20 > Commit 6e99c63 ("net/socket: Drop net_socket_can_send") changed the > semantics around .can_receive for sockets to now require the device to > flush queued pkts when transitioning to a .can_receive=3Dtrue state. Roc= ker > device was not flushing the queue on .can_receive=3Dtrue transition, so t= he > receiver was stuck. >=20 > But, turns out we really don't want any queuing at all on the port when t= he > port is disabled, otherwise when the port transitions to enabled, we'd > receive and forward stale pkts that really should have been dropped. So, > let's remove .can_receive so avoid queuing and drop the pkt in .receive if > the port is disabled. >=20 > Signed-off-by: Scott Feldman > --- > v2: return -1 to drop pkt, review comment from famz@redhat.com >=20 > hw/net/rocker/rocker_fp.c | 18 ++++++++++-------- > 1 file changed, 10 insertions(+), 8 deletions(-) Thanks, applied to my net tree: https://github.com/stefanha/qemu/commits/net Stefan --924gEkU1VlJlwnwX Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVlTbNAAoJEJykq7OBq3PInUUH/2bPlP3djghFLV5L7v7MqExt RlH1RzTrmNROOWy0ynGRGACW+SqkxRVJpFybq/v8GG0n+5bdxZIGyxgWOBjKdf7t qeFZ8T+QVznLcm0Hzk6ZihD2X9VLzAa9XZ+e9Ly+xpj+Ty3GVaxkOrL7uyBE2zpX 9+wZKM63baszlFVRXB2Nw0eu6PZGZPUakkJkVD+1U6YR1yuSItenSKlIVtGQGJva LmcHm6BSAL8mKlp1Kxq6JWLtJhpTMuFQe9XEMRvQXtXjhF1OHX2uGgNiqkc5t+1G SW6Cj4IG5OUW6fbn3lGuUafbbuaoYYjBTKs9Ep7+5CcrUWtdkwEj6+Kqkqfw0Vo= =07rO -----END PGP SIGNATURE----- --924gEkU1VlJlwnwX--