提交 8a7f280f 编写于 作者: R Ronak Doshi 提交者: David S. Miller

vmxnet3: use correct tcp hdr length when packet is encapsulated

Commit dacce2be ("vmxnet3: add geneve and vxlan tunnel offload
support") added support for encapsulation offload. However, while
calculating tcp hdr length, it does not take into account if the
packet is encapsulated or not.

This patch fixes this issue by using correct reference for inner
tcp header.

Fixes: dacce2be ("vmxnet3: add geneve and vxlan tunnel offload support")
Signed-off-by: NRonak Doshi <doshir@vmware.com>
Acked-by: NGuolin Yang <gyang@vmware.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 519a8a6c
...@@ -886,7 +886,8 @@ vmxnet3_parse_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq, ...@@ -886,7 +886,8 @@ vmxnet3_parse_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq,
switch (protocol) { switch (protocol) {
case IPPROTO_TCP: case IPPROTO_TCP:
ctx->l4_hdr_size = tcp_hdrlen(skb); ctx->l4_hdr_size = skb->encapsulation ? inner_tcp_hdrlen(skb) :
tcp_hdrlen(skb);
break; break;
case IPPROTO_UDP: case IPPROTO_UDP:
ctx->l4_hdr_size = sizeof(struct udphdr); ctx->l4_hdr_size = sizeof(struct udphdr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册