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 CB6F45698 for ; Fri, 27 Feb 2015 16:02:47 +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.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YRMUp-0004Nv-Sj; Fri, 27 Feb 2015 16:06:38 +0100 Message-ID: <54F08705.4050105@6wind.com> Date: Fri, 27 Feb 2015 16:02:29 +0100 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 MIME-Version: 1.0 To: Helin Zhang , dev@dpdk.org References: <1424156374-21768-1-git-send-email-helin.zhang@intel.com> <1425042696-23162-1-git-send-email-helin.zhang@intel.com> <1425042696-23162-4-git-send-email-helin.zhang@intel.com> In-Reply-To: <1425042696-23162-4-git-send-email-helin.zhang@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4 03/18] mbuf: add definitions of unified packet types 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: Fri, 27 Feb 2015 15:02:48 -0000 Hi Helin, On 02/27/2015 02:11 PM, Helin Zhang wrote: > As there are only 6 bit flags in ol_flags for indicating packet > types, which is not enough to describe all the possible packet > types hardware can recognize. For example, i40e hardware can > recognize more than 150 packet types. Unified packet type is > composed of L2 type, L3 type, L4 type, tunnel type, inner L2 type, > inner L3 type and inner L4 type fields, and can be stored in > 'struct rte_mbuf' of 32 bits field 'packet_type'. > > Signed-off-by: Helin Zhang That's not what I asked in http://dpdk.org/ml/archives/dev/2015-February/013423.html A definition of what is the meaning of a packet type in terms of packet content is really required for the PMD developer and for the application developer. By reading the comment, we should be able to answer to the following question: - What are the required conditions on the packet headers to recognize this type? The conditions should be formally described in the comment. By reading the comment, we should be able to know whether the following packets can or must not be recognized as an RTE_PTYPE_L3_IPV4: > > > > > > > > ... Here is an example about why it is important: Let's assume the definition of RTE_PTYPE_L3_IPV4 is: - IP version field is 4 - no IP options (header size is 20, ihl=5) - layer 2 identified the packet as IP (ex: ethertype=0x800) If a hardware XYZ is able to recognize that a packet is an IP packet by just checking the ethertype without checking the IP version field, the PMD has to check by software that IHL is 5 and IP version is 4. Regards, Olivier