net: thunderx: Allow IPv6 frames with zero UDP checksum
authorThanneeru Srinivasulu <tsrinivasulu@cavium.com>
Tue, 7 Mar 2017 12:39:11 +0000 (18:09 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Mar 2017 21:12:41 +0000 (13:12 -0800)
Do not consider IPv6 frames with zero UDP checksum as frames
with bad checksum and drop them.

Signed-off-by: Thanneeru Srinivasulu <tsrinivasulu@cavium.com>
Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/thunder/nicvf_queues.c

index b1962dbd04093bfa3fdd73d929792ebd7c3ae0e5..f13289f0d2386d09e348b13c310346d42e20b74d 100644 (file)
@@ -622,9 +622,11 @@ static void nicvf_rcv_queue_config(struct nicvf *nic, struct queue_set *qs,
        nicvf_send_msg_to_pf(nic, &mbx);
 
        if (!nic->sqs_mode && (qidx == 0)) {
-               /* Enable checking L3/L4 length and TCP/UDP checksums */
+               /* Enable checking L3/L4 length and TCP/UDP checksums
+                * Also allow IPv6 pkts with zero UDP checksum.
+                */
                nicvf_queue_reg_write(nic, NIC_QSET_RQ_GEN_CFG, 0,
-                                     (BIT(24) | BIT(23) | BIT(21)));
+                                     (BIT(24) | BIT(23) | BIT(21) | BIT(20)));
                nicvf_config_vlan_stripping(nic, nic->netdev->features);
        }