From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Daley Subject: [PATCH v3 12/13] enic: expand local Tx mbuf flags variable to 64-bits Date: Thu, 2 Jun 2016 17:22:56 -0700 Message-ID: <1464913377-30879-13-git-send-email-johndale@cisco.com> References: <1464071579-30072-1-git-send-email-johndale@cisco.com> <1464913377-30879-1-git-send-email-johndale@cisco.com> Cc: bruce.richarsdon@intel.com, John Daley To: dev@dpdk.org Return-path: Received: from alln-iport-4.cisco.com (alln-iport-4.cisco.com [173.37.142.91]) by dpdk.org (Postfix) with ESMTP id 166345A9F for ; Fri, 3 Jun 2016 02:23:23 +0200 (CEST) In-Reply-To: <1464913377-30879-1-git-send-email-johndale@cisco.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Signed-off-by: John Daley --- 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