From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 450C31B66B for ; Tue, 10 Apr 2018 11:11:46 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id AD54120B1F; Tue, 10 Apr 2018 05:11:45 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 10 Apr 2018 05:11:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=YU2Kc4V4DxTQtLwMcAWsnaWhQi DdC2fLcf+2sxEHcC0=; b=nnBRIAe1VYfIUSYxQtcTLVPu4T6S0ez96M4Rh2I2qg /ul145ht2cDUO0euAtFhAO/pelRmMZejbkpSdMZDCPttdKMgfJngyTqz6fYOcHoF C+slxdVrcUVLE4rR/mSjIRK0Cj2Z1soqv0AmAlmtHVQ5o5LPbq2Is9/JScuy4UCU I= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=YU2Kc4 V4DxTQtLwMcAWsnaWhQiDdC2fLcf+2sxEHcC0=; b=QF2klVl3ir0LzHhJrxuY9+ 6zvr8PzTChd7AxN+V+dmCH18RUrOX7D3nKcb6ke3qR20S2wmj0UIxogIrrxoFQQi N47Q3OdgQ8YjyAG3myYZhusVUfn/maa96UI2r4U2WuMrAE3RVk2Q/RURib4ueFZD kSzFykVyEN0qH1FniEgq/TTnb3ohNCx440HV4SJj9YP7Dh78w9HFOwYsVKBL/jRI gIKLhr3caf9/JbWHqWnyN9j+m2viRQ8JrfX3LmeiWnRezeUy4Fn2+lwaf6XES1O/ Pd2s82QIQJbw+Sh6dAir4J5bXtlp8TQO4U6Y4ffNn3KClJZRm9MufQbPzy276jNA == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 7DC2DE4472; Tue, 10 Apr 2018 05:11:44 -0400 (EDT) From: Thomas Monjalon To: Anoob Joseph Cc: dev@dpdk.org, Akhil Goyal , Declan Doherty , Radu Nicolau , Jerin Jacob , Narayana Prasad , Nelio Laranjeiro Date: Tue, 10 Apr 2018 11:11:43 +0200 Message-ID: <4378194.OM6g8PXIhp@xps> In-Reply-To: <1521630685-5179-2-git-send-email-anoob.joseph@caviumnetworks.com> 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> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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: Tue, 10 Apr 2018 09:11:46 -0000 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 */