From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcdn-iport-4.cisco.com (rcdn-iport-4.cisco.com [173.37.86.75]) by dpdk.org (Postfix) with ESMTP id 502A35323 for ; Thu, 17 Mar 2016 23:57:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1302; q=dns/txt; s=iport; t=1458255436; x=1459465036; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=l+ScfhXSI/O8WzkuEMnj6NCVbSfFrv548s11DBuo4J8=; b=A1Y8VKrR+guizR7VOa3sSexpGahuZZvReERe4nLDuOMcg/Ub8FhNHdUZ sujve7Rp7Iipz1HIS2PkfqiOb2HypIagarAnPykW2cqlm3s8t174U0edM VrrZ0HmdSqfyhE4BJRmcfgZTyyd2hMOGXNuCsvDXvLRpWBpNQ7koZh4fD k=; X-IronPort-AV: E=Sophos;i="5.24,351,1454976000"; d="scan'208";a="83997614" Received: from alln-core-5.cisco.com ([173.36.13.138]) by rcdn-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 17 Mar 2016 22:57:15 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by alln-core-5.cisco.com (8.14.5/8.14.5) with ESMTP id u2HMvFZo006548; Thu, 17 Mar 2016 22:57:15 GMT Received: by cisco.com (Postfix, from userid 392789) id 3C2293FAAD5C; Thu, 17 Mar 2016 15:57:15 -0700 (PDT) From: John Daley To: dev@dpdk.org Cc: John Daley Date: Thu, 17 Mar 2016 15:57:05 -0700 Message-Id: <1458255427-12371-2-git-send-email-johndale@cisco.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1458255427-12371-1-git-send-email-johndale@cisco.com> References: <1458255427-12371-1-git-send-email-johndale@cisco.com> Subject: [dpdk-dev] [PATCH 1/3] enic: mbuf->ol_flags could be set incorrectly X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Mar 2016 22:57:16 -0000 In the receive path, the function to set mbuf ol_flags used the mbuf packet_type before it was set. Fixes: 947d860c821f ("enic: improve Rx performance") Signed-off-by: John Daley --- drivers/net/enic/enic_rx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/enic/enic_rx.c b/drivers/net/enic/enic_rx.c index 945a60f..59ebaa4 100644 --- a/drivers/net/enic/enic_rx.c +++ b/drivers/net/enic/enic_rx.c @@ -210,7 +210,7 @@ enic_cq_rx_to_pkt_flags(struct cq_desc *cqd, struct rte_mbuf *mbuf) ciflags = enic_cq_rx_desc_ciflags(cqrd); bwflags = enic_cq_rx_desc_bwflags(cqrd); - ASSERT(mbuf->ol_flags == 0); + mbuf->ol_flags = 0; /* flags are meaningless if !EOP */ if (unlikely(!enic_cq_rx_desc_eop(ciflags))) @@ -340,10 +340,10 @@ enic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, rxmb->pkt_len = rx_pkt_len; rxmb->data_len = rx_pkt_len; rxmb->port = enic->port_id; + rxmb->packet_type = enic_cq_rx_flags_to_pkt_type(&cqd); rxmb->ol_flags = ol_err_flags; if (!ol_err_flags) enic_cq_rx_to_pkt_flags(&cqd, rxmb); - rxmb->packet_type = enic_cq_rx_flags_to_pkt_type(&cqd); /* prefetch mbuf data for caller */ rte_packet_prefetch(RTE_PTR_ADD(rxmb->buf_addr, -- 2.7.0