Bill Fischofer(Bill-Fischofer-Linaro) replied on github web page:

platform/linux-generic/include/odp_chksum_internal.h
line 30
@@ -0,0 +1,59 @@
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP checksum - implementation internal
+ */
+
+#ifndef ODP_CHKSUM_INTERNAL_H_
+#define ODP_CHKSUM_INTERNAL_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Simple implementation of ones complement sum.
+ * Based on RFC1071 and its errata.
+ */
+static uint32_t _odp_chksum_ones_comp16_32(const void *p, uint32_t len,
+                                          odp_bool_t odd_offset)
+
+{
+       uint32_t sum = 0;
+       const uint16_t *data = p;
+
+       if (odd_offset) {


Comment:
`if (len > 1 && (uintptr_t)p % 2) ...`

> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
> Drop use of `odd_offset` as noted earlier.


>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>> Checkpatch flag:
>> ```
>> WARNING: line over 80 characters
>> #102: FILE: platform/linux-generic/odp_packet.c:2204:
>> +            ip_proto = parse_ipv4(prs, &parseptr, &offset, frame_len, 
>> chksums);
>> total: 0 errors, 1 warnings, 0 checks, 163 lines checked
>> ```


>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote:
>>> 2018


https://github.com/Linaro/odp/pull/389#discussion_r161933918
updated_at 2018-01-17 01:41:46

Reply via email to