From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0098.outbound.protection.outlook.com [157.56.110.98]) by dpdk.org (Postfix) with ESMTP id 9A3BE569C for ; Wed, 1 Jun 2016 11:15:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=gcoJTkbY6REpp/cY3TL2+LLNjBrWAnekCC5mFrmnkFA=; b=EoXGIWIM4GNKauVeLaVqViuH33rh8/jQFMvhujlgL5/Tr7dbWSiG3H5qqH4EanUZ6RwA0qG/aZgc9vPPYZAmWvyDsFSuIjuHbYFKX/RvFtYtd0HjkkP5bOJYJNwNjGxLnZOt/yrhtTYtviCGa4xEj5MFY9FO8RbREN7hbIrWtY0= Authentication-Results: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain (111.93.218.67) by CY1PR0701MB1727.namprd07.prod.outlook.com (10.163.21.141) with Microsoft SMTP Server (TLS) id 15.1.506.9; Wed, 1 Jun 2016 09:15:14 +0000 Date: Wed, 1 Jun 2016 14:44:53 +0530 From: Jerin Jacob To: Stephen Hemminger CC: , , , , Maciej Czekaj , Kamil Rytarowski , Zyta Szpak , Slawomir Rosek , Radoslaw Biernacki Message-ID: <20160601091450.GA32268@localhost.localdomain> References: <1462634198-2289-1-git-send-email-jerin.jacob@caviumnetworks.com> <1464540424-12631-1-git-send-email-jerin.jacob@caviumnetworks.com> <1464540424-12631-3-git-send-email-jerin.jacob@caviumnetworks.com> <20160531095355.7a625ce8@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20160531095355.7a625ce8@xeon-e3> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MA1PR01CA0034.INDPRD01.PROD.OUTLOOK.COM (10.164.117.41) To CY1PR0701MB1727.namprd07.prod.outlook.com (10.163.21.141) X-MS-Office365-Filtering-Correlation-Id: b577d6df-8944-46a7-1140-08d389fd4126 X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1727; 2:lV3y725hhZKsdm5J4x0EgNeiHe1z7mugGQyx9bFWOtZLDFOK9vMaEMw7jTjutOk/97ipU0hl5htsm7uQEZid2c2rQ6Zig8MpgmMZBaj7tlLlapd6YK2Ic/vU7doBf5Sj2M3K1cY/ii5StFyqCM4YDfbzWm/sbFpIV6sULJPTs9hGksSxzFJwSOsFU9SbqM9H; 3:e0N41VKsZHHEvWGm0Pzl7UrGmjlLhXpuXggSQrMF03asUWSdLpRxbt1EQSt3cC6Hh6umtje/8iThDvLBcAgwku3v6lnrj2RKPq90xSZi1G1cvrutKpw+qwJxazJ4Mb+Y X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0701MB1727; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1727; 25:sGek1046/kKjVUaXcy3Rsv+8ljZhHOob9cSUa23dSI/igvCjIpgvQbneXYDTyjQypahhx7vRmXZFa3N0Bne94VwD+Bx5zyLZ91yNgf9cyOO4eDgs9ud654iv+NCM3jqFGlvB02FlfHgxxuRVosLjAqVLMV21ec5wZSvtjk5wpAGZ6HbQCY2lqhUpDPPsVaXgCM27zuQ6OyaXn+RAH6GdJSvvra4JwZ1FbewN2ygsENoyiXm0AwIi7ZKnJrt86tKgDvZoW8OVPC+XayqaMe/8B+C8Q/beLwWguYOjYtuLzvVp5ZCb3B3vnvim6a3ODMruLeXUvq5tVq7nZKov/X9+GVLmkKyunYXdZF69q8WPL/jiFPtT6guOr/BJr7owrl+cgwgLSjJJs5OV+v40XLAneQbTjNiY/ZS34jgl68uc0+pDKnmqb4iiAxgQxzbSkK3W8gD2m8BDi5+c+Ja5uSrTDnt4M9rgCZr8AsJud1b6WGwemhduCZJiuLFrBJMQ27PO1TBehcteGrwruR0KYjZRwQrz5daI9B3MQmnz4q3n7EE6E1jgMOF8guY6HvnOa28VErWVN8kvVMqFbJ2GPu9gs4033qOn/A09YdUsz6HDnK5vClCknn9ZhuCQrGSmm1Udp+/dHIm9CB9mWmOqrlGlxF0IrmkFjwq2ApWJhW2pw4raVW2o0zY4Y6MChPGSyz5Kjckr0x7gnUHrbzeYJuBWt8zI8MD0aP5nTZUVlvkEuY/LbokMbj1dEvkqvKDK9a2e X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1727; 20:0FIMwe7/ezFyPzkHS5ftjlmDykfR08ianqiVAQBGxoYrM5iW/B3+S1SN57w5k8O7hoGYeawwoaDr/4NKvgA+BFvGfxOmEUGFkI/KlvaqwU2e3812iF2M97Dk/YZllEVgj6BfZCZczb7evVGljXJL3XbPFtDeCZDdS2f5Caq81mIVTyZAsR2/b0VSpkFJsj4ds8WxqpTTAZXVDSss6Zmh+9r44aodYoUnVRhhQu8CPhWWdYSFOdsOisfiuAoPd4nQnxdda1cywvG0ayNX8L7Okka3YXB5KqSAo1Qo0ETxEutUVdflHWlaRbGg19hTLqz9TkHG8YWtzc1zUsYJcRAl3R3nHReI8dtGarc1LUVF0S/bcrZRPNvGR0vvErMSY3USsr0+CYDPUDQhEFBZRUucNCEqY+P4ueO1y5ch0NKbzkyT49EU2Ivuj647f7+Zpgsf6GH7LcseC3Umr8ySm1WQQtYclffmJZq/F0zf7dlJrPDz/V17cbArORMhLh3NbzfCvD6JrLg1dcMpnjHe346GOkzxpin3L6X6jyRfHYfMJ07drC6lKdiUIXbzGhsQDpEog9oM3mU3PVX/d76jm1lp8XLuoZAaf/WD63fgUXtaDSk= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:CY1PR0701MB1727; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0701MB1727; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1727; 4:zYaVg12gWs85qEF55NAev843K+3ZZ5S3qljXXYrwhGw930D1IaKLKiXFxMeX4ptuOPYmV2CJDIR7l7IEYrXP9Macl+6nkllZkE4cGfxPjnCH5PA5BQitd0LLuc6uzrqrj542TCGHNLqy/meOIQBdnra4FQ0+Jbu5Kr/WEO8TAqUHay4vgGxzH51BFKdlhuuT/wTVRR0m48M8h3RSARNw2ZY0Tc80y97FTTkffgpS0fgSC6vmyl0UYRrUKLxy0JqEPNaelQNZsAJuzz3+DJ+7p7pnCbIs5Ub8WL5Qxdu2xM0C2KZOcvYsjhmEE9f/rzr2Go6v4QRcqEI03WW85O37s46PlYZN9nZiVpfx+sOuUeFzUWxzIQ/Y+a2HEbeS1qIi X-Forefront-PRVS: 096029FF66 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(24454002)(8676002)(1076002)(23726003)(50466002)(5008740100001)(189998001)(2906002)(3846002)(81166006)(6116002)(586003)(42186005)(4001350100001)(92566002)(110136002)(47776003)(19580395003)(46406003)(9686002)(2950100001)(19580405001)(77096005)(54356999)(5009440100003)(66066001)(50986999)(5004730100002)(76176999)(33656002)(4326007)(61506002)(83506001)(93886004)(97756001)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1727; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1727; 23:IHujcdayy4dpFzI/l4DunQVRc6O2LUCC3pYmGMC?= =?us-ascii?Q?6szsE44yaJx/VyNDYIgihgOYWyPzf+jMPRzscx/BDfJuyTbdhvVk/J+hviWT?= =?us-ascii?Q?Q2fbHWNL4VyREK/gizMKpQa8EVNGc48QIJGeYLmcCKrmv+SGFhXk4pQXiwZy?= =?us-ascii?Q?smWFELaBt2/AQzmIsX4id6OJ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ange-Diagnostics: 1; CY1PR0701MB1727; 5:EVgHBq/DkFJVYdi+ZR9bkNkHS0RrqLyCZclYyD+JD3Yw0sXFskuN8deGChYHoTyRxxfedm+aUVmnzN6p5/2KfQ/KMP58ZzPZpKsChPb+FmRM7WhhTk2/MwB/pUkKhis6IOCjp0UQeI6ME9ntafgjBw==; 24:YXHMJpufOO8UlHyFIoeluM+T5WL0xMVY5xHAfGk4GZS2DDZQ/hNqjIgn0g6+V2woIOYTOZJQ7itH+cYGDu0yPwLNUZxobEwXN5vdfXj0xng=; 7:2zMo2cxsyqyNA04bHwlSgRiNA+l8l4TGVMYRTke0wJtQYWbB3eS3e0/2zC0nObbfh9oHHcWXuh8vOt/r8rEGndZUkqfv7YA3qcEvBKm1EPNs3PUs8erbYXhCqmTBbp6mpou9JdE78y00KDaen3KrjLx/QHPVuu5kNXJlht6z17fo+ROI+O2xmwu5uAkOc2lE SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2016 09:15:14.6957 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1727 Subject: Re: [dpdk-dev] [PATCH v2 02/20] thunderx/nicvf: add pmd skeleton X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2016 09:15:22 -0000 On Tue, May 31, 2016 at 09:53:55AM -0700, Stephen Hemminger wrote: > On Sun, 29 May 2016 22:16:46 +0530 > Jerin Jacob wrote: > > > + > > +static struct itimerspec alarm_time = { > > + .it_interval = { > > + .tv_sec = 0, > > + .tv_nsec = NICVF_INTR_POLL_INTERVAL_MS * 1000000, > > + }, > > + .it_value = { > > + .tv_sec = 0, > > + .tv_nsec = NICVF_INTR_POLL_INTERVAL_MS * 1000000, > > + }, > > +}; > > + > > +static void > > +nicvf_interrupt(struct rte_intr_handle *hdl __rte_unused, void *arg) > > +{ > > + struct nicvf *nic = (struct nicvf *)arg; > > + > > + nicvf_reg_poll_interrupts(nic); > > +} > > + > > +static int > > +nicvf_periodic_alarm_start(struct nicvf *nic) > > +{ > > + int ret = -EBUSY; > > + > > + nic->intr_handle.type = RTE_INTR_HANDLE_ALARM; > > + nic->intr_handle.fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK); > > + if (nic->intr_handle.fd == -1) > > + goto error; > > + ret = rte_intr_callback_register(&nic->intr_handle, > > + nicvf_interrupt, nic); > > + ret |= timerfd_settime(nic->intr_handle.fd, 0, &alarm_time, NULL); > > +error: > > + return ret; > > +} > > + > > +static int > > +nicvf_periodic_alarm_stop(struct nicvf *nic) > > +{ > > + int ret; > > + > > + ret = rte_intr_callback_unregister(&nic->intr_handle, > > + nicvf_interrupt, nic); > > + ret |= close(nic->intr_handle.fd); > > + return ret; > > +} > > It would be good to have real link status interrupts or just report that > device does not support Link State interrupt and let application poll. Having another > thing going on (timerfd callback) seems like it would add more complexity to > the environment of an already complex thread structure with DPDK. But we would still need some polling infrastructure for some 'async' mbox events and error events from PF.So, I think I can change to rte_eal_alarm* infrastructure like bond pmd driver. Will fix it in V3. > > Also, timerfd() doesn't exist on all OS's.