11da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* 21da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. 32a1d9b7f09aaaacf235656cb32a40ba2c79590b3Roland Dreier * Copyright (c) 2005 Mellanox Technologies. All rights reserved. 41da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 51da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * This software is available to you under a choice of one of two 61da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * licenses. You may choose to be licensed under the terms of the GNU 71da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * General Public License (GPL) Version 2, available from the file 81da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * COPYING in the main directory of this source tree, or the 91da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * OpenIB.org BSD license below: 101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * Redistribution and use in source and binary forms, with or 121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * without modification, are permitted provided that the following 131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * conditions are met: 141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * - Redistributions of source code must retain the above 161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * copyright notice, this list of conditions and the following 171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * disclaimer. 181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * - Redistributions in binary form must reproduce the above 201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * copyright notice, this list of conditions and the following 211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * disclaimer in the documentation and/or other materials 221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * provided with the distribution. 231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * 241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds * SOFTWARE. 321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */ 331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#ifndef MTHCA_PROFILE_H 351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MTHCA_PROFILE_H 361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#include "mthca_dev.h" 381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#include "mthca_cmd.h" 391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct mthca_profile { 411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds int num_qp; 421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds int rdb_per_qp; 43ec34a922d243c3401a694450734e9effb2bafbfeRoland Dreier int num_srq; 441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds int num_cq; 451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds int num_mcg; 461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds int num_mpt; 471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds int num_mtt; 481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds int num_udav; 491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds int num_uar; 501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds int uarc_size; 51e0f5fdca1ca9d1659b920827e5cf6dbad20e5391Michael S. Tsirkin int fmr_reserved_mtts; 521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds}; 531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 5419773539d6369c54fbb0c870de0c75417b0020d1Roland Dreiers64 mthca_make_profile(struct mthca_dev *mdev, 551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds struct mthca_profile *request, 561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds struct mthca_dev_lim *dev_lim, 571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds struct mthca_init_hca_param *init_hca); 581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds 591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#endif /* MTHCA_PROFILE_H */ 60