From patchwork Mon Sep 26 08:59:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 675045 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sjJXn2p5tz9s2Q for ; Mon, 26 Sep 2016 19:27:53 +1000 (AEST) Received: from localhost ([::1]:42715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boSCU-0000Om-RK for incoming@patchwork.ozlabs.org; Mon, 26 Sep 2016 05:27:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boRmi-0008FO-8m for qemu-devel@nongnu.org; Mon, 26 Sep 2016 05:01:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1boRmc-0000TT-NQ for qemu-devel@nongnu.org; Mon, 26 Sep 2016 05:01:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47390) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boRmc-0000TM-Go for qemu-devel@nongnu.org; Mon, 26 Sep 2016 05:01:06 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D0D35C057FA7; Mon, 26 Sep 2016 09:01:05 +0000 (UTC) Received: from jason-ThinkPad-T450s.redhat.com (vpn1-6-89.pek2.redhat.com [10.72.6.89]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8Q8xaon023616; Mon, 26 Sep 2016 05:01:03 -0400 From: Jason Wang To: peter.maydell@linaro.org Date: Mon, 26 Sep 2016 16:59:35 +0800 Message-Id: <1474880375-22946-28-git-send-email-jasowang@redhat.com> In-Reply-To: <1474880375-22946-1-git-send-email-jasowang@redhat.com> References: <1474880375-22946-1-git-send-email-jasowang@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 26 Sep 2016 09:01:05 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 27/27] imx_fec: fix error in qemu_send_packet argument X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Jason Wang , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Paolo Bonzini This uses the wrong frame size for packets composed of multiple descriptors. Signed-off-by: Paolo Bonzini Signed-off-by: Jason Wang --- hw/net/imx_fec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c index 1c415ab..50c7564 100644 --- a/hw/net/imx_fec.c +++ b/hw/net/imx_fec.c @@ -429,7 +429,7 @@ static void imx_fec_do_tx(IMXFECState *s) frame_size += len; if (bd.flags & ENET_BD_L) { /* Last buffer in frame. */ - qemu_send_packet(qemu_get_queue(s->nic), frame, len); + qemu_send_packet(qemu_get_queue(s->nic), frame, frame_size); ptr = frame; frame_size = 0; s->regs[ENET_EIR] |= ENET_INT_TXF;