IB/rdmavt: Add driver notification for new AH

Drivers may need to do some work once an address handle has been
created. Add a driver function for this purpose.

Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Harish Chegondi <harish.chegondi@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
diff --git a/include/rdma/rdma_vt.h b/include/rdma/rdma_vt.h
index a3d6a5b..ef66d2b 100644
--- a/include/rdma/rdma_vt.h
+++ b/include/rdma/rdma_vt.h
@@ -467,23 +467,6 @@
 	int nports;
 };
 
-/*
- * Functions that drivers are required to support
- */
-struct rvt_dev_info;
-struct rvt_driver_provided {
-	/*
-	 * The work to create port files in /sys/class Infiniband is different
-	 * depending on the driver. This should not be extracted away and
-	 * instead drivers are responsible for setting the correct callback for
-	 * this.
-	 */
-	int (*port_callback)(struct ib_device *, u8, struct kobject *);
-	const char * (*get_card_name)(struct rvt_dev_info *rdi);
-	struct pci_dev * (*get_pci_dev)(struct rvt_dev_info *rdi);
-	int (*check_ah)(struct ib_device *, struct ib_ah_attr *);
-};
-
 /* Protection domain */
 struct rvt_pd {
 	struct ib_pd ibpd;
@@ -495,6 +478,32 @@
 	struct ib_ah ibah;
 	struct ib_ah_attr attr;
 	atomic_t refcount;
+	u8 vl;
+	u8 log_pmtu;
+};
+
+struct rvt_dev_info;
+struct rvt_driver_provided {
+	/*
+	 * The work to create port files in /sys/class Infiniband is different
+	 * depending on the driver. This should not be extracted away and
+	 * instead drivers are responsible for setting the correct callback for
+	 * this.
+	 */
+
+	/* -------------------*/
+	/* Required functions */
+	/* -------------------*/
+	int (*port_callback)(struct ib_device *, u8, struct kobject *);
+	const char * (*get_card_name)(struct rvt_dev_info *rdi);
+	struct pci_dev * (*get_pci_dev)(struct rvt_dev_info *rdi);
+
+	/*--------------------*/
+	/* Optional functions */
+	/*--------------------*/
+	int (*check_ah)(struct ib_device *, struct ib_ah_attr *);
+	void (*notify_new_ah)(struct ib_device *, struct ib_ah_attr *,
+			      struct rvt_ah *);
 };
 
 struct rvt_dev_info {