ib_verbs.h (e24dd9ee5399747b71c1d982a484fc7601795f31) | ib_verbs.h (8e959601996dc645f4ed7004482a1667c27deb39) |
---|---|
1/* 2 * Copyright (c) 2004 Mellanox Technologies Ltd. All rights reserved. 3 * Copyright (c) 2004 Infinicon Corporation. All rights reserved. 4 * Copyright (c) 2004 Intel Corporation. All rights reserved. 5 * Copyright (c) 2004 Topspin Corporation. All rights reserved. 6 * Copyright (c) 2004 Voltaire Corporation. All rights reserved. 7 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. 8 * Copyright (c) 2005, 2006, 2007 Cisco Systems. All rights reserved. --- 1600 unchanged lines hidden (view full) --- 1609}; 1610 1611struct ib_rwq_ind_table_init_attr { 1612 u32 log_ind_tbl_size; 1613 /* Each entry is a pointer to Receive Work Queue */ 1614 struct ib_wq **ind_tbl; 1615}; 1616 | 1/* 2 * Copyright (c) 2004 Mellanox Technologies Ltd. All rights reserved. 3 * Copyright (c) 2004 Infinicon Corporation. All rights reserved. 4 * Copyright (c) 2004 Intel Corporation. All rights reserved. 5 * Copyright (c) 2004 Topspin Corporation. All rights reserved. 6 * Copyright (c) 2004 Voltaire Corporation. All rights reserved. 7 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. 8 * Copyright (c) 2005, 2006, 2007 Cisco Systems. All rights reserved. --- 1600 unchanged lines hidden (view full) --- 1609}; 1610 1611struct ib_rwq_ind_table_init_attr { 1612 u32 log_ind_tbl_size; 1613 /* Each entry is a pointer to Receive Work Queue */ 1614 struct ib_wq **ind_tbl; 1615}; 1616 |
1617enum port_pkey_state { 1618 IB_PORT_PKEY_NOT_VALID = 0, 1619 IB_PORT_PKEY_VALID = 1, 1620 IB_PORT_PKEY_LISTED = 2, 1621}; 1622 1623struct ib_qp_security; 1624 1625struct ib_port_pkey { 1626 enum port_pkey_state state; 1627 u16 pkey_index; 1628 u8 port_num; 1629 struct list_head qp_list; 1630 struct list_head to_error_list; 1631 struct ib_qp_security *sec; 1632}; 1633 1634struct ib_ports_pkeys { 1635 struct ib_port_pkey main; 1636 struct ib_port_pkey alt; 1637}; 1638 1639struct ib_qp_security { 1640 struct ib_qp *qp; 1641 struct ib_device *dev; 1642 /* Hold this mutex when changing port and pkey settings. */ 1643 struct mutex mutex; 1644 struct ib_ports_pkeys *ports_pkeys; 1645 /* A list of all open shared QP handles. Required to enforce security 1646 * properly for all users of a shared QP. 1647 */ 1648 struct list_head shared_qp_list; 1649 void *security; 1650 bool destroying; 1651 atomic_t error_list_count; 1652 struct completion error_complete; 1653 int error_comps_pending; 1654}; 1655 | |
1656/* 1657 * @max_write_sge: Maximum SGE elements per RDMA WRITE request. 1658 * @max_read_sge: Maximum SGE elements per RDMA READ request. 1659 */ 1660struct ib_qp { 1661 struct ib_device *device; 1662 struct ib_pd *pd; 1663 struct ib_cq *send_cq; --- 13 unchanged lines hidden (view full) --- 1677 struct ib_uobject *uobject; 1678 void (*event_handler)(struct ib_event *, void *); 1679 void *qp_context; 1680 u32 qp_num; 1681 u32 max_write_sge; 1682 u32 max_read_sge; 1683 enum ib_qp_type qp_type; 1684 struct ib_rwq_ind_table *rwq_ind_tbl; | 1617/* 1618 * @max_write_sge: Maximum SGE elements per RDMA WRITE request. 1619 * @max_read_sge: Maximum SGE elements per RDMA READ request. 1620 */ 1621struct ib_qp { 1622 struct ib_device *device; 1623 struct ib_pd *pd; 1624 struct ib_cq *send_cq; --- 13 unchanged lines hidden (view full) --- 1638 struct ib_uobject *uobject; 1639 void (*event_handler)(struct ib_event *, void *); 1640 void *qp_context; 1641 u32 qp_num; 1642 u32 max_write_sge; 1643 u32 max_read_sge; 1644 enum ib_qp_type qp_type; 1645 struct ib_rwq_ind_table *rwq_ind_tbl; |
1685 struct ib_qp_security *qp_sec; | |
1686}; 1687 1688struct ib_mr { 1689 struct ib_device *device; 1690 struct ib_pd *pd; 1691 u32 lkey; 1692 u32 rkey; 1693 u64 iova; --- 232 unchanged lines hidden (view full) --- 1926enum ib_mad_result { 1927 IB_MAD_RESULT_FAILURE = 0, /* (!SUCCESS is the important flag) */ 1928 IB_MAD_RESULT_SUCCESS = 1 << 0, /* MAD was successfully processed */ 1929 IB_MAD_RESULT_REPLY = 1 << 1, /* Reply packet needs to be sent */ 1930 IB_MAD_RESULT_CONSUMED = 1 << 2 /* Packet consumed: stop processing */ 1931}; 1932 1933struct ib_port_cache { | 1646}; 1647 1648struct ib_mr { 1649 struct ib_device *device; 1650 struct ib_pd *pd; 1651 u32 lkey; 1652 u32 rkey; 1653 u64 iova; --- 232 unchanged lines hidden (view full) --- 1886enum ib_mad_result { 1887 IB_MAD_RESULT_FAILURE = 0, /* (!SUCCESS is the important flag) */ 1888 IB_MAD_RESULT_SUCCESS = 1 << 0, /* MAD was successfully processed */ 1889 IB_MAD_RESULT_REPLY = 1 << 1, /* Reply packet needs to be sent */ 1890 IB_MAD_RESULT_CONSUMED = 1 << 2 /* Packet consumed: stop processing */ 1891}; 1892 1893struct ib_port_cache { |
1934 u64 subnet_prefix; | |
1935 struct ib_pkey_cache *pkey; 1936 struct ib_gid_table *gid; 1937 u8 lmc; 1938 enum ib_port_state port_state; 1939}; 1940 1941struct ib_cache { 1942 rwlock_t lock; --- 20 unchanged lines hidden (view full) --- 1963 * struct rdma_netdev - rdma netdev 1964 * For cases where netstack interfacing is required. 1965 */ 1966struct rdma_netdev { 1967 void *clnt_priv; 1968 struct ib_device *hca; 1969 u8 port_num; 1970 | 1894 struct ib_pkey_cache *pkey; 1895 struct ib_gid_table *gid; 1896 u8 lmc; 1897 enum ib_port_state port_state; 1898}; 1899 1900struct ib_cache { 1901 rwlock_t lock; --- 20 unchanged lines hidden (view full) --- 1922 * struct rdma_netdev - rdma netdev 1923 * For cases where netstack interfacing is required. 1924 */ 1925struct rdma_netdev { 1926 void *clnt_priv; 1927 struct ib_device *hca; 1928 u8 port_num; 1929 |
1930 /* cleanup function must be specified */ 1931 void (*free_rdma_netdev)(struct net_device *netdev); 1932 |
|
1971 /* control functions */ 1972 void (*set_id)(struct net_device *netdev, int id); 1973 /* send packet */ 1974 int (*send)(struct net_device *dev, struct sk_buff *skb, 1975 struct ib_ah *address, u32 dqpn); 1976 /* multicast */ 1977 int (*attach_mcast)(struct net_device *dev, struct ib_device *hca, 1978 union ib_gid *gid, u16 mlid, 1979 int set_qkey, u32 qkey); 1980 int (*detach_mcast)(struct net_device *dev, struct ib_device *hca, 1981 union ib_gid *gid, u16 mlid); 1982}; 1983 | 1933 /* control functions */ 1934 void (*set_id)(struct net_device *netdev, int id); 1935 /* send packet */ 1936 int (*send)(struct net_device *dev, struct sk_buff *skb, 1937 struct ib_ah *address, u32 dqpn); 1938 /* multicast */ 1939 int (*attach_mcast)(struct net_device *dev, struct ib_device *hca, 1940 union ib_gid *gid, u16 mlid, 1941 int set_qkey, u32 qkey); 1942 int (*detach_mcast)(struct net_device *dev, struct ib_device *hca, 1943 union ib_gid *gid, u16 mlid); 1944}; 1945 |
1984struct ib_port_pkey_list { 1985 /* Lock to hold while modifying the list. */ 1986 spinlock_t list_lock; 1987 struct list_head pkey_list; 1988}; 1989 | |
1990struct ib_device { 1991 /* Do not access @dma_device directly from ULP nor from HW drivers. */ 1992 struct device *dma_device; 1993 1994 char name[IB_DEVICE_NAME_MAX]; 1995 1996 struct list_head event_handler_list; 1997 spinlock_t event_handler_lock; --- 7 unchanged lines hidden (view full) --- 2005 struct ib_cache cache; 2006 /** 2007 * port_immutable is indexed by port number 2008 */ 2009 struct ib_port_immutable *port_immutable; 2010 2011 int num_comp_vectors; 2012 | 1946struct ib_device { 1947 /* Do not access @dma_device directly from ULP nor from HW drivers. */ 1948 struct device *dma_device; 1949 1950 char name[IB_DEVICE_NAME_MAX]; 1951 1952 struct list_head event_handler_list; 1953 spinlock_t event_handler_lock; --- 7 unchanged lines hidden (view full) --- 1961 struct ib_cache cache; 1962 /** 1963 * port_immutable is indexed by port number 1964 */ 1965 struct ib_port_immutable *port_immutable; 1966 1967 int num_comp_vectors; 1968 |
2013 struct ib_port_pkey_list *port_pkey_list; 2014 | |
2015 struct iw_cm_verbs *iwcm; 2016 2017 /** 2018 * alloc_hw_stats - Allocate a struct rdma_hw_stats and fill in the 2019 * driver initialized data. The struct is kfree()'ed by the sysfs 2020 * core when the device is removed. A lifespan of -1 in the return 2021 * struct tells the core to set a default lifespan. 2022 */ --- 215 unchanged lines hidden (view full) --- 2238 struct ib_wq_attr *attr, 2239 u32 wq_attr_mask, 2240 struct ib_udata *udata); 2241 struct ib_rwq_ind_table * (*create_rwq_ind_table)(struct ib_device *device, 2242 struct ib_rwq_ind_table_init_attr *init_attr, 2243 struct ib_udata *udata); 2244 int (*destroy_rwq_ind_table)(struct ib_rwq_ind_table *wq_ind_table); 2245 /** | 1969 struct iw_cm_verbs *iwcm; 1970 1971 /** 1972 * alloc_hw_stats - Allocate a struct rdma_hw_stats and fill in the 1973 * driver initialized data. The struct is kfree()'ed by the sysfs 1974 * core when the device is removed. A lifespan of -1 in the return 1975 * struct tells the core to set a default lifespan. 1976 */ --- 215 unchanged lines hidden (view full) --- 2192 struct ib_wq_attr *attr, 2193 u32 wq_attr_mask, 2194 struct ib_udata *udata); 2195 struct ib_rwq_ind_table * (*create_rwq_ind_table)(struct ib_device *device, 2196 struct ib_rwq_ind_table_init_attr *init_attr, 2197 struct ib_udata *udata); 2198 int (*destroy_rwq_ind_table)(struct ib_rwq_ind_table *wq_ind_table); 2199 /** |
2246 * rdma netdev operations | 2200 * rdma netdev operation |
2247 * 2248 * Driver implementing alloc_rdma_netdev must return -EOPNOTSUPP if it 2249 * doesn't support the specified rdma netdev type. 2250 */ 2251 struct net_device *(*alloc_rdma_netdev)( 2252 struct ib_device *device, 2253 u8 port_num, 2254 enum rdma_netdev_t type, 2255 const char *name, 2256 unsigned char name_assign_type, 2257 void (*setup)(struct net_device *)); | 2201 * 2202 * Driver implementing alloc_rdma_netdev must return -EOPNOTSUPP if it 2203 * doesn't support the specified rdma netdev type. 2204 */ 2205 struct net_device *(*alloc_rdma_netdev)( 2206 struct ib_device *device, 2207 u8 port_num, 2208 enum rdma_netdev_t type, 2209 const char *name, 2210 unsigned char name_assign_type, 2211 void (*setup)(struct net_device *)); |
2258 void (*free_rdma_netdev)(struct net_device *netdev); | |
2259 2260 struct module *owner; 2261 struct device dev; 2262 struct kobject *ports_parent; 2263 struct list_head port_list; 2264 2265 enum { 2266 IB_DEV_UNINITIALIZED, --- 1425 unchanged lines hidden --- | 2212 2213 struct module *owner; 2214 struct device dev; 2215 struct kobject *ports_parent; 2216 struct list_head port_list; 2217 2218 enum { 2219 IB_DEV_UNINITIALIZED, --- 1425 unchanged lines hidden --- |