From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailfilter02.viettel.com.vn (mailfilter02.viettel.com.vn [125.235.240.54]) by dpdk.org (Postfix) with ESMTP id BBA9F1B202 for ; Wed, 9 Jan 2019 04:43:31 +0100 (CET) DomainKey-Signature: s=dmsig1; d=viettel.com.vn; c=simple; q=dns; h=Authentication-Results:X-IronPort-AV:Received:Received: Received:Received:X-Virus-Scanned:Received:Received:To:Cc: Subject:Message-ID:MIME-Version:Content-Type:X-Mailer: Thread-Index:Content-Language:MilterAction:Date:From; b=RRuuHoBgcEb6XhFe+mvhD7U4/jYPL/2m+xmYbfPFkAWYFlKOvrpr7md6 /tBMgwgM8EEMrDatyuoBWlxsJEzS/PgPO060UFrQ/RdGGgRA5gxanZl6W YHutxpwAyNUrGQ5lEO0Ux+NuNIwzgXxgVVkGVu56oy8X4822FgxNKeQtZ ZYH6IcBGs9w5M//IGAZhQliwrDN7EERa/E0atXWvLZHcpQIJunStEgsGF fI2TQ5BtVs4b+Dcw/PgYMsY2D7BbcOlWIGbE4jd1MklNCKKRu/3AcjJhN PwtjGkFpwAkhTWQ8fzadnweFzQZUAxn/v0YEj4/n7QKXvpRf4yHcHKfi5 w==; DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=viettel.com.vn; s=dkim1; t=1547005413; h=to:cc:subject:message-id:mime-version:date:from; bh=74SV7mtRKVjeH/Z/yx9sfGblW5pYIsidDn5KeYRabSI=; b=oO2QAs5xKq+M30NCprWF9bLAWDMHAr5UHR42cizuYg8Y/AHFBouFHx0A ffz7tOQqSL/Q+x9D2gZevbNqfjDTVfIa82qy97JWS1UdmbP8FmTorlsj8 xYlBvnaJ/sqUyDIOm5HJ5bmdTswNmuZ3GGTBPPSSAUYi1vdgUc2wc2yng p+7ZPRJYym3ydxaFDoG+pgGSxDvp3nDgsRbXYvro5PVULbc3Sn+P5IVSp rbCNPW2Po7Fm7uvYMJDyEti0i0qRW6+ODdIBqAExTu+LKXASZUrO+81FQ RetZB23bC40tmVVRhbvIPmuLN5IDA95K49Ti1GVYaOUXl+kwCrFf71Udd g==; Authentication-Results: mailfilter02.viettel.com.vn; spf=Pass smtp.mailfrom=longtb5@viettel.com.vn; dmarc=pass (p=none dis=none) d=viettel.com.vn X-IronPort-AV: E=Sophos;i="5.56,253,1539622800"; d="scan'208,217";a="120356897" Received: from 125.235.240.44.adsl.viettel.vn (HELO mta1.viettel.com.vn) ([125.235.240.44]) by mailfilter02.viettel.com.vn with ESMTP; 09 Jan 2019 10:43:28 +0700 Received: from localhost (localhost [127.0.0.1]) by mta1.viettel.com.vn (Postfix) with ESMTP id B197B6101AE; Wed, 9 Jan 2019 10:43:16 +0700 (ICT) Received: from mta1.viettel.com.vn ([127.0.0.1]) by localhost (mta1.viettel.com.vn [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id wFkDZaTdhdqf; Wed, 9 Jan 2019 10:43:16 +0700 (ICT) Received: from localhost (localhost [127.0.0.1]) by mta1.viettel.com.vn (Postfix) with ESMTP id 8D66361016D; Wed, 9 Jan 2019 10:43:16 +0700 (ICT) X-Virus-Scanned: amavisd-new at Received: from mta1.viettel.com.vn ([127.0.0.1]) by localhost (mta1.viettel.com.vn [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id pH4S6zosxdDL; Wed, 9 Jan 2019 10:43:16 +0700 (ICT) Received: from ANMLONGTB5 (unknown [27.68.241.28]) by mta1.viettel.com.vn (Postfix) with ESMTPSA id 4B8E86101AE; Wed, 9 Jan 2019 10:43:16 +0700 (ICT) To: , Cc: Message-ID: <002301d4a7ce$d095b240$71c116c0$@viettel.com.vn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdSnxr7PLxgVpPCJQCGKPafV9wR0Kw== Content-Language: en-us MilterAction: FORWARD Date: Wed, 9 Jan 2019 10:43:16 +0700 (ICT) From: longtb5@viettel.com.vn Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] [RFC] function to parse packet headers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 03:43:33 -0000 Hi Morten, What is the difference compare to rte_net_get_ptype(), which also parses packet types and reports on header length. In my application I have also done something similar about malformed packets. IMO it's very useful to have return value indicate different types of malformed packets, not just -1, e.g. invalid IP options, IP loopback, etc. Regards, BL