From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0089.outbound.protection.outlook.com [104.47.2.89]) by dpdk.org (Postfix) with ESMTP id 2A37E2C02 for ; Tue, 5 Jun 2018 02:12:34 +0200 (CEST) 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=XXFEGitHIrgPAANfAyuW2DsoUtQaEe/aXdJ0UWHjs1s=; b=t9r0wjVHvBD9kNMN1iGFEjsB6oM9CFzTqfQOXbNqc2fe3JB4Wm6ETjM8Eu/K54LSvF1MXwKipBgfycRHClHi1VUwpBysSgQzaCXKs3jnac5e+nxKghnqPkW2pbfgcAxnC9L6Lmh3fHxkr+nSi7vrgg7DW1HUYy4WoD7cFr3rtqY= Received: from mellanox.com (209.116.155.178) by AM5PR0501MB2036.eurprd05.prod.outlook.com (2603:10a6:203:1a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.820.11; Tue, 5 Jun 2018 00:12:31 +0000 From: Yongseok Koh To: yliu@fridaylinux.org Cc: stable@dpdk.org, shahafs@mellanox.com, adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com Date: Mon, 4 Jun 2018 17:10:41 -0700 Message-Id: <20180605001129.13184-20-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180605001129.13184-1-yskoh@mellanox.com> References: <20180605001129.13184-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Originating-IP: [209.116.155.178] X-ClientProxiedBy: CO1PR15CA0060.namprd15.prod.outlook.com (2603:10b6:101:1f::28) To AM5PR0501MB2036.eurprd05.prod.outlook.com (2603:10a6:203:1a::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM5PR0501MB2036; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2036; 3:eYctk/2R0yKNfpKcLgnLrGmK6hZPQMaK2uawKDR1FyADevDS5X0Wncf8Y0yejmlxbLFEiFZ77Noto31ATKmevHkfHl/Y+lIsvfSlbbiPa8lwx6r7cEjfv6BsaaS/JLAGnOKqksFUYQ65rBzXDrik+6B1q8ckD9mgkTgJtfyD1R+Qi0uieoy+zJ1ZFFSPw+dpD8W8e50Eda2aCsN0FyKFM3lcMnu5CrrpY1nqizi51bTSQbVuxc9T6VtTHyE56YeJ; 25:DB54nRnO33/C9zMAug28eIJIymalU+5/NBYBqb3UjYo6yFqkd8PwGaL+VkRFwwFmCN/DhOKHq1oKlURnKrkrAEcmNjfo7mhSTr+OPdRQ6TiW9pbIMgIN9V2WtaXCM+CTZHg5LbBM3THuBfUY8BmAk1c99rhua8Ob0qF1i144rXRZGNFuxakIM4XPTzINH34OL95MPfubgKdxjID9o7KZa5mlR7KQ2hhC1TqL3u8sO79dwYxXEfbDUh9L5jvDFStM33/n4lYbDimsYRVrNUMyfHk6x3i3tczAAQa1BlEko2Tghudsr3u3GoDhPGb0EYT1UpuKu8YffzukktZJ6P27vQ==; 31:wnUma3Ss4DRqaspqwB6DnzbZTofpLfcoznkNUZiMI7ameSOkuxzOdqlfkVm4F59KS+LwJXO70og8zRDCEO5VOHlssCtfgq65UIxc6A+TgJ3bP1DJwU00VjZC7obtIA5VtBgqgcMGQmnwio9Xo5n4ROaVFC/mFe2apkN4ngg1dr9BOpqDLCUxhNyQhLiOZWhDtvTG6OtWFKF56h/LIKCXsdAg0YaIZAVujnUPMTJZrtg= X-MS-TrafficTypeDiagnostic: AM5PR0501MB2036: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2036; 20:saxwxgXbqThOelFunSlfhL0N4qVGn5+VsarnvXGWHxR43HmB5SQTkeL/YdOQpXGUVYETjqL3O1AIy5YXrbIjRPBo7ocQEyrX56Eoo8sHEN92T3JFKYSw7Pqp7x+qsb8aGjbNXpwMYoCMhOY2si5UkTqM5x7V6uAgWsflb7qRcv9/j/ANsj3rN78z6Cj4lcwXvmgRI/yOin6f41Xp+6SHaRdo41izE0OSBG7IYfDJoZxoSyXYZjcO+imV6nVF6dAra9TgAySP6HzxFEYdgpC0fB6Far8rcnKDei6o33qUWYPvWXR4m1Ik35z/qrr1UlGnKSdtU3Vl2W29LWy90LjmpIYOtkqroUTpAhZL7RBOJRSaU7TjMzX2LmVH9wywWDv91pPdtcfvGsZwCV8uAkUXcV6TnbAiAHdiFrc6eQo1xn8mCXI2JJrmxDxfxtE3tKKq2UH/E4/cHderqrLM60zJOsjSs4n5M3FIZdLnuEpyBAULW+HXVRqWbw1MWjzJT7Pm; 4:NjIVk+uZ0eH73FwAGFElrtwRj68mkSQKO8qIjpLguj28YeZDoW1Wqphukl/8a/U9y9lyPzZNBe+aorZJUSaxFKOWK8mBV3H3wxGyNPgo62WQn33vuQLI/ew7ZuoeKbOqWfAhCHxPk9DkyRccvymYAhNExLHHbPgrTz5gBVX4IKxjKJABUjIMKG16ZnDujsIfHqnMRMsk8QfipIDs9svvtvWBPZ2iP615tOw4asJjlu8Gjcftwbcivrv8RXkXrO79yNFBoREg1XTy+oP+EFlGbw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231254)(944501410)(52105095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:AM5PR0501MB2036; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0501MB2036; X-Forefront-PRVS: 0694C54398 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(366004)(396003)(39860400002)(346002)(376002)(189003)(199004)(478600001)(81156014)(76176011)(7696005)(956004)(2361001)(50226002)(305945005)(2616005)(50466002)(47776003)(486006)(97736004)(5660300001)(6666003)(2351001)(106356001)(8936002)(186003)(81166006)(52116002)(6116002)(476003)(6916009)(23676004)(386003)(446003)(11346002)(59450400001)(66066001)(26005)(3846002)(8676002)(16526019)(1076002)(25786009)(21086003)(86362001)(2870700001)(575784001)(53936002)(4326008)(2906002)(316002)(55016002)(36756003)(105586002)(69596002)(68736007)(7736002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0501MB2036; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTVQUjA1MDFNQjIwMzY7MjM6Vktqd0RtMml5bitJSHR3cGJFbTdMT1lt?= =?utf-8?B?SmlqTWxFS25kbm52R014SHhRYjIya2QyT1diVGdnQkIwSmVYYllqeW1IQTFj?= =?utf-8?B?WnpWL2tZWlhiQkRVQUg2a0RpTnpsNXlueS9EQ24yQnZWczQrNExJTStnbnZI?= =?utf-8?B?eWdqSnpqSnRuQ3FvOHZhc3VXLzBDOW5RQ29RelZwTHhZZTBtZURJTWVOWWsv?= =?utf-8?B?ekNQbDZZbHdFaHhlbFlrV2tWSUlGSnNJMTlQVzZQS2Q0VGVMS29nSER1S3pl?= =?utf-8?B?Z0RKUFNhZ1BkdFQwNzUxYVc3bFByaThjQ0pmSnQxdzh2dnlJTWxkOUVseFR4?= =?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ac1wGa/0qG/RlmpNuE9omRkALrlXwqYNS0BwXMU6N4wrmRT1b1rSDh0sFk5dQCkhFOSNhTwi6gkfvHyqAgOi5i7w/G8qs4UJuTaXQ7nI+IJkGiixVspXkJSEwOTJEl1Dpf8se0XnRioJHINRsMyGbCAxpxYx9VknmUKZi6Xlxftben/tJelYJXeJfsghfQP6OLjK3Tm3/hS5aHhEbmqLpbTp9pchP3jqwYQwHC+N0GY0NeloJgVdquvj/9NR32LbAkYYGH2YP8OYxlVPhtjDgB0sc2asz5Q==; 5:Bh0BGpEir63iOZ/P74PcmfiV+18/cwI9lrox/rLtWKJ0E5+ktR2UN7vFrIqtkAqfxWm6JFZi6OZVv/K6wVzMxran5es2m6J7dqjuCPYf8RLX/fAH6Ki0KbcU89Hv5JKhGtVreLpHVwHabe9/xVQ4/swgZdg6x+00nqu9GdVuUS4=; 24:d6WeMyT7/Esz4kUDV51ak2tMhqazVsY/F9O2PTGfNRlaMgVRmev2YiQ+bnKwzu+Ym2GngVtLaLw0dvg/jdJh8391ht2o/ehyQZ6Ig5hYVyM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0501MB2036; 7:eccIFVyRAcHymtIZ4cu22uC0j9iqDmHdSXr2c0mhCaEElrlu7xXOsKa+KDL3Nn2OkW/5qJGeWWCD6IP4F7k22IH8/yY5yYtk0u+VwsP0FSa0KOsK6ANbYNxtEyXf/fW8sIuCUudOQWGutb2jtKZuFQ4O33zH90caEXOOFGohtAi23CBEHzcYFKPmr97gis7D/bFf/5lZFQRX58vu4CVxhNAWXZOYleMNoL/+lf4OtgVsLiKEvtDJOHxdPPSih7hf X-MS-Office365-Filtering-Correlation-Id: a6afdb21-d817-4a71-2b78-08d5ca7908c5 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2018 00:12:31.6035 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a6afdb21-d817-4a71-2b78-08d5ca7908c5 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0501MB2036 Subject: [dpdk-stable] [PATCH 19/67] net/mlx5: name parameters in function prototypes X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2018 00:12:34 -0000 From: NĂ©lio Laranjeiro [ backported from upstream commit 3692c7ec9e97efeefb497cbbdb99aa766a163221 ] Signed-off-by: Nelio Laranjeiro Acked-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5.h | 185 +++++++++++++++++++++++-------------------- drivers/net/mlx5/mlx5_rxtx.h | 154 +++++++++++++++++++---------------- 2 files changed, 187 insertions(+), 152 deletions(-) diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index 2fa0aa274..dc165a8a3 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -220,25 +220,29 @@ int mlx5_getenv_int(const char *); struct priv *mlx5_get_priv(struct rte_eth_dev *dev); int mlx5_is_secondary(void); -int priv_get_ifname(const struct priv *, char (*)[IF_NAMESIZE]); -int priv_ifreq(const struct priv *, int req, struct ifreq *); -int priv_get_mtu(struct priv *, uint16_t *); -int priv_set_flags(struct priv *, unsigned int, unsigned int); -int mlx5_dev_configure(struct rte_eth_dev *); -void mlx5_dev_infos_get(struct rte_eth_dev *, struct rte_eth_dev_info *); +int priv_get_ifname(const struct priv *priv, char (*ifname)[IF_NAMESIZE]); +int priv_ifreq(const struct priv *priv, int req, struct ifreq *ifr); +int priv_get_mtu(struct priv *priv, uint16_t *mtu); +int priv_set_flags(struct priv *priv, unsigned int keep, unsigned int flags); +int mlx5_dev_configure(struct rte_eth_dev *dev); +void mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info); const uint32_t *mlx5_dev_supported_ptypes_get(struct rte_eth_dev *dev); -int priv_link_update(struct priv *, int); -int priv_force_link_status_change(struct priv *, int); -int mlx5_link_update(struct rte_eth_dev *, int); -int mlx5_dev_set_mtu(struct rte_eth_dev *, uint16_t); -int mlx5_dev_get_flow_ctrl(struct rte_eth_dev *, struct rte_eth_fc_conf *); -int mlx5_dev_set_flow_ctrl(struct rte_eth_dev *, struct rte_eth_fc_conf *); -int mlx5_ibv_device_to_pci_addr(const struct ibv_device *, - struct rte_pci_addr *); -void mlx5_dev_link_status_handler(void *); -void mlx5_dev_interrupt_handler(void *); -void priv_dev_interrupt_handler_uninstall(struct priv *, struct rte_eth_dev *); -void priv_dev_interrupt_handler_install(struct priv *, struct rte_eth_dev *); +int priv_link_update(struct priv *priv, int wait_to_complete); +int priv_force_link_status_change(struct priv *priv, int status); +int mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete); +int mlx5_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu); +int mlx5_dev_get_flow_ctrl(struct rte_eth_dev *dev, + struct rte_eth_fc_conf *fc_conf); +int mlx5_dev_set_flow_ctrl(struct rte_eth_dev *dev, + struct rte_eth_fc_conf *fc_conf); +int mlx5_ibv_device_to_pci_addr(const struct ibv_device *device, + struct rte_pci_addr *pci_addr); +void mlx5_dev_link_status_handler(void *arg); +void mlx5_dev_interrupt_handler(void *cb_arg); +void priv_dev_interrupt_handler_uninstall(struct priv *priv, + struct rte_eth_dev *dev); +void priv_dev_interrupt_handler_install(struct priv *priv, + struct rte_eth_dev *dev); int mlx5_set_link_down(struct rte_eth_dev *dev); int mlx5_set_link_up(struct rte_eth_dev *dev); void priv_dev_select_tx_function(struct priv *priv, struct rte_eth_dev *dev); @@ -246,86 +250,99 @@ void priv_dev_select_rx_function(struct priv *priv, struct rte_eth_dev *dev); /* mlx5_mac.c */ -int priv_get_mac(struct priv *, uint8_t (*)[ETHER_ADDR_LEN]); -void mlx5_mac_addr_remove(struct rte_eth_dev *, uint32_t); -int mlx5_mac_addr_add(struct rte_eth_dev *, struct ether_addr *, uint32_t, - uint32_t); -void mlx5_mac_addr_set(struct rte_eth_dev *, struct ether_addr *); +int priv_get_mac(struct priv *priv, uint8_t (*mac)[ETHER_ADDR_LEN]); +void mlx5_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index); +int mlx5_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac, + uint32_t index, uint32_t vmdq); +void mlx5_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr); /* mlx5_rss.c */ -int mlx5_rss_hash_update(struct rte_eth_dev *, struct rte_eth_rss_conf *); -int mlx5_rss_hash_conf_get(struct rte_eth_dev *, struct rte_eth_rss_conf *); -int priv_rss_reta_index_resize(struct priv *, unsigned int); -int mlx5_dev_rss_reta_query(struct rte_eth_dev *, - struct rte_eth_rss_reta_entry64 *, uint16_t); -int mlx5_dev_rss_reta_update(struct rte_eth_dev *, - struct rte_eth_rss_reta_entry64 *, uint16_t); +int mlx5_rss_hash_update(struct rte_eth_dev *dev, + struct rte_eth_rss_conf *rss_conf); +int mlx5_rss_hash_conf_get(struct rte_eth_dev *dev, + struct rte_eth_rss_conf *rss_conf); +int priv_rss_reta_index_resize(struct priv *priv, unsigned int reta_size); +int mlx5_dev_rss_reta_query(struct rte_eth_dev *dev, + struct rte_eth_rss_reta_entry64 *reta_conf, + uint16_t reta_size); +int mlx5_dev_rss_reta_update(struct rte_eth_dev *dev, + struct rte_eth_rss_reta_entry64 *reta_conf, + uint16_t reta_size); /* mlx5_rxmode.c */ -void mlx5_promiscuous_enable(struct rte_eth_dev *); -void mlx5_promiscuous_disable(struct rte_eth_dev *); -void mlx5_allmulticast_enable(struct rte_eth_dev *); -void mlx5_allmulticast_disable(struct rte_eth_dev *); +void mlx5_promiscuous_enable(struct rte_eth_dev *dev); +void mlx5_promiscuous_disable(struct rte_eth_dev *dev); +void mlx5_allmulticast_enable(struct rte_eth_dev *dev); +void mlx5_allmulticast_disable(struct rte_eth_dev *dev); /* mlx5_stats.c */ -void priv_xstats_init(struct priv *); -int mlx5_stats_get(struct rte_eth_dev *, struct rte_eth_stats *); -void mlx5_stats_reset(struct rte_eth_dev *); -int mlx5_xstats_get(struct rte_eth_dev *, - struct rte_eth_xstat *, unsigned int); -void mlx5_xstats_reset(struct rte_eth_dev *); -int mlx5_xstats_get_names(struct rte_eth_dev *, - struct rte_eth_xstat_name *, unsigned int); +void priv_xstats_init(struct priv *priv); +int mlx5_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats); +void mlx5_stats_reset(struct rte_eth_dev *dev); +int mlx5_xstats_get(struct rte_eth_dev *dev, + struct rte_eth_xstat *stats, unsigned int n); +void mlx5_xstats_reset(struct rte_eth_dev *dev); +int mlx5_xstats_get_names(struct rte_eth_dev *dev, + struct rte_eth_xstat_name *xstats_names, + unsigned int n); /* mlx5_vlan.c */ -int mlx5_vlan_filter_set(struct rte_eth_dev *, uint16_t, int); -int mlx5_vlan_offload_set(struct rte_eth_dev *, int); -void mlx5_vlan_strip_queue_set(struct rte_eth_dev *, uint16_t, int); +int mlx5_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on); +void mlx5_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue, int on); +int mlx5_vlan_offload_set(struct rte_eth_dev *dev, int mask); /* mlx5_trigger.c */ -int mlx5_dev_start(struct rte_eth_dev *); -void mlx5_dev_stop(struct rte_eth_dev *); -int priv_dev_traffic_enable(struct priv *, struct rte_eth_dev *); -int priv_dev_traffic_disable(struct priv *, struct rte_eth_dev *); -int priv_dev_traffic_restart(struct priv *, struct rte_eth_dev *); -int mlx5_traffic_restart(struct rte_eth_dev *); +int mlx5_dev_start(struct rte_eth_dev *dev); +void mlx5_dev_stop(struct rte_eth_dev *dev); +int priv_dev_traffic_enable(struct priv *priv, struct rte_eth_dev *dev); +int priv_dev_traffic_disable(struct priv *priv, struct rte_eth_dev *dev); +int priv_dev_traffic_restart(struct priv *priv, struct rte_eth_dev *dev); +int mlx5_traffic_restart(struct rte_eth_dev *dev); /* mlx5_flow.c */ -int mlx5_dev_filter_ctrl(struct rte_eth_dev *, enum rte_filter_type, - enum rte_filter_op, void *); -int mlx5_flow_validate(struct rte_eth_dev *, const struct rte_flow_attr *, - const struct rte_flow_item [], - const struct rte_flow_action [], - struct rte_flow_error *); -struct rte_flow *mlx5_flow_create(struct rte_eth_dev *, - const struct rte_flow_attr *, - const struct rte_flow_item [], - const struct rte_flow_action [], - struct rte_flow_error *); -int mlx5_flow_destroy(struct rte_eth_dev *, struct rte_flow *, - struct rte_flow_error *); -void priv_flow_flush(struct priv *, struct mlx5_flows *); -int mlx5_flow_flush(struct rte_eth_dev *, struct rte_flow_error *); -int mlx5_flow_query(struct rte_eth_dev *, struct rte_flow *, - enum rte_flow_action_type, void *, - struct rte_flow_error *); -int mlx5_flow_isolate(struct rte_eth_dev *, int, struct rte_flow_error *); -int priv_flow_start(struct priv *, struct mlx5_flows *); -void priv_flow_stop(struct priv *, struct mlx5_flows *); -int priv_flow_verify(struct priv *); -int mlx5_ctrl_flow_vlan(struct rte_eth_dev *, struct rte_flow_item_eth *, - struct rte_flow_item_eth *, struct rte_flow_item_vlan *, - struct rte_flow_item_vlan *); -int mlx5_ctrl_flow(struct rte_eth_dev *, struct rte_flow_item_eth *, - struct rte_flow_item_eth *); -int priv_flow_create_drop_queue(struct priv *); -void priv_flow_delete_drop_queue(struct priv *); +int mlx5_flow_validate(struct rte_eth_dev *dev, + const struct rte_flow_attr *attr, + const struct rte_flow_item items[], + const struct rte_flow_action actions[], + struct rte_flow_error *error); +void priv_flow_flush(struct priv *priv, struct mlx5_flows *list); +int priv_flow_create_drop_queue(struct priv *priv); +void priv_flow_stop(struct priv *priv, struct mlx5_flows *list); +int priv_flow_start(struct priv *priv, struct mlx5_flows *list); +int priv_flow_verify(struct priv *priv); +int priv_flow_create_drop_queue(struct priv *priv); +void priv_flow_delete_drop_queue(struct priv *priv); +int mlx5_ctrl_flow_vlan(struct rte_eth_dev *dev, + struct rte_flow_item_eth *eth_spec, + struct rte_flow_item_eth *eth_mask, + struct rte_flow_item_vlan *vlan_spec, + struct rte_flow_item_vlan *vlan_mask); +int mlx5_ctrl_flow(struct rte_eth_dev *dev, + struct rte_flow_item_eth *eth_spec, + struct rte_flow_item_eth *eth_mask); +struct rte_flow *mlx5_flow_create(struct rte_eth_dev *dev, + const struct rte_flow_attr *attr, + const struct rte_flow_item items[], + const struct rte_flow_action actions[], + struct rte_flow_error *error); +int mlx5_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow, + struct rte_flow_error *error); +int mlx5_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error); +int mlx5_flow_query(struct rte_eth_dev *dev, struct rte_flow *flow, + enum rte_flow_action_type action, void *data, + struct rte_flow_error *error); +int mlx5_flow_isolate(struct rte_eth_dev *dev, int enable, + struct rte_flow_error *error); +int mlx5_dev_filter_ctrl(struct rte_eth_dev *dev, + enum rte_filter_type filter_type, + enum rte_filter_op filter_op, + void *arg); /* mlx5_socket.c */ @@ -336,9 +353,9 @@ int priv_socket_connect(struct priv *priv); /* mlx5_mr.c */ -struct mlx5_mr *priv_mr_new(struct priv *, struct rte_mempool *); -struct mlx5_mr *priv_mr_get(struct priv *, struct rte_mempool *); -int priv_mr_release(struct priv *, struct mlx5_mr *); -int priv_mr_verify(struct priv *); +struct mlx5_mr *priv_mr_new(struct priv *priv, struct rte_mempool *mp); +struct mlx5_mr *priv_mr_get(struct priv *priv, struct rte_mempool *mp); +int priv_mr_release(struct priv *priv, struct mlx5_mr *mr); +int priv_mr_verify(struct priv *priv); #endif /* RTE_PMD_MLX5_H_ */ diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h index 28761c299..9d5edeedd 100644 --- a/drivers/net/mlx5/mlx5_rxtx.h +++ b/drivers/net/mlx5/mlx5_rxtx.h @@ -237,93 +237,111 @@ struct mlx5_txq_ctrl { extern uint8_t rss_hash_default_key[]; extern const size_t rss_hash_default_key_len; -void mlx5_rxq_cleanup(struct mlx5_rxq_ctrl *); -int mlx5_rx_queue_setup(struct rte_eth_dev *, uint16_t, uint16_t, unsigned int, - const struct rte_eth_rxconf *, struct rte_mempool *); -void mlx5_rx_queue_release(void *); +void mlx5_rxq_cleanup(struct mlx5_rxq_ctrl *rxq_ctrl); +int mlx5_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, + unsigned int socket, const struct rte_eth_rxconf *conf, + struct rte_mempool *mp); +void mlx5_rx_queue_release(void *dpdk_rxq); int priv_rx_intr_vec_enable(struct priv *priv); void priv_rx_intr_vec_disable(struct priv *priv); int mlx5_rx_intr_enable(struct rte_eth_dev *dev, uint16_t rx_queue_id); int mlx5_rx_intr_disable(struct rte_eth_dev *dev, uint16_t rx_queue_id); -struct mlx5_rxq_ibv *mlx5_priv_rxq_ibv_new(struct priv *, uint16_t); -struct mlx5_rxq_ibv *mlx5_priv_rxq_ibv_get(struct priv *, uint16_t); -int mlx5_priv_rxq_ibv_release(struct priv *, struct mlx5_rxq_ibv *); -int mlx5_priv_rxq_ibv_releasable(struct priv *, struct mlx5_rxq_ibv *); -int mlx5_priv_rxq_ibv_verify(struct priv *); -struct mlx5_rxq_ctrl *mlx5_priv_rxq_new(struct priv *, uint16_t, - uint16_t, unsigned int, - struct rte_mempool *); -struct mlx5_rxq_ctrl *mlx5_priv_rxq_get(struct priv *, uint16_t); -int mlx5_priv_rxq_release(struct priv *, uint16_t); -int mlx5_priv_rxq_releasable(struct priv *, uint16_t); -int mlx5_priv_rxq_verify(struct priv *); -int rxq_alloc_elts(struct mlx5_rxq_ctrl *); -struct mlx5_ind_table_ibv *mlx5_priv_ind_table_ibv_new(struct priv *, - uint16_t [], - uint16_t); -struct mlx5_ind_table_ibv *mlx5_priv_ind_table_ibv_get(struct priv *, - uint16_t [], - uint16_t); -int mlx5_priv_ind_table_ibv_release(struct priv *, struct mlx5_ind_table_ibv *); -int mlx5_priv_ind_table_ibv_verify(struct priv *); -struct mlx5_hrxq *mlx5_priv_hrxq_new(struct priv *, uint8_t *, uint8_t, - uint64_t, uint16_t [], uint16_t); -struct mlx5_hrxq *mlx5_priv_hrxq_get(struct priv *, uint8_t *, uint8_t, - uint64_t, uint16_t [], uint16_t); -int mlx5_priv_hrxq_release(struct priv *, struct mlx5_hrxq *); -int mlx5_priv_hrxq_ibv_verify(struct priv *); +struct mlx5_rxq_ibv *mlx5_priv_rxq_ibv_new(struct priv *priv, uint16_t idx); +struct mlx5_rxq_ibv *mlx5_priv_rxq_ibv_get(struct priv *priv, uint16_t idx); +int mlx5_priv_rxq_ibv_release(struct priv *priv, struct mlx5_rxq_ibv *rxq_ibv); +int mlx5_priv_rxq_ibv_releasable(struct priv *priv, + struct mlx5_rxq_ibv *rxq_ibv); +int mlx5_priv_rxq_ibv_verify(struct priv *priv); +struct mlx5_rxq_ctrl *mlx5_priv_rxq_new(struct priv *priv, uint16_t idx, + uint16_t desc, + unsigned int socket, + struct rte_mempool *mp); +struct mlx5_rxq_ctrl *mlx5_priv_rxq_get(struct priv *priv, uint16_t idx); +int mlx5_priv_rxq_release(struct priv *priv, uint16_t idx); +int mlx5_priv_rxq_releasable(struct priv *priv, uint16_t idx); +int mlx5_priv_rxq_verify(struct priv *priv); +int rxq_alloc_elts(struct mlx5_rxq_ctrl *rxq_ctrl); +struct mlx5_ind_table_ibv *mlx5_priv_ind_table_ibv_new(struct priv *priv, + uint16_t queues[], + uint16_t queues_n); +struct mlx5_ind_table_ibv *mlx5_priv_ind_table_ibv_get(struct priv *priv, + uint16_t queues[], + uint16_t queues_n); +int mlx5_priv_ind_table_ibv_release(struct priv *priv, + struct mlx5_ind_table_ibv *ind_tbl); +int mlx5_priv_ind_table_ibv_verify(struct priv *priv); +struct mlx5_hrxq *mlx5_priv_hrxq_new(struct priv *priv, uint8_t *rss_key, + uint8_t rss_key_len, uint64_t hash_fields, + uint16_t queues[], uint16_t queues_n); +struct mlx5_hrxq *mlx5_priv_hrxq_get(struct priv *priv, uint8_t *rss_key, + uint8_t rss_key_len, uint64_t hash_fields, + uint16_t queues[], uint16_t queues_n); +int mlx5_priv_hrxq_release(struct priv *priv, struct mlx5_hrxq *hrxq); +int mlx5_priv_hrxq_ibv_verify(struct priv *priv); /* mlx5_txq.c */ -int mlx5_tx_queue_setup(struct rte_eth_dev *, uint16_t, uint16_t, unsigned int, - const struct rte_eth_txconf *); -void mlx5_tx_queue_release(void *); +int mlx5_tx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, + unsigned int socket, const struct rte_eth_txconf *conf); +void mlx5_tx_queue_release(void *dpdk_txq); int priv_tx_uar_remap(struct priv *priv, int fd); -struct mlx5_txq_ibv *mlx5_priv_txq_ibv_new(struct priv *, uint16_t); -struct mlx5_txq_ibv *mlx5_priv_txq_ibv_get(struct priv *, uint16_t); -int mlx5_priv_txq_ibv_release(struct priv *, struct mlx5_txq_ibv *); -int mlx5_priv_txq_ibv_releasable(struct priv *, struct mlx5_txq_ibv *); -int mlx5_priv_txq_ibv_verify(struct priv *); -struct mlx5_txq_ctrl *mlx5_priv_txq_new(struct priv *, uint16_t, - uint16_t, unsigned int, - const struct rte_eth_txconf *); -struct mlx5_txq_ctrl *mlx5_priv_txq_get(struct priv *, uint16_t); -int mlx5_priv_txq_release(struct priv *, uint16_t); -int mlx5_priv_txq_releasable(struct priv *, uint16_t); -int mlx5_priv_txq_verify(struct priv *); -void txq_alloc_elts(struct mlx5_txq_ctrl *); +struct mlx5_txq_ibv *mlx5_priv_txq_ibv_new(struct priv *priv, uint16_t idx); +struct mlx5_txq_ibv *mlx5_priv_txq_ibv_get(struct priv *priv, uint16_t idx); +int mlx5_priv_txq_ibv_release(struct priv *priv, struct mlx5_txq_ibv *txq_ibv); +int mlx5_priv_txq_ibv_releasable(struct priv *priv, + struct mlx5_txq_ibv *txq_ibv); +int mlx5_priv_txq_ibv_verify(struct priv *priv); +struct mlx5_txq_ctrl *mlx5_priv_txq_new(struct priv *priv, uint16_t idx, + uint16_t desc, unsigned int socket, + const struct rte_eth_txconf *conf); +struct mlx5_txq_ctrl *mlx5_priv_txq_get(struct priv *priv, uint16_t idx); +int mlx5_priv_txq_release(struct priv *priv, uint16_t idx); +int mlx5_priv_txq_releasable(struct priv *priv, uint16_t idx); +int mlx5_priv_txq_verify(struct priv *priv); +void txq_alloc_elts(struct mlx5_txq_ctrl *txq_ctrl); /* mlx5_rxtx.c */ extern uint32_t mlx5_ptype_table[]; void mlx5_set_ptype_table(void); -uint16_t mlx5_tx_burst(void *, struct rte_mbuf **, uint16_t); -uint16_t mlx5_tx_burst_mpw(void *, struct rte_mbuf **, uint16_t); -uint16_t mlx5_tx_burst_mpw_inline(void *, struct rte_mbuf **, uint16_t); -uint16_t mlx5_tx_burst_empw(void *, struct rte_mbuf **, uint16_t); -uint16_t mlx5_rx_burst(void *, struct rte_mbuf **, uint16_t); -uint16_t removed_tx_burst(void *, struct rte_mbuf **, uint16_t); -uint16_t removed_rx_burst(void *, struct rte_mbuf **, uint16_t); -int mlx5_rx_descriptor_status(void *, uint16_t); -int mlx5_tx_descriptor_status(void *, uint16_t); +uint16_t mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, + uint16_t pkts_n); +uint16_t mlx5_tx_burst_mpw(void *dpdk_txq, struct rte_mbuf **pkts, + uint16_t pkts_n); +uint16_t mlx5_tx_burst_mpw_inline(void *dpdk_txq, struct rte_mbuf **pkts, + uint16_t pkts_n); +uint16_t mlx5_tx_burst_empw(void *dpdk_txq, struct rte_mbuf **pkts, + uint16_t pkts_n); +uint16_t mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n); +uint16_t removed_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, + uint16_t pkts_n); +uint16_t removed_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, + uint16_t pkts_n); +int mlx5_rx_descriptor_status(void *rx_queue, uint16_t offset); +int mlx5_tx_descriptor_status(void *tx_queue, uint16_t offset); /* Vectorized version of mlx5_rxtx.c */ -int priv_check_raw_vec_tx_support(struct priv *); -int priv_check_vec_tx_support(struct priv *); -int rxq_check_vec_support(struct mlx5_rxq_data *); -int priv_check_vec_rx_support(struct priv *); -uint16_t mlx5_tx_burst_raw_vec(void *, struct rte_mbuf **, uint16_t); -uint16_t mlx5_tx_burst_vec(void *, struct rte_mbuf **, uint16_t); -uint16_t mlx5_rx_burst_vec(void *, struct rte_mbuf **, uint16_t); + +int priv_check_raw_vec_tx_support(struct priv *priv); +int priv_check_vec_tx_support(struct priv *priv); +int rxq_check_vec_support(struct mlx5_rxq_data *rxq); +int priv_check_vec_rx_support(struct priv *priv); +uint16_t mlx5_tx_burst_raw_vec(void *dpdk_txq, struct rte_mbuf **pkts, + uint16_t pkts_n); +uint16_t mlx5_tx_burst_vec(void *dpdk_txq, struct rte_mbuf **pkts, + uint16_t pkts_n); +uint16_t mlx5_rx_burst_vec(void *dpdk_rxq, struct rte_mbuf **pkts, + uint16_t pkts_n); /* mlx5_mr.c */ -void mlx5_mp2mr_iter(struct rte_mempool *, void *); -struct mlx5_mr *priv_txq_mp2mr_reg(struct priv *priv, struct mlx5_txq_data *, - struct rte_mempool *, unsigned int); -struct mlx5_mr *mlx5_txq_mp2mr_reg(struct mlx5_txq_data *, struct rte_mempool *, - unsigned int); +void mlx5_mp2mr_iter(struct rte_mempool *mp, void *arg); +struct mlx5_mr *priv_txq_mp2mr_reg(struct priv *priv, struct mlx5_txq_data *txq, + struct rte_mempool *mp, unsigned int idx); +struct mlx5_mr *mlx5_txq_mp2mr_reg(struct mlx5_txq_data *txq, + struct rte_mempool *mp, + unsigned int idx); #ifndef NDEBUG /** -- 2.11.0