This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via 72febbae5ea55a5fd051978fbfa0f669cf0e99fc (commit) from f80f28c4046b650c180bcb9b41c859c0c8e2564e (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 72febbae5ea55a5fd051978fbfa0f669cf0e99fc Author: Bogdan Pricope bogdan.pricope@linaro.org Date: Thu Mar 22 16:57:49 2018 +0200
linux-gen: pktio: dpdk: accept UDPv4 packets with all-zero csum
Accept IPv4 UDP packets with all-zero checksum field even if DPDK reported it as bad checksum value. This patch fixes bug: https://bugs.linaro.org/show_bug.cgi?id=3685.
Signed-off-by: Bogdan Pricope bogdan.pricope@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c index 7b9fed72..83dbec4f 100644 --- a/platform/linux-generic/pktio/dpdk.c +++ b/platform/linux-generic/pktio/dpdk.c @@ -27,6 +27,7 @@ #include <odp_libconfig_internal.h>
#include <protocols/eth.h> +#include <protocols/udp.h>
#include <rte_config.h> #include <rte_malloc.h> @@ -419,6 +420,7 @@ MEMPOOL_REGISTER_OPS(ops_stack); #define IP4_CSUM_RESULT(m) (m->ol_flags & PKT_RX_IP_CKSUM_MASK) #define L4_CSUM_RESULT(m) (m->ol_flags & PKT_RX_L4_CKSUM_MASK) #define HAS_L4_PROTO(m, proto) ((m->packet_type & RTE_PTYPE_L4_MASK) == proto) +#define UDP4_CSUM(_p) (((_odp_udphdr_t *)_odp_packet_l4_ptr(_p, NULL))->chksum)
#define PKTIN_CSUM_BITS 0x1C
@@ -451,6 +453,12 @@ static inline int pkt_set_ol_rx(odp_pktin_config_opt_t *pktin_cfg, if (packet_csum_result == PKT_RX_L4_CKSUM_GOOD) { pkt_hdr->p.input_flags.l4_chksum_done = 1; } else if (packet_csum_result != PKT_RX_L4_CKSUM_UNKNOWN) { + if (pkt_hdr->p.input_flags.ipv4 && + pkt_hdr->p.input_flags.udp && + !UDP4_CSUM(packet_handle(pkt_hdr))) { + pkt_hdr->p.input_flags.l4_chksum_done = 1; + return 0; + } if (pktin_cfg->bit.drop_udp_err) return -1;
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/pktio/dpdk.c | 8 ++++++++ 1 file changed, 8 insertions(+)
hooks/post-receive