SHARE
TWEET

Untitled

a guest Jun 19th, 2017 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. index 0471cae..afb91d7 100644
  2. --- a/drivers/net/ehea/ehea_main.c
  3. +++ b/drivers/net/ehea/ehea_main.c
  4. @@ -533,8 +533,20 @@ static inline void ehea_fill_skb(struct net_device *dev,
  5.         int length = cqe->num_bytes_transfered - 4;     /*remove CRC */
  6.  
  7.         skb_put(skb, length);
  8. -       skb->ip_summed = CHECKSUM_UNNECESSARY;
  9.         skb->protocol = eth_type_trans(skb, dev);
  10. +       printk("Protocol %d\n", skb->protocol);
  11. +       printk("%d\n", ip_hdr(skb)->protocol);
  12. +       if (skb->protocol == htons(ETH_P_IP) &&
  13. +           (ip_hdr(skb)->protocol == IPPROTO_TCP ||
  14. +            ip_hdr(skb)->protocol == IPPROTO_UDP)){
  15. +               skb->ip_summed = CHECKSUM_UNNECESSARY;
  16. +               printk("Unnescessary\n");
  17. +       }
  18. +       else{
  19. +               printk("Complete\n");
  20. +               skb->ip_summed = CHECKSUM_COMPLETE;
  21. +               skb->csum = cqe->inet_checksum_value;
  22. +       }
  23.  }
RAW Paste Data
Top