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 0225a8a396ddc7168be096f28b0a711184a48ef9 (commit) from 72febbae5ea55a5fd051978fbfa0f669cf0e99fc (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 0225a8a396ddc7168be096f28b0a711184a48ef9 Author: Bogdan Pricope bogdan.pricope@linaro.org Date: Thu Mar 22 08:51:27 2018 +0200
linux-gen: pktio: dpdk: fix IPv4 csum calculation when l4 offset is not set
IPv4 header contains length of the header and options in IHL field. It can be used to replace L3 length calculation based on offsets. This patch fixes bug: https://bugs.linaro.org/show_bug.cgi?id=3686.
Signed-off-by: Bogdan Pricope bogdan.pricope@linaro.org Reviewed-and-tested-by: Matias Elo matias.elo@nokia.com 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 83dbec4f..d40ad954 100644 --- a/platform/linux-generic/pktio/dpdk.c +++ b/platform/linux-generic/pktio/dpdk.c @@ -656,11 +656,7 @@ static inline void pkt_set_ol_tx(odp_pktout_config_opt_t *pktout_cfg, if (!ipv4_chksum_pkt && !udp_chksum_pkt && !tcp_chksum_pkt) return;
- if (pkt_p->l4_offset == ODP_PACKET_OFFSET_INVALID) - return; - mbuf->l2_len = pkt_p->l3_offset - pkt_p->l2_offset; - mbuf->l3_len = pkt_p->l4_offset - pkt_p->l3_offset;
if (l3_proto_v4) mbuf->ol_flags = PKT_TX_IPV4; @@ -671,8 +667,14 @@ static inline void pkt_set_ol_tx(odp_pktout_config_opt_t *pktout_cfg, mbuf->ol_flags |= PKT_TX_IP_CKSUM;
((struct ipv4_hdr *)l3_hdr)->hdr_checksum = 0; + mbuf->l3_len = _ODP_IPV4HDR_IHL(*(uint8_t *)l3_hdr) * 4; }
+ if (pkt_p->l4_offset == ODP_PACKET_OFFSET_INVALID) + return; + + mbuf->l3_len = pkt_p->l4_offset - pkt_p->l3_offset; + l4_hdr = (void *)(mbuf_data + pkt_p->l4_offset);
if (udp_chksum_pkt) {
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/pktio/dpdk.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
hooks/post-receive