From patchwork Thu Oct 7 18:43:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srikanth Kaka X-Patchwork-Id: 100808 X-Patchwork-Delegate: rasland@nvidia.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 193A9A034F; Fri, 8 Oct 2021 12:59:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C67E341216; Fri, 8 Oct 2021 12:56:41 +0200 (CEST) Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by mails.dpdk.org (Postfix) with ESMTP id 6FE77411E0 for ; Thu, 7 Oct 2021 20:46:03 +0200 (CEST) Received: by mail-pg1-f178.google.com with SMTP id q201so637173pgq.12 for ; Thu, 07 Oct 2021 11:46:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oneconvergence.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6g7NWHSe4BcZqRucj68dFoHjqvvhJk6VnGSswmuq3cw=; b=dIdU8I7tSNkPgcrChVSbBYu3bU3wae0ne4XgPcc5pTVfUcxVGVrkpYGjaJGdVna3yF aghLfhgJGY8AGxk0C6bR/rjAYTIlEC/Mxi7Vg79QY1RegqqGDt31AZtYKF1lv40567wH X1uE46QTkRrxLHz9SAYPWpfEt2HGrY9rKJ1xU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6g7NWHSe4BcZqRucj68dFoHjqvvhJk6VnGSswmuq3cw=; b=bBDWamvZseVIjs28Zwx/VdF4tBqTdScGcy8doWg9L1AgIhlFv86EKMCBjufUP4Ta6m m8jBS1zrHV3h8S0AKdqVTt1QgmntDi1km2yvEwlGS03s++wsHY+Z6XDIXuuwLkLWI7/5 lpzpRBp5jIPS3gVq9x3QNHUTtisOZ9LTsDZSBLm0NMJllbY49EsJZFdhgE75Mj8QyC1A kEqXYCCYBUH0yJnm59wc+MrzwHAmrSRdAGlvCu1LwTDyePmVvRvC6W44pRfyizfQq2qp nggdsOdUV+ZAbr+eUQAed7Sko6Mxk5C+Zl6HYpEb32TG92PqpRxf4A+RwIlNEFX2Hd9k CMUw== X-Gm-Message-State: AOAM530dNm8C9iJZxDc8HyfY6oQpN/2kXDMMrut5a9PQ88aUMKVIlVSb alEyvFAHc8x00ontBndLgR6iSw== X-Google-Smtp-Source: ABdhPJx5S5f3+xj0QQrQexn6zWDwjHNKZcJ20LD99nFuwj68K3OuwvtwLVxNl/893Av4UZ4yP9VyKQ== X-Received: by 2002:a62:e810:0:b0:44c:a67f:49b2 with SMTP id c16-20020a62e810000000b0044ca67f49b2mr5722356pfi.48.1633632362674; Thu, 07 Oct 2021 11:46:02 -0700 (PDT) Received: from srikanth-ThinkPad-T450.domain.name ([136.185.113.102]) by smtp.gmail.com with ESMTPSA id c11sm3311586pji.38.2021.10.07.11.46.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 11:46:02 -0700 (PDT) From: Srikanth Kaka To: Matan Azrad , Viacheslav Ovsiienko Cc: dev@dpdk.org, Vag Singh , Anand Thulasiram , Srikanth Kaka Date: Fri, 8 Oct 2021 00:13:49 +0530 Message-Id: <20211007184350.73858-41-srikanth.k@oneconvergence.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211007184350.73858-1-srikanth.k@oneconvergence.com> References: <20211007184350.73858-1-srikanth.k@oneconvergence.com> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 08 Oct 2021 12:55:54 +0200 Subject: [dpdk-dev] [PATCH v2 40/41] net/mlx5: add meson support for FreeBSD 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 FreeBSD, XOPEN_SOURCE=600 is missing 'strlen' prototype. The default XOPEN_SOURCE value (700) is used. Signed-off-by: Srikanth Kaka Signed-off-by: Vag Singh Signed-off-by: Anand Thulasiram --- drivers/net/mlx5/freebsd/meson.build | 14 ++++++++++++++ drivers/net/mlx5/meson.build | 14 ++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 drivers/net/mlx5/freebsd/meson.build diff --git a/drivers/net/mlx5/freebsd/meson.build b/drivers/net/mlx5/freebsd/meson.build new file mode 100644 index 0000000000..8412edce78 --- /dev/null +++ b/drivers/net/mlx5/freebsd/meson.build @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright 2020 Mellanox Technologies, Ltd + +includes += include_directories('.') +sources += files( + 'mlx5_socket.c', + 'mlx5_os.c', + 'mlx5_ethdev_os.c', + 'mlx5_verbs.c', + 'mlx5_mp_os.c', + 'mlx5_vlan_os.c', + 'mlx5_flow_os.c', +) + diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build index dac7f1fabf..51172adf90 100644 --- a/drivers/net/mlx5/meson.build +++ b/drivers/net/mlx5/meson.build @@ -2,9 +2,9 @@ # Copyright 2018 6WIND S.A. # Copyright 2018 Mellanox Technologies, Ltd -if not (is_linux or is_windows) +if not (is_linux or is_windows or is_freebsd) build = false - reason = 'only supported on Linux and Windows' + reason = 'only supported on Linux, Windows and FreeBSD' subdir_done() endif @@ -38,7 +38,7 @@ sources = files( 'mlx5_devx.c', ) -if is_linux +if is_linux or is_freebsd sources += files( 'mlx5_flow_verbs.c', ) @@ -54,8 +54,14 @@ cflags_options = [ '-Wno-strict-prototypes', '-D_BSD_SOURCE', '-D_DEFAULT_SOURCE', - '-D_XOPEN_SOURCE=600', ] + +if not is_freebsd + cflags_options += [ + '-D_XOPEN_SOURCE=600', + ] +endif + foreach option:cflags_options if cc.has_argument(option) cflags += option