From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0064.outbound.protection.outlook.com [104.47.32.64]) by dpdk.org (Postfix) with ESMTP id 388821B411 for ; Tue, 3 Apr 2018 02:01:04 +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=snkTz4gZwLalWPX7ye/KmubXwasVXtln2CZiXus/qQE=; b=e2oFV1VRUXfChfYBdDJsTLzL0Dx366Cbp7cOrXVAxAlblpeuJiEte3N+HlBHprJUMaMyA9jSAzg3+/AdCsAC0zv0nvC29WiSRWZVvUNtmv+rTbEO4M0DZQ1WSyuztVfM3UASGPbL8ESVHrwFML/in0CUU0X9oYAfRtcXQ8Y9TME= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (106.201.49.151) by SN2PR07MB2527.namprd07.prod.outlook.com (2603:10b6:804:6::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.631.10; Tue, 3 Apr 2018 00:01:00 +0000 Date: Tue, 3 Apr 2018 05:30:45 +0530 From: Jerin Jacob To: Erik Gabriel Carrillo Cc: pbhagavatula@caviumnetworks.com, dev@dpdk.org, hemant.agrawal@nxp.com Message-ID: <20180403000044.GA2312@jerin> References: <1522358852-3630-1-git-send-email-erik.g.carrillo@intel.com> <1522697994-22515-1-git-send-email-erik.g.carrillo@intel.com> <1522697994-22515-9-git-send-email-erik.g.carrillo@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1522697994-22515-9-git-send-email-erik.g.carrillo@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [106.201.49.151] X-ClientProxiedBy: BM1PR0101CA0015.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:18::25) To SN2PR07MB2527.namprd07.prod.outlook.com (2603:10b6:804:6::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 494fc7f5-399b-4148-93c0-08d598f5fd1d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:SN2PR07MB2527; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2527; 3:Fu/PvIu3z84b55LBn5tNSjbcse+oiIonTk+n4/FiYIgu1OcW+aNLSL6pEuCbK/ht4q1cfEUcrKMdgQel3QpFPLbKpXtq6sWG58rwXxs8a3vKqar3Hj7HqAIG4Cl8u4itDxr5j4Vwd9GKwfwOivmG1baL0ijm9MmbTHmNXVTQdxM6HkWQKdraRkYA1iEIM2K6og5KhtxJVko/3SzfwR9Wjil05qLrAhY5IyxLIh9gN6TOOms1WC2QNPu/6e/UhqEH; 25:xVqGmxm5YR49CNV4PdHPvJe75bLiCUFNwUwW/3TRR0aU0dwABqEZZ8Y4zKl9F0fwMuizYAbWIKCxVWLQGynzTTHvQEPT+m1PZiPhdMs5Odk72gptHymd+PaZMqbKo65Qgku3cEdOOK7SzeHy56l+XJKi8MY/Tf/KiPemi1PCwrSqwEzg5vHYjHYkBIo1guLL/mpy3Uad5k+BjKBSJ1MkvFmy6PK2B2sCOKKtKAoHGfRzYRA+ZA+nV4wEZ/peIXXXmeo4rto3ExDUT5IiVZ4eQrjsS+lm+HGDAYMmbHKnRoSx9B5mgpPY3pv+xW7QZtq2HqSzKhWXAU4WnQb4lTJU5w==; 31:dgGB3ufd7E1X2RDizj5JQLZmBrM+qLZfRL+bNBhxT8arTalC3wmah45TK98QFBHXAgWLbtCOMaXST8QRNTShQLCE0Iy1jBxLh50C6tO5K1L34SztQaROnAWNdpH+XGhIYm570Yae5A58rEL1K39x4slWri0omscdIQ3+MJW+aFUzn0fJbSm8LlMI2xTJTgMmYxPUkXtDOBq1XzCvSpt/6gL5/i2JT2Tv1Fde/WC90Ls= X-MS-TrafficTypeDiagnostic: SN2PR07MB2527: X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2527; 20:ImoNrTuV6QjA6YH/Fqz7IJ2lNG88qjHFj69NLGfitYpOMW64lTQ8148W3k8xeGfl3hPtj2nUU/TCpKvh9H1lRqYxJaeuQ/M3j1+qzlqnTtOMgmomwpHG8SoHOlGry0FAqOL10O4e0ePCbARj1m5elkgdjajxsD27563ponH/EGpvquuiL2vTtf4xgJRwh/t6+IoPGnqP6s2e5IQ6Tl3F50XhMGFyhUaqER1BPVDRRJeDrOmyO2BSK+Smlq+70ZLgDufM/nGThDji1qnORaYWqYIhVh8crh88LwJrJ7nPNksKRySt+/DLJheq6eLM0z8gKOpGL3IVb1P9DUr0bjAK6MspqNeL7Ji3Doe151oFc//ZFW5ZK3tepRZCD0+9geladLFnP3oE8Ypmn+zy/jEEQA6GTloMTYc3tDZd/ggC4lxPMIY9YIXmoZDnj7n0fQKMlOjOmvMpX0+9RLJKv7smimr5AE3qptVAiWqsOZPPM35qFF+m15Cz/zqNnVomQ6yYZ1MgsddK4T02uO+p+iW3gNhAPCX77N8x5j0YgUO4SSR8V4XdaPIetyQrR6dI4hr0+k8OUaQI7SRSw9UH6geqeLl/4b9ewGtIbDxMOPUKQaM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(3231221)(944501327)(52105095)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:SN2PR07MB2527; BCL:0; PCL:0; RULEID:; SRVR:SN2PR07MB2527; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2527; 4:+NEi8eZKV90rlcM3seaDSZOb8vnthJAmYZpQgVv6+GfKBzR41MQtEtGYh8UPAHdWswJ36cqR1tKvH+o4w7VeE5L/X3Lm0N/GiLZKE9FVldsMp5IaM4qCvtV7SfqLcu5gQlgdPdWPbVRvfm9I8Q2NGqEBPUt4wI45ZVBqSBECL4pHaPOINZe1YOfoHocsbR8DwVAaW8kxXJuzr+h+WMUBN2FAZRxOUpMI9tINpaUgMv72ecpZmy15liVnWttpoPmfrWRUh14T0xUfQvjW4/5T58CfANDUkvJC8W7/pivk+iKRxobUc4ytRxt5pRG3f/Bu08p731At1TEwG1i75MkVoIBatg5OEQlHlk5B15CuqNU= X-Forefront-PRVS: 0631F0BC3D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(366004)(39860400002)(346002)(376002)(396003)(13464003)(189003)(199004)(6916009)(6666003)(956004)(229853002)(4326008)(97736004)(106356001)(5009440100003)(105586002)(23726003)(6116002)(55236004)(3846002)(55016002)(52116002)(11346002)(9686003)(8656006)(16586007)(53936002)(476003)(486005)(6496006)(59450400001)(486005)(6246003)(33716001)(25786009)(58126008)(50466002)(446003)(316002)(76176011)(386003)(33896004)(33656002)(8936002)(186003)(1076002)(8676002)(81156014)(16526019)(47776003)(66066001)(81166006)(7736002)(305945005)(26005)(5660300001)(68736007)(478600001)(72206003)(2906002)(42882007)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR07MB2527; H:jerin; 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: =?us-ascii?Q?1; SN2PR07MB2527; 23:0hi2a30XSogz0r+JCH8FXKPIGWkK9jsxxP+OfJm2J?= =?us-ascii?Q?7QW28zcGiZ5brHV7mxTgKhNoepTohq3CFJ8G8jgpUQXEAbj+mRYP7g7T9OQt?= =?us-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tJu/rm5+LVX?= =?us-ascii?Q?EOC5cPQamZfC9jUWWCxci92S4RjGZNx70f15xL+BRbMMd0PL34ZKMIYqcQji?= =?us-ascii?Q?whKc3eqIwG5C7l7BLKjR072UoA7rIvX5YIEEuhDBz1VBSAX3SP0zOySMkFdx?= =?us-ascii?Q?tH1RZ4GVfNWO5AxgOICDH/u43zs0xW4Xgzimm40+efBKY5PXDJETNgEDuK9g?= =?us-ascii?Q?DfVF0X4RGv6JV6YnfcDLjsa39BN033T5u5Co/ZisEfWoWHmSFFFWABlgq8bU?= =?us-ascii?Q?13oP2sSHRUA90YN+/gT1b9nHeaoNMyNnP5FtFkyuteiXfZHUnb8HDYdm5jtW?= =?us-ascii?Q?djZi20LET7mriUWAJBPiuLWe6qjA5RBYLpCTxqssGauvpqDMGph9rl3xczKV?= =?us-ascii?Q?GSKZwQjfiqlqCjQNXk3z0uU/07zL7+bKq7oLivuWyji+rHhWUh6v0VCBlW86?= =?us-ascii?Q?dqBhmQNeA=3D=3D?= X-Microsoft-Antispam-Message-Info: udNr0JU5lHiMHm1n3o2KvHfrCArJJXs3bUJ/7ywpgSpDT0EU9LFpIu/3y2XPHf7bHwqx7CTQcUMoMQV479Nk5FxxyslolrOaSBSJ15VIOtdqqq08D9AuinHiujFChOLxuDiCIUQSav9Gy/P7XI32DedaD9mD32qY0EuFUaBaLB1h3yoMJzXjWYrv3qx6Z0Db X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2527; 6:8ZXRNBG4M+Q3qrA3SE5Q7BOBGVCSYihkCDatml3dv6/URD/r0fXRZgHyFx7JQ5b3rtGqbN+uH3sMOM+Q0O9Vpokmr9mgUD8gYH6rgh2F33TrWevAXegR+CgAZ16EfmiLi5THGfEtTMeAGPmAwYNkca/uDqdfggU3KLZ6PWvglNNKUERoaG8jHrxsgsl+3sNj834fkDxbaVbmtNlDxwDiMVgEUMBvowxusMjvBF4oBAcIZe9F9tykSvihofefswHhuaYOZigroNSbHb55cfsdZTGXotHcgvHY80fm1MXOwly5q1ACNkhizuqoZw+4vhSBzONcdBKenmDQKCRygGHfh1823551xffo6v54nKCkFrCmApidb9ohVjtqK2UYV0+qWhKJ4zrLYVZ+/ALq65jFpxxXirLa1351Gnw+w1GI9DH2HYo1oVr6IeWzVMv4EEKe3dtwTWvqrcMxaBcuM9V+8Q==; 5:Al/moWq5IpqhMiVyHI6o5n6daS/xOgs/NC1R/Babb7UvzDwSXVxGEL3QYpwkIBZhCE9bShRDschtCpybl39lCFxpYCXzP5rT1lnHSUkyZ79xBlFVjnpZDteKKAU+R5UTlFCOspLS97cRL5SZo3WLRk16bgSDmtCZIfV7tIZJoh8=; 24:REYuzEmlzIvi9QsTU9pYOc2EqZ0asHeyPhiA4OVgM1xEeTwlyudzdG3wPZOvyGH4IFgEXbNAOz3pa5hLXJL2d133O5v2dfdtRo9qlY/y254= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2527; 7:uC+LQSpoI/4jzzvMKez9U+QXWBpXgmn7Ys6HZZsAbY+2pFkFattGlt3gW/c3wZ8jnnmxq6ACO5o2bfP6Tqra80S0r653q9LqfHdETPHO+CHKUV2Y9YqDLGG9yxzym1ItHpR/a57xffADARkDIggiXfQUcDLViuxq/xQxOO4CaTRzTxStQlqUDLTluhPkMIbRi2clAc7oPfHXc3cqulMJ5BGZ/wTGD4G8TQ0gi0ECp9QnFR5clr+IeCpSEd2Klyq+ X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2018 00:01:00.6589 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 494fc7f5-399b-4148-93c0-08d598f5fd1d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2527 Subject: Re: [dpdk-dev] [PATCH v9 8/9] doc: add event timer adapter section to programmer's guide 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, 03 Apr 2018 00:01:04 -0000 -----Original Message----- > Date: Mon, 2 Apr 2018 14:39:53 -0500 > From: Erik Gabriel Carrillo > To: pbhagavatula@caviumnetworks.com > CC: dev@dpdk.org, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com > Subject: [PATCH v9 8/9] doc: add event timer adapter section to > programmer's guide > X-Mailer: git-send-email 1.7.10 > > Signed-off-by: Erik Gabriel Carrillo > Signed-off-by: Jerin Jacob > Signed-off-by: Pavan Nikhilesh > --- > +To create an event timer adapter instance, initialize an > +``rte_event_timer_adapter_conf`` struct with the desired values, and pass it > +to ``rte_event_timer_adapter_create()``. > + > +.. code-block:: c > + > + #define NSECPERSEC 1E9 // No of ns in 1 sec > + const struct rte_event_timer_adapter_config adapter_config = { s/rte_event_timer_adapter_config/rte_event_timer_adapter_conf > + .event_dev_id = event_dev_id, > + .timer_adapter_id = 0, > + .clk_src = RTE_EVENT_TIMER_WHEEL_CPU_CLK, s/RTE_EVENT_TIMER_WHEEL_CPU_CLK/RTE_EVENT_TIMER_ADAPTER_CPU_CLK > + .timer_tick_ns = NSECPERSEC / 10, // 100 milliseconds > + .max_tmo_nsec = 180 * NSECPERSEC // 2 minutes > + .nb_timers = 40000, > + .timer_adapter_flags = 0, > + }; > + > +Arming Event Timers > +~~~~~~~~~~~~~~~~~~~~~ > + > +Once an event timer adapter has been started, an application can begin to > +manage event timers with it. > + > +The application should allocate ``struct rte_event_timer`` objects from a > +mempool or huge-page backed application buffers of required size. Upon > +successful allocation, the application should initialize the event timer, and > +then set any of the necessary event attributes described in the > +`Timer Expiry Event`_ section. In the following example, assume ``conn`` > +represents a TCP connection and that ``event_timer_pool`` is a mempool that > +was created previously: > + > +.. code-block:: c > + > + rte_mempool_get(event_timer_pool, (void **)&conn->evtim); > + if (conn->evtim == NULL) { ... } > + > + /* Set up the event timer. */ > + conn->evtim->ev.op = RTE_EVENT_OP_NEW; > + conn->evtim->ev.queue_id = event_queue_id; > + conn->evtim->ev.sched_type = RTE_SCHED_TYPE_ATOMIC; > + conn->evtim->ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL; > + conn->evtim->ev.event_type = RTE_EVENT_TYPE_TIMER; > + conn->evtim->ev.event_ptr = conn; > + conn->evtim->state = RTE_EVENT_TIMER_NOT_ARMED; > + conn->evtim->timeout_ticks = 30; //3 sec Per RFC1122(TCP returns) > + > +Note that it is necessary to initialize the event timer state to > +RTE_EVENT_TIMER_NOT_ARMED. Also note that we have saved a pointer to the > +``conn`` object in the timer's event payload. This will allow us to locate > +the connection object again once we dequeue the timer expiry event from the > +event device later. As a convenience, the application may specify no value for > +ev.event_ptr (rte_event_timer_init sets it to NULL), and the adapter will by rte_event_timer_init() has been removed. Either re-introduce the function or update the programmers guide and fix reference to rte_event_timer_init () in patch 3/9 I think, you made correct decision to remove rte_event_timer_init() as it does not have much use. So it is up to you to include back or not. Once above documentation is fixed, you can add my: Acked-by: Jerin Jacob