On 5/11/2020 1:11 PM, Jason Gunthorpe wrote:
+/**
+ * rdma_mtu_from_attr - Return the mtu of the port from the port attribute.
+ * @device: Device
+ * @port_num: Port number
+ * @attr: port attribute
+ *
+ * Return the MTU size supported by the port as an integer value.
+ */
+static inline int rdma_mtu_from_attr(struct ib_device *device, u8 port,
+ struct ib_port_attr *attr)
+{
+ if (rdma_core_cap_opa_port(device, port))
+ return attr->phys_mtu;
Why not just always set this?
Because this is a new field and other vendor devices does not set it at all.
Fix the other drivers to set it to the 'else' branch..
Seems reasonable. We'll do that in the next version.
-Denny