[U-Boot] [PATCH 2/2] net: bootp: Add BOOTP specific config for timeout value

MESSIER, ALEXANDRE amessier at Tycoint.com
Fri Jan 22 21:09:27 CET 2016


> -----Original Message-----
> From: Joe Hershberger [mailto:joe.hershberger at gmail.com]
> Sent: January-22-16 2:36 PM
> To: amessier.tyco at gmail.com
> Cc: u-boot; Joe Hershberger; MESSIER, ALEXANDRE
> Subject: Re: [U-Boot] [PATCH 2/2] net: bootp: Add BOOTP specific config for
> timeout value
>
> On Fri, Jan 22, 2016 at 1:22 PM,  <amessier.tyco at gmail.com> wrote:
> > From: Alexandre Messier <amessier at tycoint.com>
> >
> > There is currently one config option (CONFIG_NET_RETRY_COUNT) that
> > is available to tune the retries of the network stack.
> > Unfortunately, it is global to all protocols, and the value is
> > interpreted differently in all of them.
> >
> > Add a new config option that sets directly the timeout delay used by
> > BOOTP, instead of it being derived from CONFIG_NET_RETRY_COUNT.
> >
> > Signed-off-by: Alexandre Messier <amessier at tycoint.com>
> > ---
> >  README      | 6 ++++++
> >  net/bootp.c | 4 ++++
> >  2 files changed, 10 insertions(+)
> >
> > diff --git a/README b/README
> > index 05966ab..9703f83 100644
> > --- a/README
> > +++ b/README
> > @@ -2191,6 +2191,7 @@ CBFS (Coreboot Filesystem) support
> >                 CONFIG_BOOTP_TIMEOFFSET
> >                 CONFIG_BOOTP_VENDOREX
> >                 CONFIG_BOOTP_MAY_FAIL
> > +               CONFIG_BOOTP_TIMEOUT_MS
> >                 CONFIG_BOOTP_DHCPREQ_BOOTFILE
> >
> >                 CONFIG_BOOTP_SERVERIP - TFTP server will be the serverip
> > @@ -2232,6 +2233,11 @@ CBFS (Coreboot Filesystem) support
> >                 the DHCP timeout and retry process takes a longer than
> >                 this delay.
> >
> > +               CONFIG_BOOTP_TIMEOUT_MS - Explicitly configure the BOOTP
> > +               timeout in milliseconds, instead of basing it on the configured
> > +               number of retries, which is either CONFIG_NET_RETRY_COUNT or
> > +               the BOOTP default value of 5 retries.
>
> Please add new config options to the Kconfig system.
OK will do.
>
> > +
> >                 CONFIG_BOOTP_DHCPREQ_BOOTFILE - Set the bootfile name in
> >                 DHCPREQUEST packet, in addition to DHCPDISCOVER. This may be
> >                 needed by some DHCP servers in specific cases.
> > diff --git a/net/bootp.c b/net/bootp.c
> > index 8da94cf..edb0b39 100644
> > --- a/net/bootp.c
> > +++ b/net/bootp.c
> > @@ -33,12 +33,16 @@
> >   * execute that many retries, and keep sending retry packets until that
> time
> >   * is reached.
> >   */
> > +#ifndef CONFIG_BOOTP_TIMEOUT_MS
> >  #ifndef CONFIG_NET_RETRY_COUNT
> >  # define TIMEOUT_COUNT 5               /* # of timeouts before giving up */
> >  #else
> >  # define TIMEOUT_COUNT (CONFIG_NET_RETRY_COUNT)
> >  #endif
> >  #define TIMEOUT_MS     ((3 + (TIMEOUT_COUNT * 5)) * 1000)
> > +#else
> > +#define TIMEOUT_MS     CONFIG_BOOTP_TIMEOUT_MS
> > +#endif
> >
> >  #define PORT_BOOTPS    67              /* BOOTP server UDP port */
> >  #define PORT_BOOTPC    68              /* BOOTP client UDP port */
> > --
> > 1.8.3.1
> >
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot at lists.denx.de
> > https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__lists.denx.de_mailman_listinfo_u-2Dboot&d=CwIBaQ&c=0YGvTs3tT-
> VMy8_v51yLDw&r=adEdfGeVvAp5D3jUKeOClnVoZZOSb93LtGg4Qgmpmjw&
> m=6vGNQE7IhCTnhn7IpITPEZMxcbzm9xD4_yl1dmVGsI0&s=M78bwo2zLUHN
> Avjy5n53KfWdSKM8CRGsFU1SSog0LKw&e=

________________________________

This e-mail contains privileged and confidential information intended for the use of the addressees named above. If you are not the intended recipient of this e-mail, you are hereby notified that you must not disseminate, copy or take any action in respect of any information contained in it. If you have received this e-mail in error, please notify the sender immediately by e-mail and immediately destroy this e-mail and its attachments.


More information about the U-Boot mailing list