Message ID | 20170918195100.17593-10-andrew.smirnov@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 18 September 2017 at 20:50, Andrey Smirnov <andrew.smirnov@gmail.com> wrote: > Use 'frame_size' instead of 'len' when calling qemu_send_packet(), > failing to do so results in malformed packets send in case when that > packed is fragmented into multiple DMA transactions. > > Cc: Peter Maydell <peter.maydell@linaro.org> > Cc: Jason Wang <jasowang@redhat.com> > Cc: qemu-devel@nongnu.org > Cc: qemu-arm@nongnu.org > Cc: yurovsky@gmail.com > Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> > --- > 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 6045ffe673..c45b9648d9 100644 > --- a/hw/net/imx_fec.c > +++ b/hw/net/imx_fec.c > @@ -532,7 +532,7 @@ static void imx_enet_do_tx(IMXFECState *s, uint32_t index) > } > } > /* 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; > if (bd.option & ENET_BD_TX_INT) { Reviewed-by: Peter Maydell <peter.maydell@linaro.org> thanks -- PMM
diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c index 6045ffe673..c45b9648d9 100644 --- a/hw/net/imx_fec.c +++ b/hw/net/imx_fec.c @@ -532,7 +532,7 @@ static void imx_enet_do_tx(IMXFECState *s, uint32_t index) } } /* 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; if (bd.option & ENET_BD_TX_INT) {
Use 'frame_size' instead of 'len' when calling qemu_send_packet(), failing to do so results in malformed packets send in case when that packed is fragmented into multiple DMA transactions. Cc: Peter Maydell <peter.maydell@linaro.org> Cc: Jason Wang <jasowang@redhat.com> Cc: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Cc: yurovsky@gmail.com Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> --- hw/net/imx_fec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)