Skip to content

Commit

Permalink
octeon: fix tx checksum offload
Browse files Browse the repository at this point in the history
This patch fixes tx checksum offload by setting correct l3/l4 pointer.

Type: fix

Signed-off-by: Monendra Singh Kushwaha <[email protected]>
Change-Id: I5d7407c1c2ea7f4c5138c2c304fda829b5e1ffc6
Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/toolkits/vpp/+/132890
Tested-by: sa_ip-sw-jenkins <[email protected]>
Reviewed-by: Nithinsen Kaithakadan
  • Loading branch information
kmonendra authored and akamaluddin committed Aug 28, 2024
1 parent c0e1186 commit 63b19ce
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/plugins/dev_octeon/tx_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,19 +255,18 @@ oct_tx_enq1 (vlib_main_t *vm, oct_tx_ctx_t *ctx, vlib_buffer_t *b,
if (oflags & VNET_BUFFER_OFFLOAD_F_IP_CKSUM)
{
d.hdr_w1.ol3type = NIX_SENDL3TYPE_IP4_CKSUM;
d.hdr_w1.ol3ptr = vnet_buffer (b)->l3_hdr_offset;
d.hdr_w1.ol4ptr =
vnet_buffer (b)->l3_hdr_offset + sizeof (ip4_header_t);
d.hdr_w1.ol3ptr = vnet_buffer (b)->l3_hdr_offset - b->current_data;
d.hdr_w1.ol4ptr = d.hdr_w1.ol3ptr + sizeof (ip4_header_t);
}
if (oflags & VNET_BUFFER_OFFLOAD_F_UDP_CKSUM)
{
d.hdr_w1.ol4type = NIX_SENDL4TYPE_UDP_CKSUM;
d.hdr_w1.ol4ptr = vnet_buffer (b)->l4_hdr_offset;
d.hdr_w1.ol4ptr = vnet_buffer (b)->l4_hdr_offset - b->current_data;
}
else if (oflags & VNET_BUFFER_OFFLOAD_F_TCP_CKSUM)
{
d.hdr_w1.ol4type = NIX_SENDL4TYPE_TCP_CKSUM;
d.hdr_w1.ol4ptr = vnet_buffer (b)->l4_hdr_offset;
d.hdr_w1.ol4ptr = vnet_buffer (b)->l4_hdr_offset - b->current_data;
}
}

Expand Down

0 comments on commit 63b19ce

Please sign in to comment.