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 5A83F9E7 for ; Fri, 29 Apr 2016 17:15:33 +0200 (CEST) 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:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1awAAZ-0001b4-Og; Fri, 29 Apr 2016 17:17:28 +0200 To: "dev@dpdk.org" , jianfeng.tan@intel.com Cc: "Ananyev, Konstantin" , Adrien Mazarguil From: Olivier Matz Message-ID: <57237A88.6030807@6wind.com> Date: Fri, 29 Apr 2016 17:15:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] supported 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, 29 Apr 2016 15:15:33 -0000 Hi, The following commit introduces a function to list the supported packet types of a device: http://dpdk.org/browse/dpdk/commit/?id=78a38edf66 I would like to know what does "supported" precisely mean. Is it: 1/ - if a ptype is marked as supported, the driver MUST set this ptype if the packet matches the format described in rte_mbuf.h -> if the ptype is not recognized, the application is sure that the packet is not one of the supported ptype -> but this is difficult to take advantage of this inside an application that supports several different ports model that do not support the same packet types 2/ - if a ptype is marked as supported, the driver CAN set the ptype if the packet matches the format described in rte_mbuf.h -> if a ptype is not recognized, the application does a software fallback -> in this case, it would useless to have the get_supported_ptype() Can you confirm if the PMDs and l3fwd (the only user) expect 1/ or 2/ ? Can you elaborate on the advantages of having this API? And a supplementary question: if a ptype is not marked as supported, is it forbidden for a driver to set this ptype anyway? Because we can imagine a hardware that can only recognize packets in some conditions (ex: can recognize IPv4 if there is no vlan). I think properly defining the meaning of "supported" is mandatory to have an application beeing able to use this feature, and avoid PMDs to behave differently because the API is unclear (like we've already seen for other features). Thanks, Olivier