All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ppc4xx/POST: Change ethernet test loop count from 192 to 16
Date: Fri, 26 Nov 2010 16:27:25 +0100	[thread overview]
Message-ID: <201011261627.25617.sr@denx.de> (raw)
In-Reply-To: <20101126151323.BC6F811D94F1@gemini.denx.de>

Hi Wolfgang,

On Friday 26 November 2010 16:13:23 Wolfgang Denk wrote:
> > -#define MIN_PACKET_LENGTH	64
> > -#define MAX_PACKET_LENGTH	256
> > +#define MIN_PACKET_LENGTH	256
> > +#define MAX_PACKET_LENGTH	(256 + 16)
> 
> Maybe it does indeed make sense to test a wider range of package
> sizes.  Actually I'd even like to see longer packets tested as well.
> 
> How about:
> 
> 	#define MIN_PACKET_LENGTH    64
> 	#define MAX_PACKET_LENGTH    1518
> 
> and changing the
> 
> 	for (l = MIN_PACKET_LENGTH; l <= MAX_PACKET_LENGTH; l++) {
> into
> 	for (l = MIN_PACKET_LENGTH; l <= MAX_PACKET_LENGTH; l+=91) {
> 
> Then you still have 16 tests, but with a much wider range of packet
> sizes (64...1429).

I don't like this "l+=91" statement. How about making it a bit more flexible. 
Something like this:

#define MIN_PACKET_LENGTH		64
#define MAX_PACKET_LENGTH		1518
#ifndef CONFIG_SYS_POST_ETH_LOOPS
#define CONFIG_SYS_POST_ETH_LOOPS	10
#endif
#define PACKET_INCR	((MAX_PACKET_LENGTH - MIN_PACKET_LENGTH) / \
			 CONFIG_SYS_POST_ETH_LOOPS)

and

for (l = MIN_PACKET_LENGTH; l <= MAX_PACKET_LENGTH; l += PACKET_INCR) {


This way, boards could also override the default loop counter. I switched to a 
default of 10 this time. This still seems enough for me. Especially with the 
longer frames now.

What do you think?

Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office@denx.de

  reply	other threads:[~2010-11-26 15:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-26 14:44 [U-Boot] [PATCH] ppc4xx/POST: Change ethernet test loop count from 192 to 16 Stefan Roese
2010-11-26 15:13 ` Wolfgang Denk
2010-11-26 15:27   ` Stefan Roese [this message]
2010-11-26 15:37     ` Wolfgang Denk

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=201011261627.25617.sr@denx.de \
    --to=sr@denx.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.