From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id C6A243975 for ; Mon, 17 Nov 2014 13:41:04 +0100 (CET) Received: from was59-1-82-226-113-214.fbx.proxad.net ([82.226.113.214] helo=[192.168.0.10]) by mail.droids-corp.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XqLp2-0000pj-Hj; Mon, 17 Nov 2014 13:54:27 +0100 Message-ID: <5469EF3E.9080102@6wind.com> Date: Mon, 17 Nov 2014 13:51:10 +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: Bruce Richardson 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> <20141117103951.GB2472@bricha3-MOBL3> In-Reply-To: <20141117103951.GB2472@bricha3-MOBL3> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, 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: Mon, 17 Nov 2014 12:41:04 -0000 Hi Bruce, On 11/17/2014 11:39 AM, Bruce Richardson wrote: >> +/* >> + * Get the name of a TX offload flag >> + */ >> +const char *rte_get_tx_ol_flag_name(uint64_t mask) >> +{ >> + switch (mask) { >> + case PKT_TX_VLAN_PKT: return "PKT_TX_VLAN_PKT"; >> + case PKT_TX_IP_CKSUM: return "PKT_TX_IP_CKSUM"; >> + case PKT_TX_TCP_CKSUM: return "PKT_TX_TCP_CKSUM"; >> + case PKT_TX_SCTP_CKSUM: return "PKT_TX_SCTP_CKSUM"; >> + case PKT_TX_UDP_CKSUM: return "PKT_TX_UDP_CKSUM"; >> + case PKT_TX_IEEE1588_TMST: return "PKT_TX_IEEE1588_TMST"; >> + case PKT_TX_VXLAN_CKSUM: return "PKT_TX_VXLAN_CKSUM"; >> + default: return NULL; >> + } >> +} >> diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h >> index 68fb988..e76617f 100644 >> --- a/lib/librte_mbuf/rte_mbuf.h >> +++ b/lib/librte_mbuf/rte_mbuf.h >> @@ -129,6 +129,28 @@ extern "C" { >> /* Use final bit of flags to indicate a control mbuf */ >> #define CTRL_MBUF_FLAG (1ULL << 63) /**< Mbuf contains control data */ >> > > I think this patch should perhaps also add to a comment at the top of the list > of flags that any new flags added should also be added to the appropriate > function in rte_mbuf.c. Having the comment in rte_mbuf.h where people would add the flags > should help remind people to keep the flag lists in sync. Good idea, I'll add it. Regards, Olivier