aboutsummaryrefslogtreecommitdiff
path: root/helper/chksum.c
AgeCommit message (Collapse)Author
2023-09-01helper: update copyright formatMatias Elo
Update all helper files to use the new shorter copyright format: /* SPDX-License-Identifier: BSD-3-Clause * Copyright (c) <YEAR> <COPYRIGHT HOLDER> */ Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-03-02api: remove deprecated odp.h headerMatias Elo
Remove deprecated odp.h header file which has been replaced by odp_api.h. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2020-11-03helper: checksum: point header field with unaligned typePetri Savolainen
GCC9 warns about pointing to a field of a packed structure with a regular (uint16_t) pointer type. Use an unaligned type (odp_una16_t) instead to fix those warnings. GCC warning: taking address of packed member of struct may result in an unaligned pointer value [-Waddress-of-packed-member] Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-09-27linux-gen: include config.h header in install directoryMatias Elo
Previously, config.h header was not included in install dir. This caused a compilation failure when an application tried to include ODP helper headers. config.h has been moved to include/odp subdirectory to avoid naming conflicts and unnecessary includes have been removed. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reported-by: Mikko Parpala <mikko.parpala@nokia.com>
2019-07-01helper: fix variable may be used uninitialized warningsPetri Savolainen
Fix compiler warning: "X may be used uninitialized in this function". These warnings were found when building with link time optimization (-flto flag). Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
2018-08-22helper: add SCTP handling functionsDmitry Eremin-Solenikov
Add functions to set and verify SCTP packet checksum. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-02-26update Linaro Copyrights to 2018 yearMaxim Uvarov
Using simple commands: find . -not -path .git -type f -exec \ sed -i -E 's/ (201[0-9]), Linaro/ \1-2018, Linaro/g' {} + find . -not -path .git -type f -exec \ sed -i -E 's/ (201[0-9])(-201[0-9]), Linaro/ \1-2018, Linaro/g' {} + Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
2017-08-25helper: use config.h headerDmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-04-25bug: linux-generic: add syntax to allow newer clang to compile odpBill Fischofer
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2942 by adding casts needed to avoid compilation failures when using clang 4.0.0 included in Ubuntu 17.04, which is stricter than clang 3.8.1 which is in Ubuntu 16.10. Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Brian Brooks <brian.brooks@arm.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-01-27helper: fix compilation with warningsMaxim Uvarov
After turning on lost CFLAGS for checking errors, following things needs to be corrected to make code compile. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Mike Holmes <mike.holmes@linaro.org>
2016-08-02helper: fixing helper prefix in chksum.cKhalil Blaiech
Add odph_ prefix to udp_or_tcp_hdr_t and rename structure odph_l4_hdr_t. Signed-off-by: Khalil Blaiech <kblaiech@mellanox.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-07-05linux-gen: std_types: remove extra c headersPetri Savolainen
Removed C header includes which are not needed for API definitions. ODP API depends on uint64_t, etc types in stdint.h, but not other C headers. As an exception, stdbool.h remains since 'true' and 'false' definitions may be used with odp_bool_t. It could be also removed later since true/false are not part of the API (where as uint64_t, etc types). Application needs to include other C library headers directly. ODP API does not specify which headers are included by odp_api.h. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-04-29helper: add a more complete and correct checksum implementationBarry Spinney
This patch adds a file called chksum.c which implements a complete TCP/UDP over either IPv4 or IPV6 checksum generation / verification capability. In addition it can deal with any form of packet segmentation including tiny segments, segments not aligned to a 2 byte boundary, etc. Signed-off-by: Barry Spinney <spinney@mellanox.com> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>