From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by dpdk.org (Postfix) with ESMTP id A9E03592C for ; Tue, 18 Nov 2014 10:19:25 +0100 (CET) Received: by mail-wi0-f177.google.com with SMTP id l15so11896025wiw.10 for ; Tue, 18 Nov 2014 01:29:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=R0wODzgyxqWlcBeqa1C6fyMJeHA8k0jECR1OusnJdoA=; b=J4YERALHyuxZKd1aqAk8nd1UEMCyA5uPCMcwKwGF7vOtUL85wi99zwVd7w2zvGMIWD qkDCo6TcMjlocErEfCOzsOkMe/Dl9kDZjMXYvg/2Kz06ANp7fIBDRoTMimfd99omehs4 JR52PU6nJRaUPVDaUsgfQpktnQJvZNoaJVKzd04N2FAIRVehHrkV1L7ThXKw8SSP4HnK 9gYnB/xW0hZoA4WXpwupkBY2hgHW7/OEQ4gn7om56c9KH9GLV3HC6GHypQlC/IwXeZ1y TooSn9zMsBvsYG0atieMG0SIbjH6eFDAzgRJqy6N+7bu523uCW45SsVNhmyLlGWj9Qt1 NsBA== X-Gm-Message-State: ALoCoQmuWiIq4Yv2nf8XgnSE0EiT5hXxfKF+qUAsLXbl7tM5Ge7QWIS9USPG4WppB5eUsEliwLWE X-Received: by 10.194.58.8 with SMTP id m8mr46821415wjq.43.1416302986015; Tue, 18 Nov 2014 01:29:46 -0800 (PST) Received: from [10.16.0.195] (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id j2sm23843641wjs.28.2014.11.18.01.29.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Nov 2014 01:29:45 -0800 (PST) Message-ID: <546B1188.2090203@6wind.com> Date: Tue, 18 Nov 2014 10:29:44 +0100 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0 MIME-Version: 1.0 To: "Ananyev, Konstantin" , "dev@dpdk.org" References: <1415635166-1364-1-git-send-email-olivier.matz@6wind.com> <1415984609-2484-1-git-send-email-olivier.matz@6wind.com> <1415984609-2484-7-git-send-email-olivier.matz@6wind.com> <2601191342CEEE43887BDE71AB977258213AE5A1@IRSMSX105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB977258213AE5A1@IRSMSX105.ger.corp.intel.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "jigsaw@gmail.com" Subject: Re: [dpdk-dev] [PATCH v2 06/13] mbuf: add functions to get the name of an ol_flag 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: Tue, 18 Nov 2014 09:19:25 -0000 Hi Konstantin, On 11/17/2014 08:00 PM, Ananyev, Konstantin wrote: >> +/* >> + * Get the name of a RX offload flag >> + */ >> +const char *rte_get_rx_ol_flag_name(uint64_t mask) >> +{ >> + switch (mask) { >> + case PKT_RX_VLAN_PKT: return "PKT_RX_VLAN_PKT"; >> + case PKT_RX_RSS_HASH: return "PKT_RX_RSS_HASH"; >> + case PKT_RX_FDIR: return "PKT_RX_FDIR"; >> + case PKT_RX_L4_CKSUM_BAD: return "PKT_RX_L4_CKSUM_BAD"; >> + case PKT_RX_IP_CKSUM_BAD: return "PKT_RX_IP_CKSUM_BAD"; >> + /* case PKT_RX_EIP_CKSUM_BAD: return "PKT_RX_EIP_CKSUM_BAD"; */ >> + /* case PKT_RX_OVERSIZE: return "PKT_RX_OVERSIZE"; */ >> + /* case PKT_RX_HBUF_OVERFLOW: return "PKT_RX_HBUF_OVERFLOW"; */ >> + /* case PKT_RX_RECIP_ERR: return "PKT_RX_RECIP_ERR"; */ >> + /* case PKT_RX_MAC_ERR: return "PKT_RX_MAC_ERR"; */ > > Didn't spot it before, wonder why do you need these 5 commented out lines? > In fact, why do we need these flags if they all equal to zero right now? > I know these flags were not introduced by that patch, in fact as I can see it was a temporary measure, > as old ol_flags were just 16 bits long: > http://dpdk.org/ml/archives/dev/2014-June/003308.html > So wonder should now these flags either get proper values or be removed? I would be in favor of removing them, or at least the following ones (I don't understand how they can help the application): - PKT_RX_OVERSIZE: Num of desc of an RX pkt oversize. - PKT_RX_HBUF_OVERFLOW: Header buffer overflow. - PKT_RX_RECIP_ERR: Hardware processing error. - PKT_RX_MAC_ERR: MAC error. I would have say that a statistics counter in the driver is more appropriate for this case (maybe there is already a counter in the hardware). I have no i40e hardware to test that, so I don't feel very comfortable to modify the i40e driver code to add these stats. Adding Helin in CC list, maybe he has an idea. Regards, Olivier