From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 02B7DA0C4C; Mon, 4 Oct 2021 11:57:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 780DF41306; Mon, 4 Oct 2021 11:57:59 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 1A1ED41304 for ; Mon, 4 Oct 2021 11:57:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633341476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=m5+kjHQfOTlaDrGOVONQTAU9V0i6X601VYXOpY99N6c=; b=OxB0jhNRNlqoLYcEXyzf7UjAXDWePaLWtFA/jxRU14uD6BX/Jk7ctheRngG6waznOUaQ/0 aWoyB6kZuJ9u0K4mtTpvnxnN+hUT/GNMQ+ukEpBtqR8Oo6vKe2Zfi2Z8qyqIVrKcOtnQWk JaBZ+muU/a1mVwxd+tdaWG6ShjIRBzI= Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-404-QUsALxZDP_CMKVwOwSXn8A-1; Mon, 04 Oct 2021 05:57:55 -0400 X-MC-Unique: QUsALxZDP_CMKVwOwSXn8A-1 Received: by mail-lf1-f72.google.com with SMTP id i5-20020a056512224500b003fd2d62dcaaso3668131lfu.23 for ; Mon, 04 Oct 2021 02:57:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=m5+kjHQfOTlaDrGOVONQTAU9V0i6X601VYXOpY99N6c=; b=e6YLogw2M+ZO/nSCv/PpWLztkduKZLPlP90ZedJzdbDXDMJPD8AWbYrxpdCBjPJgQ9 X6+P34OzdQXERhvRtUpoex8dftMIGpB0LuBPmlhGhLzKxMAPUdEJ25+wCkaq6bRY1Zjv l7dGhxWGzIZKMgUVBJQhymhoM+xWJVOzdYVZBPQ/S1Rg8A+/CqANCjZoCZGdF4qSrLa/ yu54+Mk+1SJ9Xjm+EALiTlLTqgo0ZPe6SCJ0KzGHQ7Jv8pVEdDnw5F3La+eBl3UqzyX2 4a29fjJm9lrgIvslMaWGsiF8e1j442I6RDGmVfa8wqSSbBYcR+enYn/ZQIxoreLFp6YC TC5g== X-Gm-Message-State: AOAM530Yt6wAqq1rpib2fsFkC2kFWCavG8tpKN85+3fSRWbehHJXqOBd DKJlkD/RNQtW2oQr/ZmjHyblPxob5wGMJ+VMFt6BKlj5XX8QASq3Wg9RdQvBk16Mxqcm5+GL+3f DBc1vMROg701cMvKZuIA= X-Received: by 2002:a05:6512:a8e:: with SMTP id m14mr13587585lfu.575.1633341473813; Mon, 04 Oct 2021 02:57:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7VVJXczsPXv8V6NaRCmi3/apOmB72NNTp6+ixbmphP3LDAg9/MBJ1ojYfqIrEaCJNH+z9VuFL549CuueofCY= X-Received: by 2002:a05:6512:a8e:: with SMTP id m14mr13587568lfu.575.1633341473581; Mon, 04 Oct 2021 02:57:53 -0700 (PDT) MIME-Version: 1.0 References: <20210826145726.102081-1-hkalra@marvell.com> <20210903124102.47425-1-hkalra@marvell.com> <20210903124102.47425-3-hkalra@marvell.com> In-Reply-To: From: David Marchand Date: Mon, 4 Oct 2021 11:57:42 +0200 Message-ID: To: Raslan Darawsheh Cc: dev , Ray Kinsella , Thomas Monjalon , Harman Kalra , Dmitry Kozlyuk Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v1 2/7] eal/interrupts: implement get set APIs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" On Mon, Oct 4, 2021 at 10:51 AM Harman Kalra wrote: > > > +struct rte_intr_handle *rte_intr_handle_instance_alloc(int size, > > > + bool > > > +from_hugepage) { > > > + struct rte_intr_handle *intr_handle; > > > + int i; > > > + > > > + if (from_hugepage) > > > + intr_handle = rte_zmalloc(NULL, > > > + size * sizeof(struct rte_intr_handle), > > > + 0); > > > + else > > > + intr_handle = calloc(1, size * sizeof(struct > > > + rte_intr_handle)); > > > > We can call DPDK allocator in all cases. > > That would avoid headaches on why multiprocess does not work in some > > rarely tested cases. > > Wdyt? > > > > Plus "from_hugepage" is misleading, you could be in --no-huge mode, > > rte_zmalloc still works. > > In mellanox 5 driver interrupt handle instance is freed in destructor > " mlx5_pmd_interrupt_handler_uninstall()" while DPDK memory allocators > are already cleaned up in "rte_eal_cleanup". Hence I allocated interrupt > instances for such cases from normal heap. There could be other such cases > so I think its ok to keep this support. This is surprising. Why would the mlx5 driver wait to release in a destructor? It should be done once no interrupt handler is necessary (like when stopping all ports), and that would be before rte_eal_cleanup(). -- David Marchand