net: Save software checksum complete
In skb_checksum complete, if we need to compute the checksum for the packet (via skb_checksum) save the result as CHECKSUM_COMPLETE. Subsequent checksum verification can use this. Also, added csum_complete_sw flag to distinguish between software and hardware generated checksum complete, we should always be able to trust the software computation. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
这个提交包含在:
@@ -173,7 +173,8 @@ int csum_partial_copy_to_xdr(struct xdr_buf *xdr, struct sk_buff *skb)
|
||||
return -1;
|
||||
if (csum_fold(desc.csum))
|
||||
return -1;
|
||||
if (unlikely(skb->ip_summed == CHECKSUM_COMPLETE))
|
||||
if (unlikely(skb->ip_summed == CHECKSUM_COMPLETE) &&
|
||||
!skb->csum_complete_sw)
|
||||
netdev_rx_csum_fault(skb->dev);
|
||||
return 0;
|
||||
no_checksum:
|
||||
|
在新工单中引用
屏蔽一个用户