[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] hw/net/opencores_eth: Allocating Large sized
From: |
Max Filippov |
Subject: |
Re: [Qemu-devel] [PATCH v2] hw/net/opencores_eth: Allocating Large sized arrays to heap |
Date: |
Wed, 27 Apr 2016 06:44:03 +0300 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hi Wei,
On Wed, Apr 27, 2016 at 03:27:47AM +0000, Wei, Jiangang wrote:
> On Wed, 2016-04-27 at 10:07 +0800, Zhou Jie wrote:
> > static void open_eth_start_xmit(OpenEthState *s, desc *tx)
> > {
> > - uint8_t buf[65536];
> > + uint8_t *buf = NULL;
> > + uint8_t buffer[0x600];
> Hi,
>
> I'm curious about 0x600.
> How do you determine this size?
> IMO, Max's suggestion looks more reasonable.
> (1536 bytes, maximal frame length when HUGEN bit is not set in MODER)
This is the same value. Opencores 10/100 ethernet spec uses both
decimal and hexadecimal notation.
--
Thanks.
-- Max