From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6ABB3A0518; Fri, 19 Jun 2020 16:00:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C74531BEA5; Fri, 19 Jun 2020 16:00:02 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 2A64B1BEA5; Fri, 19 Jun 2020 16:00:01 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05JDv1pf032474; Fri, 19 Jun 2020 06:59:57 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : mime-version; s=pfpt0818; bh=w7hIz93kwxOJQH4lccLLXI3u/Hh2NDwhx/NVqDOd18I=; b=sNUoA5zx3BwvHkrKwgsdyvF3JYi219l9uQ+edzN6q6bvk75nQDDPqJvIHGcVn6/h0W/N /hrveiwq9LsQp0OyizvwIVx+l2Ys87eEKYbuySzOdinXX+hq8qt7CSOM23YizNT9tR+/ UmtoEoFudu83F7dvMqobVUR9O7NR1FnJjwJae+y7xjQnqusWuMEUfAqlD1ScXeslnNO1 KY5VunpG7MqhQVoOuJHpEyXGrkuRDOVZuwlk5C+FBZk/5aTuNnrp8ZVpLhXxjrF4R/9c AxgmedUQsZyX3fzlQn9xeF970OzghGfukppDu8b+5/PJwSEM/pcSpRr4hZeBS1jr0JSe ng== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 31q65908wj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 19 Jun 2020 06:59:57 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 19 Jun 2020 06:59:55 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 19 Jun 2020 06:59:55 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.174) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Fri, 19 Jun 2020 06:59:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KCeku6Td98jHxAOWSuBln0fcmp4xnNH3s4n+lHspAZrjEgnqejH3OE+H5BCxI1BnVFGtwXec6H1rirzry1ntrmucIgauqP14MA2gHZOIElhpJ7Dr9o5HSSFMqmyWOC4TxhwahvXpuFhlmxVgfvfTvR86sD4R4GOhhM+PoecNQ+WSb3qpFF6/OmmoSAz9SeM7DCwT81OrNonxCXQ6L8YhxS8t1sYFlC5w5raTv+dDZvD8VL0LGLir9kslrFeDTpEIYzd+yJh8xXUYGV6rt5oMAEAhVk3WmyngsYJvSst/zKZ1fcUgMIOWkfejbJaCpDqInUOd5nAYWk052coYTU2vGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=w7hIz93kwxOJQH4lccLLXI3u/Hh2NDwhx/NVqDOd18I=; b=I7Bm7oE/H8hcsyayX7sPPKHH+RnpGL5VyppNjCmTGuDD/JjLmU4jfnKdCQpV/BrQpbVyGKaR/838AsIFd41wlTuBdfmUMccpgbqgAKIz6fyT23ox+If7qe+ne9VgFsWNW3XlVbjA2y6HT41auvJhIkH4qW3Byo2bPxOLus3lScoHX4Dvq0Dc8+pvQUv3BC3jGeKXPykSqsJv9ZhHbP9do8kkjssbtA0D5WRXtwig15VXQ7zfkUP0bfApSI0PJ4boNE71I/cMZ+cY1NQkOx6OiX2nGwVyowndmm4mQ/IdznRB6NXfZsfoP04xdkf5UuAoW4l2zqsMEGW5bi1sufYSFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=w7hIz93kwxOJQH4lccLLXI3u/Hh2NDwhx/NVqDOd18I=; b=qtyX3eo+cd6Dgxg7poxdrN1PAIYqmX0nN3NW74P5jcjTVvsljtczhUQkTd3Ea0FCdg7FIOGblUgwoy7Tk1hhihJg+ex9L1ujNi+4bIlzPamr5LB91WfBjVzNxVK+fJ0enO8UJKdhZZYQHuKTvKRI/jlOEWQA0bL1pWImkq5MoRE= Authentication-Results: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=marvell.com; Received: from MWHPR18MB1070.namprd18.prod.outlook.com (2603:10b6:300:a5::11) by MW3PR18MB3580.namprd18.prod.outlook.com (2603:10b6:303:55::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Fri, 19 Jun 2020 13:59:53 +0000 Received: from MWHPR18MB1070.namprd18.prod.outlook.com ([fe80::e895:bdac:e157:2ed2]) by MWHPR18MB1070.namprd18.prod.outlook.com ([fe80::e895:bdac:e157:2ed2%11]) with mapi id 15.20.3109.023; Fri, 19 Jun 2020 13:59:53 +0000 From: Harman Kalra To: , , CC: , Harman Kalra , Date: Fri, 19 Jun 2020 19:29:28 +0530 Message-ID: <1592575168-16881-1-git-send-email-hkalra@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <2674031.7s9Q9pJsto@thomas> References: <2674031.7s9Q9pJsto@thomas> Content-Type: text/plain X-ClientProxiedBy: PN1PR01CA0078.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:1::18) To MWHPR18MB1070.namprd18.prod.outlook.com (2603:10b6:300:a5::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from hkarlara-OptiPlex-3046.marvell.com (115.113.156.2) by PN1PR01CA0078.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:1::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.3109.22 via Frontend Transport; Fri, 19 Jun 2020 13:59:50 +0000 X-Mailer: git-send-email 2.7.4 X-Originating-IP: [115.113.156.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0bd73856-07a3-44a4-e2d3-08d8145909ed X-MS-TrafficTypeDiagnostic: MW3PR18MB3580: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-Forefront-PRVS: 0439571D1D X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: C5NfH/AdTumrcPhS1i/IRLSBmjO9eMOo0k9NHVl8J+2D7HGWNLxaR0RybWIXLoQwrvJOyeFsRmjuPJB9cH2NhnrnQgTrFKX3eYumzT7zurCk2bbD0N7ZKWe8Clhi2PKI3A4XqvdnLXOntxI35GSCvvUsMYC+S8Mse/WGBoOqAgrWiRBPpbFLsWqQisZbCNrXdWXgqa6GcLOjqT61YEPwXqyHSIV22tKZ0dMTJNsqLMebHgeDgeel1m5TOnMUTD+X3TKlcNI4hlxwz6CylU/yfWX9g8iu5ZbNqQxikc+g9veGDbkMdHFwuLEUtbc3u9FJFiey0VjSPCbgSCD5HhLj8A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR18MB1070.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(366004)(376002)(136003)(396003)(346002)(86362001)(36756003)(2616005)(956004)(52116002)(7696005)(6666004)(6486002)(5660300002)(478600001)(4326008)(8676002)(8936002)(186003)(316002)(16526019)(66946007)(55236004)(66556008)(26005)(66476007)(2906002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: BDzIdiXTPO+mO76zNt/+Up6QxTtvZaWyakEZosXo7+qAVwk1zIZg0vSr7kELPhFaQ0vnMe992rUE9OkijNfSGhq1tzFllViD9SWRt8Hf+cLPtYK6hEpjS3ZIDP0sYh1EvpS8JYLt6cvDsO4fv4hYylzBuCGxFBs6zMdZa4YREVoGPCPRQRCLle2ODUoo0ISVVTkoC9vnVDfH5HniUt+RR2ITg2YDTCjiw1VE51yObIy/ziwwb64m9UYvUqpvWDk4jspG4xqYkwFWVQKeBoNcMlZ0w8g6HkIZmIrkxq8BY7dF2IRNPjqlDPMAkQhMMbwOvfV7L4K7pgMVIDcWOE/asQN+Uy1m+92HiEg6JN11IxiKhL3QB5Tu5HdgqOY6Z3nKMNo7Sx8/uvSUtdK8iwQ+0o7l1CWw+IWfsJOClVZmgR85w4BnzUFqz2kW2qAsWdHyXGwa1CFN1Rn2M4yxTeYVkyIDP+xQk5FM4NPlA6imBQE= X-MS-Exchange-CrossTenant-Network-Message-Id: 0bd73856-07a3-44a4-e2d3-08d8145909ed X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2020 13:59:52.9442 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: V6SKTBoLglXRRx7E4YBuc5Y+chrEfwyQsPBqjsaYYeUsOQ+FaZfXNa/ywDZKDA/UkaM/74MWdTLiOlzKWeNGOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR18MB3580 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.687 definitions=2020-06-19_14:2020-06-19, 2020-06-19 signatures=0 Subject: [dpdk-dev] [PATCH v2] eal: fix epoll fd list rebuild 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" An issue has been observed where epoll file descriptor list rebuilds every time an interrupt/alarm event is received. eal_intr_process_interrupts() should notify pipe fd only if any source is removed from the source list i.e (rv > 0) Fixes: 0c7ce182a760 ("eal: add pending interrupt callback unregister") Cc: stable@dpdk.org Signed-off-by: Harman Kalra --- *V2: missing closing bracket in Fixes tag in V1 lib/librte_eal/linux/eal_interrupts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linux/eal_interrupts.c b/lib/librte_eal/linux/eal_interrupts.c index 16e7a7d51..84eeaa1bc 100644 --- a/lib/librte_eal/linux/eal_interrupts.c +++ b/lib/librte_eal/linux/eal_interrupts.c @@ -1010,7 +1010,7 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds) } /* notify the pipe fd waited by epoll_wait to rebuild the wait list */ - if (rv >= 0 && write(intr_pipe.writefd, "1", 1) < 0) { + if (rv > 0 && write(intr_pipe.writefd, "1", 1) < 0) { rte_spinlock_unlock(&intr_lock); return -EPIPE; } -- 2.18.0