From: Bogdan Pricope <bogdan.pric...@linaro.org> Immplement L3/L4 checksum insertion override functions
Signed-off-by: Bogdan Pricope <bogdan.pric...@linaro.org> --- /** Email created from pull request 245 (bogdanPricope:api_next_ovr_csum_ref_pr) ** https://github.com/Linaro/odp/pull/245 ** Patch: https://github.com/Linaro/odp/pull/245.patch ** Base sha: e3108af2f0b58c2ceca422b418439bba5de04b11 ** Merge commit sha: 00977685a347be03999a0215c3e038558df8be4c **/ platform/linux-generic/odp_packet.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 68a834a12..07dfdc617 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -1259,6 +1259,22 @@ int odp_packet_l4_offset_set(odp_packet_t pkt, uint32_t offset) return 0; } +void odp_packet_l3_chksum_insert(odp_packet_t pkt, int l3) +{ + odp_packet_hdr_t *pkt_hdr = packet_hdr(pkt); + + pkt_hdr->p.output_flags.l3_chksum_set = 1; + pkt_hdr->p.output_flags.l3_chksum = l3; +} + +void odp_packet_l4_chksum_insert(odp_packet_t pkt, int l4) +{ + odp_packet_hdr_t *pkt_hdr = packet_hdr(pkt); + + pkt_hdr->p.output_flags.l4_chksum_set = 1; + pkt_hdr->p.output_flags.l4_chksum = l4; +} + void odp_packet_flow_hash_set(odp_packet_t pkt, uint32_t flow_hash) { odp_packet_hdr_t *pkt_hdr = packet_hdr(pkt);