[U-Boot] [PATCH v2 02/11] x86: Move ipchecksum into common area and rename it
Simon Glass
sjg at chromium.org
Sun Jan 11 04:33:37 CET 2015
Hi Bin,
On 10 January 2015 at 19:44, Bin Meng <bmeng.cn at gmail.com> wrote:
>
> Hi Simon,
>
> On Sun, Jan 11, 2015 at 1:20 AM, Simon Glass <sjg at chromium.org> wrote:
> > Hi Bin,
> >
> > On 10 January 2015 at 08:47, Bin Meng <bmeng.cn at gmail.com> wrote:
> >> Hi Simon,
> >>
> >> On Fri, Jan 9, 2015 at 11:30 AM, Simon Glass <sjg at chromium.org> wrote:
> >>> The existing IP checksum function is only accessible to the 'coreboot' cpu.
> >>> Move it into the common area and rename it slightly to remove the
> >>> abbreviations.
> >>>
> >>> Signed-off-by: Simon Glass <sjg at chromium.org>
> >>> ---
> >>>
> >>> Changes in v2:
> >>> - Refactor IP checksum patches
> >>>
> >>> arch/x86/cpu/Makefile | 1 +
> >>> arch/x86/cpu/coreboot/Makefile | 1 -
> >>> arch/x86/cpu/coreboot/ipchecksum.c | 55 -------------------------
> >>> arch/x86/cpu/coreboot/tables.c | 8 ++--
> >>> arch/x86/cpu/ip_checksum.c | 34 +++++++++++++++
> >>
> >> What about the namings we discussed in the v1 patch thread? ip_xxx
> >> indicates ip protocol, but acutally they are not.
> >
> > Is it not? This is not actually CMOS-specific - e.g. it is used by
> > Coreboot to send data through to U-Boot in the tables it provides.
> >
> > I thought it was an IP checksum...
> >
>
> OK, so you mean coreboot is using the same IP checksum algorithm to
> generate checksums for coreboot tables to be passed to U-Boot. If that
> is the case, I think we should put the these files to u-boot/net or
> u-boot/lib. Are there existing codes that we can reuse?
NetCkSum() is similar but does not need to worry about an odd length.
So I doubt I can use that.
Regards,
Simon
More information about the U-Boot
mailing list