net/enic: expand local Tx mbuf flags variable to 64-bits
authorJohn Daley <johndale@cisco.com>
Fri, 3 Jun 2016 00:22:56 +0000 (17:22 -0700)
committerBruce Richardson <bruce.richardson@intel.com>
Wed, 15 Jun 2016 15:13:56 +0000 (17:13 +0200)
The offload flags variable (ol_flags) in rte_mbuf structure is 64-bits,
so local copy of it must be 64-bits too. Moreover bit comparison between
16-bits variable and 64-bits value make no sense. This breaks Tx vlan
IP and L4 offloads.

Coverity issue: 13218
Fixes: fefed3d1e62c ("enic: new driver")

Suggested-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Signed-off-by: John Daley <johndale@cisco.com>
Acked-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
drivers/net/enic/enic_rxtx.c

index b971325..08ab630 100644 (file)
@@ -384,7 +384,7 @@ uint16_t enic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
        struct vnic_wq *wq = (struct vnic_wq *)tx_queue;
        struct enic *enic = vnic_dev_priv(wq->vdev);
        unsigned short vlan_id;
-       unsigned short ol_flags;
+       uint64_t ol_flags;
        unsigned int wq_desc_avail;
        int head_idx;
        struct vnic_wq_buf *buf;