From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by dpdk.org (Postfix) with ESMTP id 3BACA3B5 for ; Sat, 6 Jun 2015 01:16:13 +0200 (CEST) Received: by wifx6 with SMTP id x6so34377781wif.0 for ; Fri, 05 Jun 2015 16:16:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7THaHktotSCyhclKtuvBTbYS9LInN+3ZBwYP8bK3SEw=; b=iSBAELrPfut/B11CRCiDmAxcdXudGuBd2xmOdLuVRf85WA6vr2ZE5MCcO5E8744Swy A/DLuShIFQMeA319XbrmA66iCd5Hg/YqCVsWt5clgsw4ye0rz0hTZcsIyJbyA2Z6qX3B cK9vDxr6sB2Niy0CBsZC51y3pQf0UovWfnMAlQKADhr74oO+wu8Yya/hobwtXZ265G0j IudZhh+fxf5b6ekff5z1X0JnM9e/5+FkxGIpvSgxqOuVkmj3PmbXqfNcLS2HbO5Tj9tk C4P7xPZHbA5JQMWIiwxovNSftXZqQPpwOVlCKJ3NND4b6+RR061ANoY4J2ehXeNY/l/j tq6g== X-Gm-Message-State: ALoCoQl4iX/hp59rgkPeeN6cJuduv3VGOdytFWpd9ZNseLGl9pM4R51fHtG491oBfXVcZQvKlBDa X-Received: by 10.180.90.209 with SMTP id by17mr1021498wib.2.1433546173167; Fri, 05 Jun 2015 16:16:13 -0700 (PDT) Received: from 6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id q9sm4324931wix.1.2015.06.05.16.16.11 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 05 Jun 2015 16:16:12 -0700 (PDT) From: Adrien Mazarguil To: dev@dpdk.org Date: Sat, 6 Jun 2015 01:15:14 +0200 Message-Id: <1433546120-2254-11-git-send-email-adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1433546120-2254-1-git-send-email-adrien.mazarguil@6wind.com> References: <1433546120-2254-1-git-send-email-adrien.mazarguil@6wind.com> Subject: [dpdk-dev] [PATCH 10/16] mlx4: allow applications to use fork() safely 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: Fri, 05 Jun 2015 23:16:13 -0000 From: Olga Shern Signed-off-by: Olga Shern Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index f7186fa..cc16e8c 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -4793,6 +4793,13 @@ rte_mlx4_pmd_init(const char *name, const char *args) { (void)name; (void)args; + /* + * RDMAV_HUGEPAGES_SAFE tells ibv_fork_init() we intend to use + * huge pages. Calling ibv_fork_init() during init allows + * applications to use fork() safely. + */ + setenv("RDMAV_HUGEPAGES_SAFE", "1", 1); + ibv_fork_init(); rte_eal_pci_register(&mlx4_driver.pci_drv); return 0; } -- 2.1.0