From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEMR2-0006M3-JX for qemu-devel@nongnu.org; Mon, 25 Apr 2011 10:06:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QEMR1-0001JZ-J6 for qemu-devel@nongnu.org; Mon, 25 Apr 2011 10:06:44 -0400 Received: from mail-bw0-f45.google.com ([209.85.214.45]:33759) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEMR1-0001JP-D1 for qemu-devel@nongnu.org; Mon, 25 Apr 2011 10:06:43 -0400 Received: by bwz16 with SMTP id 16so1928067bwz.4 for ; Mon, 25 Apr 2011 07:06:42 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1303697435-12542-1-git-send-email-pclouds@gmail.com> From: Nguyen Thai Ngoc Duy Date: Mon, 25 Apr 2011 21:06:10 +0700 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] net: add drop_packets parameter to -net nic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Mark McLoughlin , Anthony Liguori , qemu-devel@nongnu.org 2011/4/25 Stefan Hajnoczi : > 2011/4/25 Nguy=E1=BB=85n Th=C3=A1i Ng=E1=BB=8Dc Duy : >> Dropping packets is sometimes perferred behavior. Add drop_packets >> parameter to NICConf struct and let nic simulation decide how to use >> it. >> >> Only e1000 supports this for now. >> >> Signed-off-by: Nguy=E1=BB=85n Th=C3=A1i Ng=E1=BB=8Dc Duy >> --- >> =C2=A0Documentation is missing, but I'm not even sure if there's any oth= er >> =C2=A0user who finds this useful. > > Can you explain why you are adding this? =C2=A0You are trying to bypass t= he > send queue and drop packets instead? Yes. I have a driver that does connection hand shaking at ethernet level. If anything goes wrong, it disables rx and after a while a new session will be started from higher level. The other end has a timer and keeps sending data until it times out. If this end does not respond properly until the timer is timed out, the other end starts sending "connection request" packets periodically for a new session. When this end enables rx again, in real world it would receive a fresh req packet and send ack. Because of queuing, it receives packets from old session and sends out a series of nack because it expects req packet. Depends on how long rx is disabled until a new session is started, the driver will have to process all queued (invalid) packets and delay session establishment some more. I think dropping packets will improve this situation. But again, this driver is peculiar. I don't think there are many drivers that do dialog-style like this. --=20 Duy