List comments

GET /api/patches/73447/comments/
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

[
    {
        "id": 115392,
        "web_url": "https://patches.dpdk.org/comment/115392/",
        "msgid": "<BYAPR11MB3301A55C1DA7913102031C6C9A660@BYAPR11MB3301.namprd11.prod.outlook.com>",
        "date": "2020-07-07T16:44:58",
        "subject": "Re: [dpdk-dev] [PATCH] acl: Fix RTE_ACL_RULE_SZ macro definition",
        "submitter": {
            "id": 33,
            "url": "https://patches.dpdk.org/api/people/33/",
            "name": "Ananyev, Konstantin",
            "email": "konstantin.ananyev@intel.com"
        },
        "content": "From: Levend Sayar <levendsayar@gmail.com>\nSent: Tuesday, July 7, 2020 4:25 PM\nTo: Ananyev, Konstantin <konstantin.ananyev@intel.com>\nCc: dev@dpdk.org\nSubject: Re: [PATCH] acl: Fix RTE_ACL_RULE_SZ macro definition\n\nSure.\nI am really sorry for not being verbose enough.\n\nFrom lib/librte_acl/rte_acl.h\n\n#define RTE_ACL_RULE_DEF(name, fld_num) struct name {\\\n    struct rte_acl_rule_data data;               \\\n    struct rte_acl_field field[fld_num];         \\\n}\n\nRTE_ACL_RULE_DEF(rte_acl_rule,);\n\nWhen you put the definition in-place, above line means :\n\nstruct rte_acl_rule {\n   struct rte_acl_rule_data data;\n   struct rte_acl_field field[];\n}\n\n[KA] Yes.\n\nThere is another define to get the size of an acl rule such as\n\n#define RTE_ACL_RULE_SZ(fld_num)    \\\n    (sizeof(struct rte_acl_rule) + sizeof(struct rte_acl_field) * (fld_num))\n\nSo the above definition gets the size of a \"struct rte_acl_rule\" which has fld_num fields.\nwhich must be\nsizeof (struct rte_acl_rule_data) + (sizeof(struct rte_acl_field) * fld_num)\n\nBecause it adds up the sizes of struct components;\n\n[KA] I don’t think so.\nYou forgot about possible gaps between members of rte_acl_rule.\nLet say for 64 bit target it would be a 4B gap between ‘data’ and ‘field’.\nSo, for:\nRTE_ACL_RULE_DEF(xz, 1);\n\nsizeof(struct xz) == RTE_ACL_RULE_SZ(1) == 32\n\nAfter changes you suggest\nRTE_ACL_RULE_SZ(1) == 28 != sizeof(struct xz)\nWhich is wrong.\n\nBut according to the current RTE_ACL_RULE_SZ, it is\n\nsizeof (struct rte_acl_rule) + (sizeof(struct rte_acl_field) * fld_num)\n\nSo my patch only changes the part that I underlined.\n\nsizeof (struct rte_acl_rule) = 16;\nsizeof (struct rte_acl_rule_data) = 12;\n\nBest,\nLevend\n\n\nOn Tue, Jul 7, 2020 at 3:42 PM Ananyev, Konstantin <konstantin.ananyev@intel.com<mailto:konstantin.ananyev@intel.com>> wrote:\n\n> From: Levend Sayar <levendsayar@gmail.com<mailto:levendsayar@gmail.com>>\n\nCould you provide some explanation:\nWhat do you think is wrong with current version and why,\nand what your fix does.\n\n>\n> Signed-off-by: Levend Sayar <levendsayar@gmail.com<mailto:levendsayar@gmail.com>>\n> ---\n>  lib/librte_acl/rte_acl.h | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/lib/librte_acl/rte_acl.h b/lib/librte_acl/rte_acl.h\n> index aa22e70c6..d34fdbc0e 100644\n> --- a/lib/librte_acl/rte_acl.h\n> +++ b/lib/librte_acl/rte_acl.h\n> @@ -116,7 +116,7 @@ struct rte_acl_rule_data {\n>  RTE_ACL_RULE_DEF(rte_acl_rule,);\n>\n>  #define      RTE_ACL_RULE_SZ(fld_num)        \\\n> -     (sizeof(struct rte_acl_rule) + sizeof(struct rte_acl_field) * (fld_num))\n> +     (sizeof(struct rte_acl_rule_data) + sizeof(struct rte_acl_field) * (fld_num))\n>\n>\n>  /** Max number of characters in name.*/\n> --\n> 2.27.0",
        "headers": {
            "X-MS-Exchange-CrossTenant-mailboxtype": "HOSTED",
            "Return-Path": "<dev-bounces@dpdk.org>",
            "x-ms-office365-filtering-correlation-id": "133c7952-0842-4970-693a-08d822951644",
            "x-forefront-prvs": "0457F11EAF",
            "X-BeenThere": "dev@dpdk.org",
            "x-ms-exchange-antispam-messagedata": "\n OQK7AVBDZ6rE7cnz2YOQ1+R/V+JvHh8ItUCOgpauwHxPe1FBi/FQ7u1a5rWlsczvvHZCihVVXNhcetmMM4IfWu07pdNuYUTo3N0KUMiUGmfOvYvmV8ToTD+Qpmh4zMO6ibnl2lXoN3A1tInGSFC2y5zsjASUC/I0r/uiwQqyuuGSbrviOa6/KOQU6q1VrrK70wlukVXlpgleB3+FC7R4cbTq5zs3x70mwXpHBY5QIyKGKWMdulL2JMmSbewxGPDAVwY3BRgzhM1H0VNmRc4rKTiHsG5TgBFobLHpxg3lrNWUK1W+ytJsqVsHgZJwiKl2voq/0rvqxymHgGyCJv0gB5S/9K/QuziQfr99BxaNUCqph2N80xOCJP0mzPq77Y9saOuSZYJNfzjh+a5T0bSbHxx4w4tyChnmoeLruI5TsXMG/6L11GlctoY181KPVFCzXKojkmJw67EBSU5q7ThWYEemkZutSE9N7XJArDG1IGcfHa4qDNy42xWJgyo8uT2p",
            "IronPort-SDR": [
                "\n D9h63bybBXowZ8M7BjFeutdQVXc12xBNaIoxYSpTEQUJTV+SFHrhU3MbOz8+2VGWQPgWH0TZJC\n a7YJKAh2CEuQ==",
                "\n NPjGvxNtOCJMaLcGCzNjk/bC+Lae6yYymNM7OS7+ryP+TDRCkr1xhSdVhlla2kVLMczcfKP28B\n eKrtk+b1zhIA=="
            ],
            "X-MS-Exchange-CrossTenant-originalarrivaltime": "07 Jul 2020 16:44:59.0259 (UTC)",
            "Message-ID": "\n <BYAPR11MB3301A55C1DA7913102031C6C9A660@BYAPR11MB3301.namprd11.prod.outlook.com>",
            "X-Content-Filtered-By": "Mailman/MimeDel 2.1.15",
            "dlp-product": "dlpe-windows",
            "x-ms-oob-tlc-oobclassifiers": "OLM:7219;",
            "x-originating-ip": "[192.198.151.178]",
            "X-Amp-File-Uploaded": "False",
            "Received": [
                "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 71F55A00BE;\n\tTue,  7 Jul 2020 18:45:05 +0200 (CEST)",
                "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id BC7F61DD9B;\n\tTue,  7 Jul 2020 18:45:04 +0200 (CEST)",
                "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by dpdk.org (Postfix) with ESMTP id 932C81D8E7\n for <dev@dpdk.org>; Tue,  7 Jul 2020 18:45:02 +0200 (CEST)",
                "from orsmga008.jf.intel.com ([10.7.209.65])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 Jul 2020 09:45:00 -0700",
                "from orsmsx102.amr.corp.intel.com ([10.22.225.129])\n by orsmga008.jf.intel.com with ESMTP; 07 Jul 2020 09:45:00 -0700",
                "from ORSEDG002.ED.cps.intel.com (10.7.248.5) by\n ORSMSX102.amr.corp.intel.com (10.22.225.129) with Microsoft SMTP Server (TLS)\n id 14.3.439.0; Tue, 7 Jul 2020 09:45:00 -0700",
                "from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173)\n by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS)\n id 14.3.439.0; Tue, 7 Jul 2020 09:45:00 -0700",
                "from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26)\n by BYAPR11MB3717.namprd11.prod.outlook.com (2603:10b6:a03:b0::12)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24; Tue, 7 Jul\n 2020 16:44:59 +0000",
                "from BYAPR11MB3301.namprd11.prod.outlook.com\n ([fe80::f160:29ab:b8f9:4189]) by BYAPR11MB3301.namprd11.prod.outlook.com\n ([fe80::f160:29ab:b8f9:4189%6]) with mapi id 15.20.3153.029; Tue, 7 Jul 2020\n 16:44:59 +0000"
            ],
            "X-MS-Exchange-CrossTenant-userprincipalname": "\n u88CCftXQQj0bkBCmFRiZSpkpD/sgVdAcXGvUQy5ESVpT1SCRFxDMlk5lFq/Fce8Y9NSZ8S0e9iMy5O1vCG1+5UhhGjzYOLNiGlefblcMRY=",
            "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
            "List-Post": "<mailto:dev@dpdk.org>",
            "x-forefront-antispam-report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:BYAPR11MB3301.namprd11.prod.outlook.com; PTR:; CAT:NONE;\n SFTY:;\n SFS:(4636009)(366004)(53546011)(83380400001)(86362001)(5660300002)(6916009)(6506007)(9686003)(186003)(8936002)(2906002)(76116006)(8676002)(66946007)(26005)(55016002)(52536014)(4326008)(7696005)(33656002)(498600001)(66476007)(66556008)(64756008)(71200400001)(66446008);\n DIR:OUT; SFP:1102;",
            "In-Reply-To": "\n <CAGDw98n+8HPor+ZXtidbZS1KZgcaDgfgraGFbVbiFXJThmWN3A@mail.gmail.com>",
            "X-ExtLoop1": "1",
            "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
            "X-MS-Has-Attach": "",
            "MIME-Version": "1.0",
            "X-IronPort-AV": [
                "E=McAfee;i=\"6000,8403,9675\"; a=\"145753211\"",
                "E=Sophos;i=\"5.75,324,1589266800\";\n d=\"scan'208,217\";a=\"145753211\"",
                "E=Sophos;i=\"5.75,324,1589266800\";\n d=\"scan'208,217\";a=\"314371151\""
            ],
            "References": "<20200707122643.29222-1-levendsayar@gmail.com>\n <BYAPR11MB330123DB9DB5F74EAC5A269E9A660@BYAPR11MB3301.namprd11.prod.outlook.com>\n <CAGDw98n+8HPor+ZXtidbZS1KZgcaDgfgraGFbVbiFXJThmWN3A@mail.gmail.com>",
            "X-MS-Exchange-CrossTenant-id": "46c98d88-e344-4ed4-8496-4ed7712e255d",
            "x-ms-traffictypediagnostic": "BYAPR11MB3717:",
            "dlp-reaction": "no-action",
            "Content-Type": "text/plain; charset=\"utf-8\"",
            "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 133c7952-0842-4970-693a-08d822951644",
            "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;\n dkim=pass header.d=intel.com; arc=none",
            "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
            "Accept-Language": "en-GB, en-US",
            "To": "Levend Sayar <levendsayar@gmail.com>",
            "Content-Language": "en-US",
            "x-ms-exchange-senderadcheck": "1",
            "Thread-Topic": "[PATCH] acl: Fix RTE_ACL_RULE_SZ macro definition",
            "x-microsoft-antispam-prvs": "\n <BYAPR11MB3717A63ACB3B1B60716421C59A660@BYAPR11MB3717.namprd11.prod.outlook.com>",
            "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com;\n s=selector2-intel-onmicrosoft-com;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=m4eGiOU2nibRCeGHslctVNoN1U3Il6Ve/1L42u5F7Ho=;\n b=dUEg7QMrb4eY40yyCt1sTMTTzahXncnVLEysG98KNvBb+iCP9tJRqdYd54c58GBQxl3fQe0mz9mLK43WhYu5soNqEmsRq8zdeY5OO9e27iEUDWmj0I+L6QTvOEJ6PR+fsGF7xMa37FMJoV2bwJbAncH5oCVAJ4KiqiH0ZSI0Ss8=",
            "Thread-Index": "AQHWVFnvWPdVkjeB3Ei3ZGEA1LGJnqj8DwXAgAAt5YCAAA8icA==",
            "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
            "CC": "\"dev@dpdk.org\" <dev@dpdk.org>",
            "dlp-version": "11.2.0.6",
            "X-Mailman-Version": "2.1.15",
            "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=BxP2ECzDCqc77DcyGIh+TRrx9eWDR1nhDWieVAJ0oEQ03n4qAyKY/X8W4DJDbIBDFN57JPn68flVbDv9ecKcbzO2rne5/ei7qP7xWgibtepNnvfb+2CqC+xzaZ777sBwz6Oe8O7AXxntZ+vZuOkyAgXX4RgGOR2PNdEyLsygexHvvyMuygKlOsFRE7K+NcqB49yArMtHnCtWOPDsWQ/6oemmHdqej5RCYvdJOZpFg4o7D2C7AZj+Rc6Au91AuPnMcaRijJEiTavqlzsUZBF1pMN5Px7/tYydIC2FumWcZiUiHZNqkfdB1KPtAZOgvyMwcT19xAHuK1hnBvSo6cJ5rQ==",
            "Subject": "Re: [dpdk-dev] [PATCH] acl: Fix RTE_ACL_RULE_SZ macro definition",
            "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
            "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "BYAPR11MB3717",
            "X-Amp-Result": "SKIPPED(no attachment in message)",
            "X-MS-Exchange-CrossTenant-fromentityheader": "Hosted",
            "X-MS-TNEF-Correlator": "",
            "X-OriginatorOrg": "intel.com",
            "X-MS-Exchange-CrossTenant-AuthSource": "BYAPR11MB3301.namprd11.prod.outlook.com",
            "Date": "Tue, 7 Jul 2020 16:44:58 +0000",
            "Precedence": "list",
            "From": "\"Ananyev, Konstantin\" <konstantin.ananyev@intel.com>",
            "Content-Transfer-Encoding": "base64",
            "authentication-results": "gmail.com; dkim=none (message not signed)\n header.d=none;gmail.com; dmarc=none action=none header.from=intel.com;",
            "x-microsoft-antispam": "BCL:0;",
            "X-Original-To": "patchwork@inbox.dpdk.org",
            "x-ms-exchange-transport-forked": "True",
            "Errors-To": "dev-bounces@dpdk.org",
            "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
            "Delivered-To": "patchwork@inbox.dpdk.org",
            "Sender": "\"dev\" <dev-bounces@dpdk.org>",
            "x-microsoft-antispam-message-info": "\n vjNSo78SCNOOClo6K5h0Ld0KtzKUPFllUCNHM0nyyFFl3UKVksaXzDmbhe0XT1f8T5J17m4622NViHCyM8H9ppKeTLxZLWTBorCBVQw0f/Qv1XJv7xNwVBcSQ8wX8azSytskO2xPgUyame8VoFYjuwumiy2o3M9NQ7zpeGlWnHZeRpHwHAKC+LReGa/6rtz1c1VjsuZNZ9qGk3/3gIvjN7J5EBQsFwRkjEjw74zsPFKo/f6VGlhOdy6X7Vi4K36m7BEWl7NjDEi0m8o/uzM7y0ojHLE1EYloWmqNkGCJVfCxfvrqdc8HeOf7JJ+pBcLYQxCR7b28cXmnm3Qb73Xz6w==",
            "x-ms-publictraffictype": "Email",
            "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=m4eGiOU2nibRCeGHslctVNoN1U3Il6Ve/1L42u5F7Ho=;\n b=hcdLFGgXnIYrqOM5GIur+5BLfILiwZfgQZrComBDvL2EOY8D5tP2lCAouEJ6mFJlgagxvr7yg2hEQotFIiSOMEAqFwGjYHhdFn4CUhHy/pKdvqotg0BrHJ+Gs7eAHPMivpwQUPsr1IzrfGerLD/wG0r/nxak8eiaVBQdpM5n7Qxmc/Li0Y5QEe54jf9i9ol6CAORtcp7kgGGypim4bxCrYe7GHBhibN66v9DwkeVPgwJD4B1gQa7uoO9iHsYEClV8ORpjemv91L3MU3R3skORwyrRVQzu2/fxuQnNC0DHufFeB/WfFuud4YmIH9qFTpAZ5BTvZnkR9/OgkhXnag2NA=="
        }
    },
    {
        "id": 115508,
        "web_url": "https://patches.dpdk.org/comment/115508/",
        "msgid": "<CAGDw98n+8HPor+ZXtidbZS1KZgcaDgfgraGFbVbiFXJThmWN3A@mail.gmail.com>",
        "date": "2020-07-07T15:25:13",
        "subject": "Re: [dpdk-dev] [PATCH] acl: Fix RTE_ACL_RULE_SZ macro definition",
        "submitter": {
            "id": 1813,
            "url": "https://patches.dpdk.org/api/people/1813/",
            "name": "Levend Sayar",
            "email": "levendsayar@gmail.com"
        },
        "content": "Sure.\nI am really sorry for not being verbose enough.\n\nFrom lib/librte_acl/rte_acl.h\n\n#define RTE_ACL_RULE_DEF(name, fld_num) struct name {\\\n    struct rte_acl_rule_data data;               \\\n    struct rte_acl_field field[fld_num];         \\\n}\n\nRTE_ACL_RULE_DEF(rte_acl_rule,);\n\nWhen you put the definition in-place, above line means :\n\nstruct rte_acl_rule {\n   struct rte_acl_rule_data data;\n   struct rte_acl_field field[];\n}\n\nThere is another define to get the size of an acl rule such as\n\n#define RTE_ACL_RULE_SZ(fld_num)    \\\n    (sizeof(struct rte_acl_rule) + sizeof(struct rte_acl_field) * (fld_num))\n\nSo the above definition gets the size of a \"struct rte_acl_rule\" which has\nfld_num fields.\nwhich must be\n*sizeof (struct rte_acl_rule_data) *+ (sizeof(struct rte_acl_field) *\nfld_num)\n\nBecause it adds up the sizes of struct components;\n\nBut according to the current RTE_ACL_RULE_SZ, it is\n\n*sizeof (struct rte_acl_rule)* + (sizeof(struct rte_acl_field) * fld_num)\n\nSo my patch only changes the part that I underlined.\n\nsizeof (struct rte_acl_rule) = 16;\nsizeof (struct rte_acl_rule_data) = 12;\n\nBest,\nLevend\n\n\nOn Tue, Jul 7, 2020 at 3:42 PM Ananyev, Konstantin <\nkonstantin.ananyev@intel.com> wrote:\n\n>\n> > From: Levend Sayar <levendsayar@gmail.com>\n>\n> Could you provide some explanation:\n> What do you think is wrong with current version and why,\n> and what your fix does.\n>\n> >\n> > Signed-off-by: Levend Sayar <levendsayar@gmail.com>\n> > ---\n> >  lib/librte_acl/rte_acl.h | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> >\n> > diff --git a/lib/librte_acl/rte_acl.h b/lib/librte_acl/rte_acl.h\n> > index aa22e70c6..d34fdbc0e 100644\n> > --- a/lib/librte_acl/rte_acl.h\n> > +++ b/lib/librte_acl/rte_acl.h\n> > @@ -116,7 +116,7 @@ struct rte_acl_rule_data {\n> >  RTE_ACL_RULE_DEF(rte_acl_rule,);\n> >\n> >  #define      RTE_ACL_RULE_SZ(fld_num)        \\\n> > -     (sizeof(struct rte_acl_rule) + sizeof(struct rte_acl_field) *\n> (fld_num))\n> > +     (sizeof(struct rte_acl_rule_data) + sizeof(struct rte_acl_field) *\n> (fld_num))\n> >\n> >\n> >  /** Max number of characters in name.*/\n> > --\n> > 2.27.0\n>\n>",
        "headers": {
            "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
            "Return-Path": "<dev-bounces@dpdk.org>",
            "To": "\"Ananyev, Konstantin\" <konstantin.ananyev@intel.com>",
            "X-Google-Smtp-Source": "\n ABdhPJwM968V7mH3Nfefo808iCjotxnuyZnNr2PwrIm8jTFJDIRoGoDXnYXphbYj0C46TJ+U7OWTT0ZMYB8gcXskVJU=",
            "X-Gm-Message-State": "AOAM530LH6POxgKtvJ7YdBP1IeDHuo6cjCdta3T7JAyqMH9zvbOAiLIl\n fBcQH6lxpvq7ONDVhQN7od3+rFxS6UnfUCInTEk=",
            "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n h=mime-version:references:in-reply-to:from:date:message-id:subject:to\n :cc; bh=7bOPNTOjfzDr2v6VYvED9lZFWH3Dz8i+lKvp4LTZa+U=;\n b=I7uCO4HEk5lSJRnt3RYUOvX06Ff2I1jw6iCixmqYBm7wjaDNtDg4nRyRYRNMifxagF\n zOfJYyHLHC01Yckr0rTd6RwRDJ3fGOK9xDcm2RXmag8CzL2ytM7GeWyuUF4ER4Hhhlk1\n M8WiWrR7qV/zELMEUO7VazOppuFuRcbRmaySA82TOcW1ZDX5lFcNbOzPr9ykQozlhjbU\n xdHKSS7QWgYhdclV2wWHMD1EvoAOVweFHleV4I3L2n286mQ0bpBHDT/IjAVPN7V/LVEB\n BQbM6o97JO0COSOsAA3u53ZpCVXl1UTR+RyAKDglMXGqGPzveRpIOGuSCNcG9CZ22Z28\n mEgQ==",
            "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
            "Message-ID": "\n <CAGDw98n+8HPor+ZXtidbZS1KZgcaDgfgraGFbVbiFXJThmWN3A@mail.gmail.com>",
            "X-Content-Filtered-By": "Mailman/MimeDel 2.1.15",
            "X-BeenThere": "dev@dpdk.org",
            "Received": [
                "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 2F28FA0526;\n\tWed,  8 Jul 2020 14:29:54 +0200 (CEST)",
                "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0BD711DBBC;\n\tWed,  8 Jul 2020 14:29:54 +0200 (CEST)",
                "from mail-io1-f66.google.com (mail-io1-f66.google.com\n [209.85.166.66]) by dpdk.org (Postfix) with ESMTP id 0468F1DE6E\n for <dev@dpdk.org>; Tue,  7 Jul 2020 17:25:50 +0200 (CEST)",
                "by mail-io1-f66.google.com with SMTP id i4so43519633iov.11\n for <dev@dpdk.org>; Tue, 07 Jul 2020 08:25:49 -0700 (PDT)"
            ],
            "Subject": "Re: [dpdk-dev] [PATCH] acl: Fix RTE_ACL_RULE_SZ macro definition",
            "Cc": "\"dev@dpdk.org\" <dev@dpdk.org>",
            "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
            "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
            "List-Post": "<mailto:dev@dpdk.org>",
            "In-Reply-To": "\n <BYAPR11MB330123DB9DB5F74EAC5A269E9A660@BYAPR11MB3301.namprd11.prod.outlook.com>",
            "Precedence": "list",
            "From": "Levend Sayar <levendsayar@gmail.com>",
            "X-Received": "by 2002:a05:6638:2a9:: with SMTP id\n d9mr54600640jaq.111.1594135549266;\n Tue, 07 Jul 2020 08:25:49 -0700 (PDT)",
            "X-Mailman-Approved-At": "Wed, 08 Jul 2020 14:29:52 +0200",
            "MIME-Version": "1.0",
            "References": "<20200707122643.29222-1-levendsayar@gmail.com>\n <BYAPR11MB330123DB9DB5F74EAC5A269E9A660@BYAPR11MB3301.namprd11.prod.outlook.com>",
            "X-Original-To": "patchwork@inbox.dpdk.org",
            "Sender": "\"dev\" <dev-bounces@dpdk.org>",
            "Errors-To": "dev-bounces@dpdk.org",
            "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
            "Content-Type": "text/plain; charset=\"UTF-8\"",
            "Delivered-To": "patchwork@inbox.dpdk.org",
            "Date": "Tue, 7 Jul 2020 18:25:13 +0300",
            "X-Mailman-Version": "2.1.15",
            "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:mime-version:references:in-reply-to:from:date\n :message-id:subject:to:cc;\n bh=7bOPNTOjfzDr2v6VYvED9lZFWH3Dz8i+lKvp4LTZa+U=;\n b=M0Sls2ilor66U/S16W4MQLDsfZ3OguIhvEDPQHSQPNEGaBg7geOvfnnNIZ7QenWs4f\n 2C4gWM+nuhyOwqqosPzGHgW+MkzFETHiW6JR1GTLPAYwxvEUgnSAlVPPfzgOBNPQNBlh\n 6gUDCHd0Ghg/ICHVZWCguSJM8jKzHoqixyiskVwmUFD7b6iixQwuFaw9Zf/iwjlfoLZJ\n ZtWFPQiNgghPK7pdRpUIAACHFsnfXHuxbFGiMrm2v4xqTp7p/CzWB6RnmYw/wZBMuoTR\n 3RxKwKVB4BKrU2m7VJ54oJRbVAaA0rHAx6Uui9FvkljlSOpjxD8pEJfmDmghn87DtLRC\n vPyw=="
        }
    },
    {
        "id": 115510,
        "web_url": "https://patches.dpdk.org/comment/115510/",
        "msgid": "<CAGDw98k-xy2QD92RrftMyn=h=shdY_JNpvCb=zZ3bW3UGEAuLw@mail.gmail.com>",
        "date": "2020-07-07T16:59:59",
        "subject": "Re: [dpdk-dev] [PATCH] acl: Fix RTE_ACL_RULE_SZ macro definition",
        "submitter": {
            "id": 1813,
            "url": "https://patches.dpdk.org/api/people/1813/",
            "name": "Levend Sayar",
            "email": "levendsayar@gmail.com"
        },
        "content": "Yes you are totally right.\nI overlooked the alignment of struct components.\nSorry for that.\n\nBut imho, not to have such confusions,\n\nAnother define can be added such as\n\n#define RTE_ACL_RULE_SIZE(xz) sizeof(struct xz)\n\nThanks for your time.\n\nBest,\nLevend\n\n\n\n\nOn Tue, Jul 7, 2020 at 7:45 PM Ananyev, Konstantin <\nkonstantin.ananyev@intel.com> wrote:\n\n>\n>\n>\n>\n> *From:* Levend Sayar <levendsayar@gmail.com>\n> *Sent:* Tuesday, July 7, 2020 4:25 PM\n> *To:* Ananyev, Konstantin <konstantin.ananyev@intel.com>\n> *Cc:* dev@dpdk.org\n> *Subject:* Re: [PATCH] acl: Fix RTE_ACL_RULE_SZ macro definition\n>\n>\n>\n> Sure.\n>\n> I am really sorry for not being verbose enough.\n>\n>\n>\n> From lib/librte_acl/rte_acl.h\n>\n>\n>\n> #define RTE_ACL_RULE_DEF(*name*, *fld_num*) *struct* name {\\\n>\n>     *struct* rte_acl_rule_data data;               \\\n>\n>     *struct* rte_acl_field field[fld_num];         \\\n>\n> }\n>\n>\n>\n> RTE_ACL_RULE_DEF(rte_acl_rule,);\n>\n>\n>\n> When you put the definition in-place, above line means :\n>\n>\n>\n> struct rte_acl_rule {\n>\n>    struct rte_acl_rule_data data;\n>\n>    struct rte_acl_field field[];\n>\n> }\n>\n>\n>\n> [KA] Yes.\n>\n>\n>\n> There is another define to get the size of an acl rule such as\n>\n>\n>\n> #define RTE_ACL_RULE_SZ(*fld_num*)    \\\n>\n>     (sizeof(struct rte_acl_rule) + sizeof(struct rte_acl_field) * (fld_num\n> ))\n>\n>\n>\n> So the above definition gets the size of a \"struct rte_acl_rule\" which has\n> fld_num fields.\n>\n> which must be\n>\n> *sizeof (struct rte_acl_rule_data) *+ (sizeof(struct rte_acl_field) *\n> fld_num)\n>\n>\n>\n> Because it adds up the sizes of struct components;\n>\n>\n>\n> [KA] I don’t think so.\n>\n> You forgot about possible gaps between members of rte_acl_rule.\n>\n> Let say for 64 bit target it would be a 4B gap between ‘data’ and ‘field’.\n>\n> So, for:\n>\n> RTE_ACL_RULE_DEF(xz, 1);\n>\n>\n>\n> sizeof(struct xz) == RTE_ACL_RULE_SZ(1) == 32\n>\n>\n>\n> After changes you suggest\n>\n> RTE_ACL_RULE_SZ(1) == 28 != sizeof(struct xz)\n>\n> Which is wrong.\n>\n>\n>\n> But according to the current RTE_ACL_RULE_SZ, it is\n>\n>\n>\n> *sizeof (struct rte_acl_rule)* + (sizeof(struct rte_acl_field) * fld_num)\n>\n>\n>\n> So my patch only changes the part that I underlined.\n>\n>\n>\n> sizeof (struct rte_acl_rule) = 16;\n>\n> sizeof (struct rte_acl_rule_data) = 12;\n>\n>\n>\n> Best,\n>\n> Levend\n>\n>\n>\n>\n>\n> On Tue, Jul 7, 2020 at 3:42 PM Ananyev, Konstantin <\n> konstantin.ananyev@intel.com> wrote:\n>\n>\n> > From: Levend Sayar <levendsayar@gmail.com>\n>\n> Could you provide some explanation:\n> What do you think is wrong with current version and why,\n> and what your fix does.\n>\n> >\n> > Signed-off-by: Levend Sayar <levendsayar@gmail.com>\n> > ---\n> >  lib/librte_acl/rte_acl.h | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> >\n> > diff --git a/lib/librte_acl/rte_acl.h b/lib/librte_acl/rte_acl.h\n> > index aa22e70c6..d34fdbc0e 100644\n> > --- a/lib/librte_acl/rte_acl.h\n> > +++ b/lib/librte_acl/rte_acl.h\n> > @@ -116,7 +116,7 @@ struct rte_acl_rule_data {\n> >  RTE_ACL_RULE_DEF(rte_acl_rule,);\n> >\n> >  #define      RTE_ACL_RULE_SZ(fld_num)        \\\n> > -     (sizeof(struct rte_acl_rule) + sizeof(struct rte_acl_field) *\n> (fld_num))\n> > +     (sizeof(struct rte_acl_rule_data) + sizeof(struct rte_acl_field) *\n> (fld_num))\n> >\n> >\n> >  /** Max number of characters in name.*/\n> > --\n> > 2.27.0\n>\n>",
        "headers": {
            "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
            "Return-Path": "<dev-bounces@dpdk.org>",
            "To": "\"Ananyev, Konstantin\" <konstantin.ananyev@intel.com>",
            "X-Google-Smtp-Source": "\n ABdhPJzDxGwzcwGcoBQhLSSfTs1Habcvjqa7qCgtICDzLckJZU8S6mZrjNEIa3uEULvSKBIutJuclXbjI8zMgRaWB/I=",
            "X-Gm-Message-State": "AOAM532eytpJUKN+pRMVYQIhZZuk0Fl8FEZ5iHr77YB3P6vpaRzkOznI\n iutWBjxDf6+lBjvYzxzAonaIiL1XZOKd3Uk+TSo=",
            "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n h=mime-version:references:in-reply-to:from:date:message-id:subject:to\n :cc; bh=ozFlbzkOw0cbPAvYHiPHzEtk73xd0/9woLankYJzYos=;\n b=lA46khOIoDa6GQe2lsVNVeZY4iVuHhGLXuc1QooQb8JBBoGDkbSOAClJ2nmNkJ5Paq\n 1cL+SkCwxxTN3m26+kPdrzHv8JGZ73iQQkn4GH9g1HGtetUw3o2n4dm6NgA7C50mRbP8\n J9+Kjgs5WK4XmQuNhcgc1Cpg4ddFDceaDaXWO8REJAvtgzD8qwb3ShDlRB8Z9oChWabR\n FjHPFt8dUv7ZEtWRsbeqgvFRd9QBDUvzeQXcxpm/Cu8P7Gt3LQab00rP68stuOcA701X\n kP+Jr2mvYLpogKtyuhpKvpF6kU0qLWU5PoyIkI/VJc6lxNB0uPRDXJ3MKMo+FyWdVQUl\n zENg==",
            "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
            "Message-ID": "\n <CAGDw98k-xy2QD92RrftMyn=h=shdY_JNpvCb=zZ3bW3UGEAuLw@mail.gmail.com>",
            "X-Content-Filtered-By": "Mailman/MimeDel 2.1.15",
            "X-BeenThere": "dev@dpdk.org",
            "Received": [
                "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 37B6DA0526;\n\tWed,  8 Jul 2020 14:30:15 +0200 (CEST)",
                "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 611921DE1C;\n\tWed,  8 Jul 2020 14:29:58 +0200 (CEST)",
                "from mail-il1-f193.google.com (mail-il1-f193.google.com\n [209.85.166.193]) by dpdk.org (Postfix) with ESMTP id A03304F9A\n for <dev@dpdk.org>; Tue,  7 Jul 2020 19:00:36 +0200 (CEST)",
                "by mail-il1-f193.google.com with SMTP id x9so36658511ila.3\n for <dev@dpdk.org>; Tue, 07 Jul 2020 10:00:36 -0700 (PDT)"
            ],
            "Subject": "Re: [dpdk-dev] [PATCH] acl: Fix RTE_ACL_RULE_SZ macro definition",
            "Cc": "\"dev@dpdk.org\" <dev@dpdk.org>",
            "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
            "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
            "List-Post": "<mailto:dev@dpdk.org>",
            "In-Reply-To": "\n <BYAPR11MB3301A55C1DA7913102031C6C9A660@BYAPR11MB3301.namprd11.prod.outlook.com>",
            "Precedence": "list",
            "From": "Levend Sayar <levendsayar@gmail.com>",
            "X-Received": "by 2002:a92:c689:: with SMTP id o9mr37122435ilg.302.1594141235964;\n Tue, 07 Jul 2020 10:00:35 -0700 (PDT)",
            "X-Mailman-Approved-At": "Wed, 08 Jul 2020 14:29:52 +0200",
            "Content-Transfer-Encoding": "quoted-printable",
            "MIME-Version": "1.0",
            "References": "<20200707122643.29222-1-levendsayar@gmail.com>\n <BYAPR11MB330123DB9DB5F74EAC5A269E9A660@BYAPR11MB3301.namprd11.prod.outlook.com>\n <CAGDw98n+8HPor+ZXtidbZS1KZgcaDgfgraGFbVbiFXJThmWN3A@mail.gmail.com>\n <BYAPR11MB3301A55C1DA7913102031C6C9A660@BYAPR11MB3301.namprd11.prod.outlook.com>",
            "X-Original-To": "patchwork@inbox.dpdk.org",
            "Sender": "\"dev\" <dev-bounces@dpdk.org>",
            "Errors-To": "dev-bounces@dpdk.org",
            "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
            "Content-Type": "text/plain; charset=\"UTF-8\"",
            "Delivered-To": "patchwork@inbox.dpdk.org",
            "Date": "Tue, 7 Jul 2020 19:59:59 +0300",
            "X-Mailman-Version": "2.1.15",
            "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:mime-version:references:in-reply-to:from:date\n :message-id:subject:to:cc;\n bh=ozFlbzkOw0cbPAvYHiPHzEtk73xd0/9woLankYJzYos=;\n b=rH7RLooem9zCpWwe8b+81KPpcHU3dUF7hn5fk5v1QGzFzH18SYj24sGu879Zi54pjs\n TPlE9P/IE6rnmgUjgOdJ6qRe61k6IGJ9DkRglHNG64ph1H7xwngldmVt91kulV+hnWBK\n s62RCJMowu4mgyoZuprGp53i2TQCVZUfVhsBmgG0DUqS+Hm+4fudvqx5aE3pxc/TjxFF\n 63dJAWyUKami/Jvxy8t4Dfy4Xa3gkUYIJ52trN0qFyDDXOm4SYuGKxmFd+8K66bsLTUD\n w7BllZ+f7dFQb82N5PxW4xbeTF7tKwmvdqeqLYF70VatIZiHrt48YWQM2Gr8jc78oIxE\n ZM8g=="
        }
    }
]