[v2,WIP,7/7] linux-gen: pktio: loop: support checksum parsing

Message ID 1515830407-13301-8-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series
  • Validate checksums during packet parsing
Related show

Commit Message

Github ODP bot Jan. 13, 2018, 8 a.m.
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Add capability bits referencing support for IPv4 and UDP checksum
validation for loop pktio device.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 389 (lumag:parse-checksums)
 ** https://github.com/Linaro/odp/pull/389
 ** Patch: https://github.com/Linaro/odp/pull/389.patch
 ** Base sha: 49ebafae0edebbc750742d8874ad0a7588286dea
 ** Merge commit sha: 29d9c9fa8235c01897c72e823b57525e37f896d3
 **/
 platform/linux-generic/pktio/loop.c | 2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/platform/linux-generic/pktio/loop.c b/platform/linux-generic/pktio/loop.c
index bf6365e94..9b470c083 100644
--- a/platform/linux-generic/pktio/loop.c
+++ b/platform/linux-generic/pktio/loop.c
@@ -250,6 +250,8 @@  static int loopback_capability(pktio_entry_t *pktio_entry ODP_UNUSED,
 	odp_pktio_config_init(&capa->config);
 	capa->config.pktin.bit.ts_all = 1;
 	capa->config.pktin.bit.ts_ptp = 1;
+	capa->config.pktin.bit.ipv4_chksum = 1;
+	capa->config.pktin.bit.udp_chksum = 1;
 	capa->config.inbound_ipsec = 1;
 	capa->config.outbound_ipsec = 1;