From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40185) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bA9A8-0005gp-SP for qemu-devel@nongnu.org; Tue, 07 Jun 2016 01:02:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bA9A3-0007TL-Sw for qemu-devel@nongnu.org; Tue, 07 Jun 2016 01:02:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bA9A3-0007TE-NH for qemu-devel@nongnu.org; Tue, 07 Jun 2016 01:02:43 -0400 Date: Tue, 7 Jun 2016 10:32:36 +0530 (IST) From: P J P In-Reply-To: Message-ID: References: <1464849867-20184-1-git-send-email-ppandit@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [Qemu-devel] [PATCH] net: mipsnet: check transmit buffer size before sending List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: Peter Maydell , Leon Alrae , Li Qiang , Qemu Developers , Aurelien Jarno +-- On Fri, 3 Jun 2016, P J P wrote --+ | +-- On Thu, 2 Jun 2016, Peter Maydell wrote --+ | | > case MIPSNET_TX_DATA_COUNT: | | > - s->tx_count = (val <= MAX_ETH_FRAME_SIZE) ? val : 0; | | > + s->tx_count = (val < MAX_ETH_FRAME_SIZE) ? val : MAX_ETH_FRAME_SIZE; | | > s->tx_written = 0; | | | | This is a behaviour change -- the register will now read | | back as MAX_ETH_FRAME_SIZE rather than 0 if written with | | an overlarge value. | | IIUC, 's->tx_count' indicates expected packet data length to be processed. | Maybe if this value was zero, packet was not to be sent; not sure. | | | Do we have any documentation on how this (simulated) | | device is supposed to behave in this case? @Jason: @Leon: ping...! -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F