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.
CID 13218 : Operands don't affect result (CONSTANT_EXPRESSION_RESULT) result_independent_of_operands: ol_flags & (18014398509481984ULL /* 1ULL << 54 */) is always 0 regardless of the values of its operands. This occurs as the logical operand of if. Coverity issue: 13218 Fixes: fefed3d1e62c ("enic: new driver") Suggested-by: Piotr Azarewicz <piotrx.t.azarewicz at intel.com> Signed-off-by: John Daley <johndale at cisco.com> --- This is essentially patch http://www.dpdk.org/dev/patchwork/patch/12642 applied after the enic_send_packet function was melded into the main transmit funciton. drivers/net/enic/enic_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c index 7527bce..350d04b 100644 --- a/drivers/net/enic/enic_rxtx.c +++ b/drivers/net/enic/enic_rxtx.c @@ -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; -- 2.7.0