public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Thomas Chou <thomas@wytron.com.tw>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] nios2: nios2-generic: do not allocate rx buf in net.c
Date: Fri, 6 Nov 2015 07:47:13 +0800	[thread overview]
Message-ID: <563BEA81.4070305@wytron.com.tw> (raw)
In-Reply-To: <201511051716.11450.marex@denx.de>

Hi Marek,

On 2015?11?06? 00:16, Marek Vasut wrote:
> On Thursday, November 05, 2015 at 09:42:43 AM, Thomas Chou wrote:
>> Do not allocate rx buf in net.c, because altera_tse allocates
>> its own rx buf in driver. This can save 6KB memory.
>>
>> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
>
> Shouldn't we instead fix the altera driver to use the pre-allocated
> buffer ?

It should not. The drivers and devices are dynamically binding in driver 
model. The buffers used by devices should be allocated per device. Eg, 
there may be multiple ethernet devices and they should not use the same 
pre-allocated rx bufs.

Best regards,
Thomas

  reply	other threads:[~2015-11-05 23:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-05  8:42 [U-Boot] [PATCH] nios2: nios2-generic: do not allocate rx buf in net.c Thomas Chou
2015-11-05 16:16 ` Marek Vasut
2015-11-05 23:47   ` Thomas Chou [this message]
2015-11-06  1:40     ` Marek Vasut
2015-11-06  4:52       ` Thomas Chou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=563BEA81.4070305@wytron.com.tw \
    --to=thomas@wytron.com.tw \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox