Re: [U-Boot] [PATCH v2 2/6] NET: pass source IP address to packet handlers

2011-05-12 Thread Wolfgang Denk
Dear Luca Ceresoli,

In message <1303143594-5345-3-git-send-email-luca.ceres...@comelit.it> you 
wrote:
> This is needed for the upcoming TFTP server implementation.
> 
> This also simplifies PingHandler() and fixes rxhand_f documentation.
> 
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> ---
> Changes in v2:
>  - fixed checkpatch issues.
> 
>  drivers/net/netconsole.c |5 +++--
>  include/net.h|   15 ++-
>  net/bootp.c  |9 ++---
>  net/dns.c|2 +-
>  net/net.c|   30 +-
>  net/nfs.c|2 +-
>  net/rarp.c   |3 ++-
>  net/sntp.c   |3 ++-
>  net/tftp.c   |3 ++-
>  9 files changed, 44 insertions(+), 28 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
HEALTH WARNING: Care Should Be Taken When Lifting This Product, Since
Its Mass, and Thus Its Weight, Is Dependent on Its Velocity  Relative
to the User.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 2/6] NET: pass source IP address to packet handlers

2011-04-19 Thread Luca Ceresoli
Il 19/04/2011 16:15, Detlev Zundel ha scritto:
> Hi Luca,
>
>> This is needed for the upcoming TFTP server implementation.
>>
>> This also simplifies PingHandler() and fixes rxhand_f documentation.
>>
>> Signed-off-by: Luca Ceresoli
>> Cc: Wolfgang Denk
>> ---
>> Changes in v2:
>>   - fixed checkpatch issues.
>>
>>   drivers/net/netconsole.c |5 +++--
>>   include/net.h|   15 ++-
>>   net/bootp.c  |9 ++---
>>   net/dns.c|2 +-
>>   net/net.c|   30 +-
>>   net/nfs.c|2 +-
>>   net/rarp.c   |3 ++-
>>   net/sntp.c   |3 ++-
>>   net/tftp.c   |3 ++-
>>   9 files changed, 44 insertions(+), 28 deletions(-)
>>
> [...]
>
>> diff --git a/net/net.c b/net/net.c
>> index a609632..132f99b 100644
>> --- a/net/net.c
>> +++ b/net/net.c
> [...]
>
>> @@ -1596,11 +1598,12 @@ NetReceive(volatile uchar * inpkt, int len)
>>   *  IP header OK.  Pass the packet to the 
>> current handler.
>>   */
>>  /* XXX point to ip packet */
>> -(*packetHandler)((uchar *)ip, 0, 0, 0);
>> +(*packetHandler)((uchar *)ip, 0, src_ip, 0, 0);
>>  return;
>>  case ICMP_ECHO_REQUEST:
>> -debug("Got ICMP ECHO REQUEST, return %d bytes 
>> \n",
>> -ETHER_HDR_SIZE + len);
>> +debug("Got ICMP ECHO REQUEST, "
>> +  "return %d bytes\n",
>> +  ETHER_HDR_SIZE + len);
>>
>>  memcpy (&et->et_dest[0],&et->et_src[0], 6);
>>  memcpy (&et->et_src[ 0], NetOurEther, 6);
> This second hunk is not related to the patch at hand, so strictly
> speaking it should not be in here.  It's not enough to NAK the patch
> however, just something to look out for in the future.

Yep, but it's needed for checkpatch compliance.

Luca


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 2/6] NET: pass source IP address to packet handlers

2011-04-19 Thread Detlev Zundel
Hi Luca,

> This is needed for the upcoming TFTP server implementation.
>
> This also simplifies PingHandler() and fixes rxhand_f documentation.
>
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> ---
> Changes in v2:
>  - fixed checkpatch issues.
>
>  drivers/net/netconsole.c |5 +++--
>  include/net.h|   15 ++-
>  net/bootp.c  |9 ++---
>  net/dns.c|2 +-
>  net/net.c|   30 +-
>  net/nfs.c|2 +-
>  net/rarp.c   |3 ++-
>  net/sntp.c   |3 ++-
>  net/tftp.c   |3 ++-
>  9 files changed, 44 insertions(+), 28 deletions(-)
>

[...]

> diff --git a/net/net.c b/net/net.c
> index a609632..132f99b 100644
> --- a/net/net.c
> +++ b/net/net.c

[...]

> @@ -1596,11 +1598,12 @@ NetReceive(volatile uchar * inpkt, int len)
>*  IP header OK.  Pass the packet to the 
> current handler.
>*/
>   /* XXX point to ip packet */
> - (*packetHandler)((uchar *)ip, 0, 0, 0);
> + (*packetHandler)((uchar *)ip, 0, src_ip, 0, 0);
>   return;
>   case ICMP_ECHO_REQUEST:
> - debug("Got ICMP ECHO REQUEST, return %d bytes 
> \n",
> - ETHER_HDR_SIZE + len);
> + debug("Got ICMP ECHO REQUEST, "
> +   "return %d bytes\n",
> +   ETHER_HDR_SIZE + len);
>  
>   memcpy (&et->et_dest[0], &et->et_src[0], 6);
>   memcpy (&et->et_src[ 0], NetOurEther, 6);

This second hunk is not related to the patch at hand, so strictly
speaking it should not be in here.  It's not enough to NAK the patch
however, just something to look out for in the future.

Apart from that the changes look good, so

Acked-by: Detlev Zundel 

-- 
LISP has  jokingly been  described as  "the most  intelligent way to  misuse a
computer".  I think that  description a great  compliment because it transmits
the full  flavour of  liberation:  it has assisted a number of our most gifted
fellow humans in thinking previously impossible thoughts. - Edsger W. Dijkstra
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot