From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) by dpdk.org (Postfix) with ESMTP id 3A0591B276 for ; Tue, 8 Jan 2019 21:09:47 +0100 (CET) Received: by mail-ot1-f46.google.com with SMTP id 40so4652026oth.4 for ; Tue, 08 Jan 2019 12:09:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=U4Cu3dh7WF4+tQGMLcOSXA73YLXM+1fOt5Ej0AnnC14=; b=pu3nTyV72ysOImEdJYl8EPYsFvbfMn/siRtoZruIer1rVCNyE/wB/ctqwI6obDQGjn P/SekjJ0kWI6b37HKgtIT0sqxx9Fby9/TPZgkiu4R//Ig/ArRsPIxqaXSEOwussJBSzq HTvJJe4eUzBngENl/to1lfSMTbPb6lB37EtAokX88G+IiuxLXxi+3cvSDFynvXSdUxcu uk/SagcGHCQfp7a5S7w5pM/eA7Zckj6BC4IQ8Kt6xrTgBN+enEJROh4kcxOcL77X68ud 7Uugalmq9ZEttEgPN5b7NuU5/mtjcAnuoRwULlmrHtZRb/foK2Q3NBb5gxrk0KtcmnOk K8Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=U4Cu3dh7WF4+tQGMLcOSXA73YLXM+1fOt5Ej0AnnC14=; b=loE2wXJvHUBw/6Noz4LbbLn3nzdi/j//82l3udmlBGFzp4WhXZP3+GnnYON/UNTV7s fqHCdfDLqWkmulGCxT6C2FIrNaJ3xCX47rpYSzTV5GeXkzRzUTRT+ZVgdMeVD9TVQvpA pK9yx1aW++H+6u+XLzIt8t2SazDy02t44ClppThkKKrt84OToDFvPv628htyfspGCpSN wJmWys74y/4lkyX9oA3InCgmJkHpDuAv3oODBmd/LrozPD3D4NmATFf8W1CKtQLK9qb6 7tC2/uDgjbYp6gaK6mLgtMF3RRw48Py+Rwp4Evi2LAZFDfdeTWBk5E81jN5xIHqi9MpB U+9Q== X-Gm-Message-State: AJcUukcPdVomE7RTDYJc+gj7PVwmDBagAXQSdNRjnNECjrhnDknGYLNy HR8pICfnTuSsNJiRwr4gtULW4o2KGOg2fsusj8lTWA== X-Google-Smtp-Source: ALg8bN6MDD/qjIwjpjuSm0E8qDVoW+FzngSHcog37cwlKSnSu0LnlLhYKivMSCUZLEG5dZuXIp6CQ4v8O7w4HrU9sws= X-Received: by 2002:a9d:f48:: with SMTP id 66mr2198308ott.207.1546978186545; Tue, 08 Jan 2019 12:09:46 -0800 (PST) MIME-Version: 1.0 References: <98CBD80474FA8B44BF855DF32C47DC35B425B1@smartserver.smartshare.dk> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35B425B1@smartserver.smartshare.dk> From: Rami Rosen Date: Tue, 8 Jan 2019 22:09:34 +0200 Message-ID: To: =?UTF-8?Q?Morten_Br=C3=B8rup?= Cc: dev@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [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: Tue, 08 Jan 2019 20:09:47 -0000 Hi Morten, A good idea, thanks for volunteering! Several minor comments: I would consider calling it rte_mbuf_hdr_parse(), to make it more related to the rte_mbuf* methods, and also I would consider having it in librte_mbuf and not in librte_net as you suggested. Also regarding the bulk method. The first option is indeed faster and better in terms of performance, which is important since it is intended probably mostly to the datapath. I would consider having the bulk method iterating over the rte_hdr_parse() method ,( or rte_mbuf_hdr_parse() if you will agree to my suggestion), and adding a boolean parameter (mark_malform or something like that) to this method + removing the const quailifier. The bulk method will set that flag when calling the rte_hdr_parse(). Thus you will avoid duplicity of the parsing code. Regards, Rami Rosen > >