diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index ee1182f..8941b64 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c @@ -135,6 +135,16 @@ module_param(snd_win, int, 0644); MODULE_PARM_DESC(snd_win, "TCP send window in bytes (default=128KB)"); +/* + * Experimental large FPDU length support. + * This improves overall throughput while interop with SoftiWARP. + * Note that iw_cxgb4 advertises it's receiving capability only and ignores + * the remote peer's large FPDU length announcement, due to T6 HW limitaton. + */ +static int large_fpdulen; +module_param(large_fpdulen, int, 0644); +MODULE_PARM_DESC(large_fpdulen, "Experimental large FPDU length"); + static struct workqueue_struct *workq; static struct sk_buff_head rxq; @@ -978,6 +988,12 @@ static int send_mpa_req(struct c4iw_ep *ep, struct sk_buff *skb, mpa->flags = 0; if (crc_enabled) mpa->flags |= MPA_CRC; + if (large_fpdulen) { + if (CHELSIO_CHIP_VERSION(ep->com.dev->rdev.lldi.adapter_type) >= + CHELSIO_T6) + mpa->flags |= MPA_FPDU_LEN_16K; + } + if (markers_enabled) { mpa->flags |= MPA_MARKERS; ep->mpa_attr.recv_marker_enabled = 1; @@ -1166,6 +1182,11 @@ static int send_mpa_reply(struct c4iw_ep *ep, const void *pdata, u8 plen) mpa->flags |= MPA_CRC; if (ep->mpa_attr.recv_marker_enabled) mpa->flags |= MPA_MARKERS; + if (large_fpdulen) { + if (CHELSIO_CHIP_VERSION(ep->com.dev->rdev.lldi.adapter_type) >= + CHELSIO_T6) + mpa->flags |= MPA_FPDU_LEN_16K; + } mpa->revision = ep->mpa_attr.version; mpa->private_data_size = htons(plen); diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h index 7d06b0f..051830e 100644 --- a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h +++ b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h @@ -688,6 +688,15 @@ enum c4iw_mmid_state { #define MPA_V2_RDMA_READ_RTR 0x4000 #define MPA_V2_IRD_ORD_MASK 0x3FFF +/* Following experimental bits should be in sync with SoftiWARP bits */ +#define MPA_FPDU_LEN_MASK 0x000c +enum { + MPA_FPDU_LEN_DEFAULT = cpu_to_be16(0x0000), + MPA_FPDU_LEN_16K = cpu_to_be16(0x0400), + MPA_FPDU_LEN_32K = cpu_to_be16(0x0800), + MPA_FPDU_LEN_64K = cpu_to_be16(0x0c00) +}; + #define c4iw_put_ep(ep) { \ pr_debug("put_ep ep %p refcnt %d\n", \ ep, kref_read(&((ep)->kref))); \