[rtems commit] Added in_cksum_sparc. h to optimize IP checksum calculations for SPARC.

Ralf Corsepius ralf.corsepius at rtems.org
Thu Jun 20 09:14:53 UTC 2013


On 06/19/2013 03:16 PM, Joel Sherrill wrote:
> Module:    rtems
> Branch:    master
> Commit:    1f4ee306d3ab326a84d0bf74ad6afdedaaa435f8
> Changeset: http://git.rtems.org/rtems/commit/?id=1f4ee306d3ab326a84d0bf74ad6afdedaaa435f8
>
> Author:    Jiri Gaisler <jiri at gaisler.se>
> Date:      Sun Jun 16 00:13:41 2013 +0200
>
> Added in_cksum_sparc.h to optimize IP checksum calculations for SPARC.
>
> ---
>
>   cpukit/libnetworking/netinet/in_cksum.c       |    4 +
>   cpukit/libnetworking/netinet/in_cksum_sparc.h |  308 +++++++++++++++++++++++++
>   2 files changed, 312 insertions(+), 0 deletions(-)
>
> diff --git a/cpukit/libnetworking/netinet/in_cksum.c b/cpukit/libnetworking/netinet/in_cksum.c
> index ec7e49c..ff25ad6 100644
> --- a/cpukit/libnetworking/netinet/in_cksum.c
> +++ b/cpukit/libnetworking/netinet/in_cksum.c
> @@ -61,6 +61,10 @@
>
>   #include "in_cksum_nios2.h"
>
> +#elif (defined(__GNUC__) && defined(__sparc))
> +
> +#include "in_cksum_sparc.h"
> +
>   #else

I am having several issues with this patch:

a) Has this code been tested with/checked against sparc64-rtems4.11 
toolchains?

I haven't tried to check which code paths are being used with the 
sparc64 and hardly won't have a possibility to check in near future, so 
this question could be a red herring.


b)  This code should use __sparc__ instead of __sparc.

__sparc is a pre-POSIX anachronism, is still supported by GCC but 
actually should not be used anymore.

Ralf





More information about the devel mailing list