]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/rdma/ib_verbs.h
Merge branch 'linus' into perf/urgent, to pick up fixes
[linux.git] / include / rdma / ib_verbs.h
index b17eea0373cb8dbc76cd34df354db370ba9969e3..9c0c2132a2d68a012ce3c7f3f12c2f966c040e43 100644 (file)
@@ -2225,6 +2225,16 @@ struct rdma_netdev {
                            union ib_gid *gid, u16 mlid);
 };
 
+struct rdma_netdev_alloc_params {
+       size_t sizeof_priv;
+       unsigned int txqs;
+       unsigned int rxqs;
+       void *param;
+
+       int (*initialize_rdma_netdev)(struct ib_device *device, u8 port_num,
+                                     struct net_device *netdev, void *param);
+};
+
 struct ib_port_pkey_list {
        /* Lock to hold while modifying the list. */
        spinlock_t                    list_lock;
@@ -2526,8 +2536,8 @@ struct ib_device {
        /**
         * rdma netdev operation
         *
-        * Driver implementing alloc_rdma_netdev must return -EOPNOTSUPP if it
-        * doesn't support the specified rdma netdev type.
+        * Driver implementing alloc_rdma_netdev or rdma_netdev_get_params
+        * must return -EOPNOTSUPP if it doesn't support the specified type.
         */
        struct net_device *(*alloc_rdma_netdev)(
                                        struct ib_device *device,
@@ -2537,6 +2547,10 @@ struct ib_device {
                                        unsigned char name_assign_type,
                                        void (*setup)(struct net_device *));
 
+       int (*rdma_netdev_get_params)(struct ib_device *device, u8 port_num,
+                                     enum rdma_netdev_t type,
+                                     struct rdma_netdev_alloc_params *params);
+
        struct module               *owner;
        struct device                dev;
        /* First group for device attributes,
@@ -4195,6 +4209,17 @@ struct ib_ucontext *ib_uverbs_get_ucontext(struct ib_uverbs_file *ufile);
 int uverbs_destroy_def_handler(struct ib_uverbs_file *file,
                               struct uverbs_attr_bundle *attrs);
 
+struct net_device *rdma_alloc_netdev(struct ib_device *device, u8 port_num,
+                                    enum rdma_netdev_t type, const char *name,
+                                    unsigned char name_assign_type,
+                                    void (*setup)(struct net_device *));
+
+int rdma_init_netdev(struct ib_device *device, u8 port_num,
+                    enum rdma_netdev_t type, const char *name,
+                    unsigned char name_assign_type,
+                    void (*setup)(struct net_device *),
+                    struct net_device *netdev);
+
 /**
  * rdma_set_device_sysfs_group - Set device attributes group to have
  *                              driver specific sysfs entries at