Thread (32 messages) 32 messages, 7 authors, 2014-11-02

Re: [PATCH net-next 8/8] net/mlx4_en: Extend checksum offloading by CHECKSUM COMPLETE

From: Yann Ylavic <hidden>
Date: 2014-10-31 00:38:14

Hi,

On Thu, Oct 30, 2014 at 5:06 PM, Or Gerlitz [off-list ref] wrote:
[...]
+static int check_csum(struct mlx4_cqe *cqe, struct sk_buff *skb, int hwtstamp_rx_filter)
+{
+       __wsum hw_checksum = 0;
+
+       void *hdr = (u8 *)skb->data + sizeof(struct ethhdr);
+
+       hw_checksum = csum_unfold((__force __sum16)cqe->checksum);
+
+       if (((struct ethhdr *)skb->data)->h_proto == htons(ETH_P_8021Q) &&
+           hwtstamp_rx_filter != HWTSTAMP_FILTER_NONE) {
+               /* next protocol non IPv4 or IPv6 */
+               if (((struct vlan_hdr *)hdr)->h_vlan_encapsulated_proto
+                   != htons(ETH_P_IP) ||
Shouldn't this be a AND (&&)?
+                   ((struct vlan_hdr *)hdr)->h_vlan_encapsulated_proto
+                   != htons(ETH_P_IPV6))
+                       return -1;
Regards,
Yann.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help