[openib-general] [PATCH for-2.6.18] IB/cma: option to limit MTU to 1K

Hal Rosenstock halr at voltaire.com
Wed Sep 13 09:06:21 PDT 2006


On Wed, 2006-09-13 at 11:57, Michael S. Tsirkin wrote:
> Tavor systems get better performance with 1K MTU. Since there does
> not seem to be any way to find out whether the remote system uses Tavor,
> add an option to limit the MTU globally.

Can't Tavor be determined locally ?

And couldn't the remote end negotiate the MTU down (if Tavor) as well ?

> Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
> 
> ---
> 
> Sean, can you ack the following for 2.6.18 please?
> 
> Index: linux-2.6.18-rc2-devel/drivers/infiniband/core/cma.c
> ===================================================================
> --- linux-2.6.18-rc2-devel.orig/drivers/infiniband/core/cma.c	2006-09-11 16:01:37.000000000 +0300
> +++ linux-2.6.18-rc2-devel/drivers/infiniband/core/cma.c	2006-09-13 18:51:45.000000000 +0300
> @@ -48,6 +48,10 @@ MODULE_AUTHOR("Sean Hefty");
>  MODULE_DESCRIPTION("Generic RDMA CM Agent");
>  MODULE_LICENSE("Dual BSD/GPL");
>  
> +static int tavor_quirk = 0;
> +module_param_named(tavor_quirk, tavor_quirk, int, 0644);
> +MODULE_PARM_DESC(tavor_quirk, "Tavor performance quirk: limit MTU to 1K if > 0");
> +
>  #define CMA_CM_RESPONSE_TIMEOUT 20
>  #define CMA_MAX_CM_RETRIES 3
>  
> @@ -1123,6 +1127,11 @@ static int cma_query_ib_route(struct rdm
>  	path_rec.pkey = cpu_to_be16(ib_addr_get_pkey(addr));
>  	path_rec.numb_path = 1;
>  
> +	if (tavor_quirk) {
> +		path_rec.mtu_selector = IB_SA_LTE;
> +		path_rec.mtu = IB_MTU_1024;
> +	}
> +
>  	id_priv->query_id = ib_sa_path_rec_get(id_priv->id.device,
>  				id_priv->id.port_num, &path_rec,
>  				IB_SA_PATH_REC_DGID | IB_SA_PATH_REC_SGID |

Aren't more component mask bits needed here for MTU selector and MTU ?

-- Hal





More information about the general mailing list