[U-Boot] [PATCH v8 1/3] Adding TCP and wget into u-boot

Duncan Hare dh at synoia.com
Sun Mar 18 23:10:46 UTC 2018


On Sat, 17 Mar 2018 16:36:14 +0000
Calvin Johnson <calvin.johnson at 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.


More information about the U-Boot mailing list