From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 8A5C4B6D8 for ; Tue, 17 Feb 2015 10:01:44 +0100 (CET) Received: by mail-wg0-f52.google.com with SMTP id x12so23982360wgg.11 for ; Tue, 17 Feb 2015 01:01:44 -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 :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=bF68msMFxyIG8HYzVqpRoWlyg+TMTZmgVEJjDgMUxdA=; b=SoNpEdkOxletGQRiHGoBPDxs8R7bLDCd5Nehh51OMSzsKFq9rGELMta9mnXxdQTRsl BfLpfO8kPWouLnWqUqnqxCGkyki07hIkCSdHfpPo64LCWtKwpI8VOHcGf6FJfN+d4ONn GY9TQoIx2WXhR6jDxtj9GlT+Ar/BcvoGtkP4RA0h/mmlWyosWpgFj9Jg+4GVYnRbT7a4 1cvhhYa+ZBWivakz8Ri8GEP6jzcvQrcAyu5/PjIUR7Nr52OetAW8RchLMrvumuXlSJCx fiBDFUZbU4v1XiEKQBm3Azm6cNAZw/WInWgj9xgUSV/WbeGv1W5aIp78vcVO2pR+19dY dA7A== X-Gm-Message-State: ALoCoQkri8oLhgIaeDaIEeixB4PDpBDSEKSxUKj3d9SsutKhGJ6K7swmpUaf27w1sL0/BLpi7OKw X-Received: by 10.194.239.129 with SMTP id vs1mr58124785wjc.158.1424163704389; Tue, 17 Feb 2015 01:01:44 -0800 (PST) Received: from [10.16.0.195] (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id ul1sm26411829wjc.0.2015.02.17.01.01.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Feb 2015 01:01:43 -0800 (PST) Message-ID: <54E30374.4010809@6wind.com> Date: Tue, 17 Feb 2015 10:01:40 +0100 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-Version: 1.0 To: Helin Zhang , dev@dpdk.org References: <1422501365-12643-1-git-send-email-helin.zhang@intel.com> <1424156374-21768-1-git-send-email-helin.zhang@intel.com> <1424156374-21768-4-git-send-email-helin.zhang@intel.com> In-Reply-To: <1424156374-21768-4-git-send-email-helin.zhang@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 03/16] 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: Tue, 17 Feb 2015 09:01:44 -0000 Hi Helin, On 02/17/2015 07:59 AM, 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 A formal definition of each flag is still missing. I explained several times why it's needed. We must be able to answer to these questions: - If I'm developing a PMD, what fields should I check in the packet to set a specific flag? - If I'm developing an application, if a specific flag is set, what checks can I skip? Example with RTE_PTYPE_L3_IPV4: - IP version field is 4 - no IP options (header size is 20) - layer 2 identified the packet as IP (ex: ethertype=0x800) I think we need such a definition for all packet types. Regards, Olivier