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 1451DA04A4; Wed, 3 Jun 2020 17:07:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C091D1D5CB; Wed, 3 Jun 2020 17:06:19 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2049.outbound.protection.outlook.com [40.107.20.49]) by dpdk.org (Postfix) with ESMTP id D9F331D5A7 for ; Wed, 3 Jun 2020 17:06:15 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CKE1yukl3nkUWuelCbFZEWK1ycw2mj+PtLZIttvgCbGu441cLXdYJ2lIzFEBxz97SNH7VOSefI2CZ16Uctum2Cb3nAxJYFhHNv2Of2E96h7AC0hMthLZ8yZaFzWiTICzlcuKxm9E5LHRT5gskidS8igA4D9vqtTm+oliJzV+hXkwrSNXGnfNUoKDm/CVni7TB71/J2cnuqBktwiTR7PNVoFoM0y/Wl+FdmJQOv9uKw9k5QPIt96I/sYF4zOcB5tn0rbMEz7KmGkj0W4yaUUI0v1OTwketNDxsLJOnOFvSRsBjmPAqUV+oenULAm5UJttwu0KZikB20CjfWWwImo3SA== 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=QbZgGtUEXTCIDc+PwWX+wv9uZlM+GvwhMC0ZzpT6gQc=; b=hF5SKZuFab+8hHij+GKoSxZVVnu+cLlMRwF05AUeHopq1MTG0aL5zKBr3Z2SWUXpzbFeo2klXAdH5K5U/PM3wAJ50zUdqS1tAL50yVJKGcGL4M5LhWii1oQZ+6aEHsodiu1mGJcjJXEZkpbZD6vxTFoPkDWIH6NboozRLfcNC5l0VF0sR1FNjJEFtLr/LJ1mb0Tx6IoO6EVyoLqRxJfZNIBivDhdFqbzms1/hm95ETcfEkiG7NG2b2u/uiP0DEhJZn63OcZS8w3wrOQo6DDXHosjjBfvk75/f0ZykStRtw4j8nwr0+IfQHcOIyISs6J05R7OeVHeP+0XhEyE/WcK6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QbZgGtUEXTCIDc+PwWX+wv9uZlM+GvwhMC0ZzpT6gQc=; b=B6gKV7m7R2VRey0xbCGqpnRZdr1ejtdVOSiSOGwRn6HLdU+MzUdrLdR8/hrOWZKIGPzg3ifiQN8MDeae3LZFOxZ8gJGI7VQ/i95FHPa9YWvdJQLhfVoeNK5A0OXr69aYxqF8HleW3bjGxGSh5tGpAJ5hB0JtI6IdnOZ11NSNEBA= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=mellanox.com; Received: from AM0PR05MB4209.eurprd05.prod.outlook.com (2603:10a6:208:61::22) by AM0PR05MB5235.eurprd05.prod.outlook.com (2603:10a6:208:f5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.18; Wed, 3 Jun 2020 15:06:15 +0000 Received: from AM0PR05MB4209.eurprd05.prod.outlook.com ([fe80::1068:89a9:41d3:b14a]) by AM0PR05MB4209.eurprd05.prod.outlook.com ([fe80::1068:89a9:41d3:b14a%3]) with mapi id 15.20.3066.018; Wed, 3 Jun 2020 15:06:15 +0000 From: Ophir Munk To: dev@dpdk.org, Matan Azrad , Raslan Darawsheh Cc: Ophir Munk Date: Wed, 3 Jun 2020 15:06:01 +0000 Message-Id: <20200603150602.4686-8-ophirmu@mellanox.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20200603150602.4686-1-ophirmu@mellanox.com> References: <20200603150602.4686-1-ophirmu@mellanox.com> Content-Type: text/plain X-ClientProxiedBy: AM4PR0302CA0033.eurprd03.prod.outlook.com (2603:10a6:205:2::46) To AM0PR05MB4209.eurprd05.prod.outlook.com (2603:10a6:208:61::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from mellanox.com (37.142.13.130) by AM4PR0302CA0033.eurprd03.prod.outlook.com (2603:10a6:205:2::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3066.19 via Frontend Transport; Wed, 3 Jun 2020 15:06:14 +0000 X-Mailer: git-send-email 2.8.4 X-Originating-IP: [37.142.13.130] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: f547f514-ba5e-493c-fb64-08d807cfa8f9 X-MS-TrafficTypeDiagnostic: AM0PR05MB5235: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2089; X-Forefront-PRVS: 04238CD941 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: y6zxG3WQVONsI1h/NrCMjg4IBwCwvP+LRgpTyW0u5g6gp1eUbg/3Ix5GTKUaA09xExBgR0xx+KeEIr0CemURbX4ORl7S1SJM+aKNAJr8XKKVfri8L2eS1h2LVn2RCpOg0pO8LXswfal6EdO89fYkqnuIinHD/znyGTpFJVLoG6VoIGpt4Vb/04IESdkezUDgLEHaNIH4G362vBSsLbaCa22XCGBgsqNNap/2W3x7SC/OfsJ8G4t9X/2L/e3xAEbjnEodX483GAFKxWUeGg3pxQORBAcXgtE8RrlgqOuCeGpdbr6byVPqhaqXnu+HuVj/5cbMKFJMe1gAPwBHryBCZw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB4209.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(366004)(136003)(346002)(39860400002)(376002)(26005)(4326008)(186003)(478600001)(316002)(8676002)(16526019)(8886007)(6666004)(2906002)(66476007)(8936002)(66946007)(956004)(66556008)(2616005)(55016002)(107886003)(86362001)(83380400001)(36756003)(6636002)(7696005)(5660300002)(1076003)(52116002)(110136005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: VjgnW+/se3cFe3zkJ1WwhZNQIBoeMNC+NZPOppx5fH8X7aVSOqaspyaEbttcL2puNJREr6pRzlLn6lM/gim6Zeg9tHMEmlsp1PJM5GiLNFh0/enFUMzSHk4koNks4N+r7Ti25f3kFH/ccDyVmHrmmh49K2TgqfyThRHl1Y1AHmQG8W1yLxKH4sxgLASyXbNDLP28X9v/8fBgiOY+1vvLx9Mz+HLEvSPQUDNE11mRaUHT7yXBm3wxpisllYlPQeCx51NjyPD/VY9Rdi7ToLAUOAVnkfxvq69vYUxVqdt7VV2zunPTVgn5rUgYLgSNIMTks683cbqy36HbOPnxbyw0sFP5+j1BeizxVWwitdi8ANHzEhqOA1ouWgEbqnACL8dbwnjyMnJRt5iy3NE9nZMemV0vEM8V1TDa9RQshXHEhd/+voA98sSG49i+qSXOPA4yuvb0hQyT4lUhoqGk4Pc62suwiWR043+zvdcRRA+KZeYv9rTdfM6QCDHvgNKh1Q8P X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: f547f514-ba5e-493c-fb64-08d807cfa8f9 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2020 15:06:15.0253 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +qd+vVMJwsT8Ao8COXtU/W8h5cc9P0qk4mUa8DVx6kKlfieSTpziSQhOm5R0qKl18i77plk+shB3YFshgUVtQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB5235 Subject: [dpdk-dev] [PATCH v1 7/8] net/mlx5: add mlx5 header file specific to Linux 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" File drivers/net/linux/mlx5_os.h is added. It includes specific Linux definitions such as PCI driver flags, link state changes interrupts, link removal interrupts, etc. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/net/mlx5/Makefile | 1 + drivers/net/mlx5/linux/mlx5_os.h | 18 ++++++++++++++++++ drivers/net/mlx5/mlx5.c | 3 +-- drivers/net/mlx5/mlx5.h | 5 +++-- 4 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 drivers/net/mlx5/linux/mlx5_os.h diff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile index 115b66c..41ab73e 100644 --- a/drivers/net/mlx5/Makefile +++ b/drivers/net/mlx5/Makefile @@ -41,6 +41,7 @@ CFLAGS += -g CFLAGS += -I$(RTE_SDK)/drivers/common/mlx5 CFLAGS += -I$(RTE_SDK)/drivers/common/mlx5/linux CFLAGS += -I$(RTE_SDK)/drivers/net/mlx5 +CFLAGS += -I$(RTE_SDK)/drivers/net/mlx5/linux CFLAGS += -I$(BUILDDIR)/drivers/common/mlx5 CFLAGS += -D_BSD_SOURCE CFLAGS += -D_DEFAULT_SOURCE diff --git a/drivers/net/mlx5/linux/mlx5_os.h b/drivers/net/mlx5/linux/mlx5_os.h new file mode 100644 index 0000000..f310f17 --- /dev/null +++ b/drivers/net/mlx5/linux/mlx5_os.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright 2015 6WIND S.A. + * Copyright 2020 Mellanox Technologies, Ltd + */ + +#ifndef RTE_PMD_MLX5_OS_H_ +#define RTE_PMD_MLX5_OS_H_ + +/* verb enumerations translations to local enums. */ +enum { + DEV_SYSFS_NAME_MAX = IBV_SYSFS_NAME_MAX, + DEV_SYSFS_PATH_MAX = IBV_SYSFS_PATH_MAX +}; + +#define PCI_DRV_FLAGS (RTE_PCI_DRV_INTR_LSC | \ + RTE_PCI_DRV_INTR_RMV | \ + RTE_PCI_DRV_PROBE_AGAIN) +#endif /* RTE_PMD_MLX5_OS_H_ */ diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index f62ad12..16ab8b0 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -2114,8 +2114,7 @@ struct rte_pci_driver mlx5_driver = { .remove = mlx5_pci_remove, .dma_map = mlx5_dma_map, .dma_unmap = mlx5_dma_unmap, - .drv_flags = RTE_PCI_DRV_INTR_LSC | RTE_PCI_DRV_INTR_RMV | - RTE_PCI_DRV_PROBE_AGAIN, + .drv_flags = PCI_DRV_FLAGS, }; /** diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index f5d9aad..eca4472 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -41,6 +41,7 @@ #include "mlx5_defs.h" #include "mlx5_utils.h" +#include "mlx5_os.h" #include "mlx5_autoconf.h" enum mlx5_ipool_index { @@ -536,8 +537,8 @@ struct mlx5_dev_ctx_shared { void *pd; /* Protection Domain. */ uint32_t pdn; /* Protection Domain number. */ uint32_t tdn; /* Transport Domain number. */ - char ibdev_name[IBV_SYSFS_NAME_MAX]; /* IB device name. */ - char ibdev_path[IBV_SYSFS_PATH_MAX]; /* IB device path for secondary */ + char ibdev_name[DEV_SYSFS_NAME_MAX]; /* SYSFS dev name. */ + char ibdev_path[DEV_SYSFS_PATH_MAX]; /* SYSFS dev path for secondary */ struct mlx5_dev_attr device_attr; /* Device properties. */ LIST_ENTRY(mlx5_dev_ctx_shared) mem_event_cb; /**< Called by memory event callback. */ -- 2.8.4