public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Duncan Hare <dh@synoia.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v8 1/3] Adding TCP and wget into u-boot
Date: Sun, 18 Mar 2018 16:10:46 -0700	[thread overview]
Message-ID: <20180318161046.5ed226cc@raspberrypi> (raw)
In-Reply-To: <DB6PR04MB3128FD02A9CDDDDADB1EF9BD93D60@DB6PR04MB3128.eurprd04.prod.outlook.com>

On Sat, 17 Mar 2018 16:36:14 +0000
Calvin Johnson <calvin.johnson@nxp.com> wrote:

> It would be good to have this cosmetic change into a separate patch. 

Ok. But at this stage I'm at the "Forgive me Lord for I know not what
I do" 

> IMO, better place for this definition and associated explanation
> would be above the comment describing PKTBUFSRX, i.e after
> immediately after below line. #define DEBUG_INT_STATE 0       /*
> Internal network state changes */

Done 

> >  #define IPPROTO_ICMP	 1	/* Internet Control Message
> > Protocol	*/ #define IPPROTO_UDP	17	/* User
> > Datagram Protocol		*/ +#define IPPROTO_TCP
> > 6	/* Transmission Control Protocol        */  
> 
> Better to sort IPPROTO in ascending order

But, but protocol alphabetical order is so much prettier!! (Done in
numerical order). 

> >  /* Set IP header */
> > -void net_set_ip_header(uchar *pkt, struct in_addr dest, struct
> > in_addr source); +void net_set_ip_header(uchar *pkt, struct in_addr
> > dest, struct in_addr source,
> > +		       u16  pkt_len, u8 prot);
> >  void net_set_udp_header(uchar *pkt, struct in_addr dest, int dport,
> > -				int sport, int len);
> > -
> > +			int sport, int len);  
> 
Why do you need this change in the set_udp_header? 

This is a shim to bridge between the original udp to ip procedure call
and the extra parameters in the enhanced ip procedure call to the ip
layer for TCP.

The original udp call is unchanged, because I did not want a
change to a procedure call to ripple through many applications.

  reply	other threads:[~2018-03-18 23:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-08  4:43 [U-Boot] [PATCH v8 1/3] Adding TCP and wget into u-boot DH at synoia.com
2018-03-08  4:43 ` [U-Boot] [PATCH v8 2/3] Adding TCP DH at synoia.com
2018-03-08 18:53   ` Joe Hershberger
2018-03-08  4:43 ` [U-Boot] [PATCH v8 3/3] Adding wget DH at synoia.com
2018-03-08 18:52 ` [U-Boot] [PATCH v8 1/3] Adding TCP and wget into u-boot Joe Hershberger
2018-03-17 13:55   ` Calvin Johnson
2018-03-17 16:36 ` Calvin Johnson
2018-03-18 23:10   ` Duncan Hare [this message]
2018-03-19  9:53     ` Calvin Johnson
2018-03-19 21:11       ` Duncan Hare

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=20180318161046.5ed226cc@raspberrypi \
    --to=dh@synoia.com \
    --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