From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0060.outbound.protection.outlook.com [104.47.37.60]) by dpdk.org (Postfix) with ESMTP id A1FA51B732 for ; Wed, 11 Apr 2018 05:21:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=E0lEmhmMudMBsyk3yLLmhVgPENOe+AW0UaFVJ/+Qblc=; b=HGm5Z8NWbbqG6rvSAi98rHWxKGh0OZzUTQL0+AGL+rOKJJQj1EyWs3KimTkjTCuACXo0wZuDo3Gdn6kRBLitK6QpJwm00R25o9Pv9S3DAN9XXIw1b7YxSoTvy/NAlp3XYYHfDPH2zhXU1LZxHJi7Q7OFW0TxNwQsOKgz6UWmNpM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from hyd1ajoseph-dt.caveonetworks.com (115.113.156.2) by SN2PR0701MB1070.namprd07.prod.outlook.com (2a01:111:e400:341f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.653.12; Wed, 11 Apr 2018 03:21:13 +0000 To: Thomas Monjalon Cc: dev@dpdk.org, Akhil Goyal , Declan Doherty , Radu Nicolau , Jerin Jacob , Narayana Prasad , Nelio Laranjeiro References: <1519896103-32479-1-git-send-email-anoob.joseph@caviumnetworks.com> <1521630685-5179-1-git-send-email-anoob.joseph@caviumnetworks.com> <1521630685-5179-2-git-send-email-anoob.joseph@caviumnetworks.com> <4378194.OM6g8PXIhp@xps> From: Anoob Joseph Message-ID: <10c60587-1215-1101-74ca-48ef24872568@caviumnetworks.com> Date: Wed, 11 Apr 2018 08:50:58 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <4378194.OM6g8PXIhp@xps> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [115.113.156.2] X-ClientProxiedBy: PN1PR01CA0086.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:1::26) To SN2PR0701MB1070.namprd07.prod.outlook.com (2a01:111:e400:341f::16) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:SN2PR0701MB1070; X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1070; 3:qSraIAik7nV6m7Z4LJz/q7+MwngD53kGpc1zFiwOGKafTNtuz5Ng/IOdxn6LRVh6iibeOzp5gXiXChojT7rpPdcmO0z35HFHAJhmTPZa5TAfgi/RNQhUH1dpMhMbOtz1p+F5C1mxtdpIxyBAbjoDFVHF6jPDmgL/v3B7zl4ymgV4neivStq9LjBF1NyFxTVOYlxb/SVD6lFoOWq4tZ7GDTdl610SqD0QtHFwkZpq5wmt2Ve99EcxmI7EOtjUyZAa; 25:2qapWX3Btnm8c30Eb1uD/6aEIGrf4nv6saQGFO5a3za960/f1BapLXy2rK2phrnDjkMHCeNuUBMp67/xBNNRJ6me3DahS7mPtEpL2hIQcU7x0r1CGspT2N0v1MtXRG5uVKJx12zH21JSDxSa3fGqbr32bJfPphnLlcoJOl7F+97a112Kcj0rg0qH+PprlARHJWwfbLqccASJNOKtAFXkMrQGO3eayHFRSyFmup4S4Vo9ANaBjiApSaQrIt4rDYPL5S4UJjl23ggCy4kCecYzmZSePiB6+f+8qyTQiF8ZLYMLSRWlkxhHCDvdMbM4Lk0x89Y1Oio18BnE3ayI6l1Jrw==; 31:8LkqcCyTDOYyvlSS1bcnb5mLI3oP90dJQvGKjnZMEllPqvKUm1PwxbfiZO9f6GIdyaAyRJs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gy8XocauxzDADKveAqoxUmWC5laktSHwiH49G5syIgq7YN3wBmzY+cNLcYSXTeI8Q7NBg+prFkrDy5szbCG0vzN1rN2hrYCA4AtR9CPCw+hRq66/ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(3231221)(944501327)(52105095)(10201501046)(93006095)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:SN2PR0701MB1070; BCL:0; PCL:0; RULEID:; SRVR:SN2PR0701MB1070; X-Forefront-PRVS: 0639027A9E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(39380400002)(366004)(396003)(376002)(51914003)(189003)(199004)(66066001)(36756003)(76176011)(16526019)(106356001)(26005)(68736007)(8936002)(54906003)(64126003)(7736002)(386003)(6506007)(53546011)(59450400001)(11346002)(6116002)(25786009)(3846002)(956004)(52116002)(305945005)(4326008)(486006)(6486002)(186003)(2616005)(316002)(93886005)(58126008)(229853002)(31686004)(476003)(42882007)(2486003)(52146003)(230700001)(55236004)(23676004)(446003)(81156014)(65826007)(53416004)(6666003)(6916009)(6512007)(478600001)(105586002)(2906002)(8676002)(97736004)(72206003)(81166006)(5660300001)(47776003)(67846002)(65806001)(8656006)(31696002)(53936002)(65956001)(50466002)(69596002)(6246003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR0701MB1070; H:hyd1ajoseph-dt.caveonetworks.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtTTjJQUjA3MDFNQjEwNzA7MjM6K2dJTlQ3amxpVFpGZkU5cytib0prVXdp?= =?utf-8?B?aS93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Gsk1Qt4WILH+ZxbHhWv/gjnptyUZDVpjNavD8A5lVTpgpG1ECYFEPfPGXFZA4Qw==; 5:TBB6u4HhJBnj2Gha5pppbEOjmWp+I12KGeo2wwt754l+QrnnhLNoNzkYT/FWWpznlr62W2C/z4/9KpSU5gkgvfWfNyHUc29Z19XLZvcfQZu8WC53ji6LPkdNY7lv0T3bcu3coo7BRldZz3Tq5v9srSgkikj1vxFypmDGPQJe7GM=; 24:Sb5Ze4U0g0TUggtrkPx87eqP7Nijp4kgd/NPs9+FJamoePb/7gfJYe+MilQlI1qzatOsbpJ9P+Fj5+2yd5Vkqi1uo3SVlqWBKWwHQQt3qlI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1070; 7:EsV4VOg/2NTww2yCFfkrvFT+MZdJ/7uxJMyMl6LkyNCCOdpFkid1AfTdERIIHKMvWMfrv8LEeHOP/bzJ4xjPlOn2v/OSNYjz11zEBHm1lTCd4E7N/C3zBi3i5pWiZ1K+bw4G9e/yOnzRgmU0HrOzlBHvOpS15uigHOYtzPUf4V9nZ4yZmpA+3cgzpZ/2uRnkEVnVQXKbgwV3JHbfKOpC4tT9defnixSawcAtIUVctUzWIViqENb3CFHwNCklQhWc X-MS-Office365-Filtering-Correlation-Id: 0632be97-7dc3-478e-db6b-08d59f5b497f X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2018 03:21:13.7374 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0632be97-7dc3-478e-db6b-08d59f5b497f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR0701MB1070 Subject: Re: [dpdk-dev] [PATCH v3 1/5] lib/ethdev: support for inline IPsec events 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, 11 Apr 2018 03:21:20 -0000 Hi Thomas, Thanks for the comments. Will send a revised patch with your suggestions. Anoob On 10/04/18 14:41, Thomas Monjalon wrote: > Hi, > > 21/03/2018 12:11, Anoob Joseph: >> Adding support for IPsec events in rte_eth_event framework. In inline >> IPsec offload, the per packet protocol defined variables, like ESN, >> would be managed by PMD. In such cases, PMD would need IPsec events >> to notify application about various conditions like, ESN overflow. >> >> Signed-off-by: Anoob Joseph > No comment about IPsec handling. > > The documentation could try to better link things together, see below: > >> /** >> + * Subtypes for IPsec offload events raised by eth device. >> + */ >> +enum rte_eth_event_ipsec_subtype { >> + RTE_ETH_EVENT_IPSEC_UNKNOWN = 0, >> + /** Unknown event type */ >> + RTE_ETH_EVENT_IPSEC_ESN_OVERFLOW, >> + /** Sequence number overflow in security offload */ >> + RTE_ETH_EVENT_IPSEC_SA_TIME_EXPIRY, >> + /** Soft time expiry of SA */ >> + RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY, >> + /** Soft byte expiry of SA */ >> + RTE_ETH_EVENT_IPSEC_MAX >> + /** Max value of this enum */ >> +}; >> + >> +/** >> + * Descriptor for IPsec event. Used by eth dev to send extra information of the >> + * event. >> + */ > You could link it to the event type RTE_ETH_EVENT_IPSEC in this doxygen comment. > >> +struct rte_eth_event_ipsec_desc { >> + enum rte_eth_event_ipsec_subtype stype; > stype is not easy to read & understand. What about subtype? > >> + /** Type of IPsec event */ > You could add the prefix of the events in this comment: RTE_ETH_EVENT_IPSEC_* > >> + uint64_t md; > What about metadata? > >> + /** Event specific metadata */ > Could you describe what is the metadata, depending on each sub-type? > >> +}; >> + >> +/** >> * The eth device event type for interrupt, and maybe others in the future. >> */ >> enum rte_eth_event_type { >> @@ -2448,6 +2475,7 @@ enum rte_eth_event_type { >> RTE_ETH_EVENT_INTR_RESET, >> /**< reset interrupt event, sent to VF on PF reset */ >> RTE_ETH_EVENT_VF_MBOX, /**< message from the VF received by PF */ >> + RTE_ETH_EVENT_IPSEC, /**< IPsec offload related event */ >> RTE_ETH_EVENT_MACSEC, /**< MACsec offload related event */ >> RTE_ETH_EVENT_INTR_RMV, /**< device removal event */ >> RTE_ETH_EVENT_NEW, /**< port is probed */ > >