All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iw_cxgb4: fix the calculation of ipv6 header size
@ 2017-05-31  6:36 Ganesh Goudar
       [not found] ` <1496212618-18785-1-git-send-email-ganeshgr-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Ganesh Goudar @ 2017-05-31  6:36 UTC (permalink / raw)
  To: dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW,
	nirranjan-ut6Up61K2wZBDgjK7y7TUQ,
	indranil-ut6Up61K2wZBDgjK7y7TUQ, Raju Rangoju, Ganesh Goudar

From: Raju Rangoju <rajur-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>

Take care of ipv6 checks while computing header length for deducing mtu
size of ipv6 servers. Due to the incorrect header length computation for
ipv6 servers, wrong mss is reported to the peer (client).

Signed-off-by: Raju Rangoju <rajur-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Ganesh Goudar <ganeshgr-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
---
 drivers/infiniband/hw/cxgb4/cm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index b6fe459..b54e184 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -2517,7 +2517,8 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb)
 		goto reject;
 	}
 
-	hdrs = sizeof(struct iphdr) + sizeof(struct tcphdr) +
+	hdrs = ((iptype == 4) ? sizeof(struct iphdr) : sizeof(struct ipv6hdr)) +
+	       sizeof(struct tcphdr) +
 	       ((enable_tcp_timestamps && req->tcpopt.tstamp) ? 12 : 0);
 	if (peer_mss && child_ep->mtu > (peer_mss + hdrs))
 		child_ep->mtu = peer_mss + hdrs;
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] iw_cxgb4: fix the calculation of ipv6 header size
       [not found] ` <1496212618-18785-1-git-send-email-ganeshgr-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
@ 2017-05-31 14:09   ` Steve Wise
  2017-06-01 22:51     ` Doug Ledford
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Wise @ 2017-05-31 14:09 UTC (permalink / raw)
  To: 'Ganesh Goudar', dledford-H+wXaHxf7aLQT0dZR+AlfA
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	nirranjan-ut6Up61K2wZBDgjK7y7TUQ,
	indranil-ut6Up61K2wZBDgjK7y7TUQ, 'Raju Rangoju'

> From: Raju Rangoju <rajur-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
> 
> Take care of ipv6 checks while computing header length for deducing mtu
> size of ipv6 servers. Due to the incorrect header length computation for
> ipv6 servers, wrong mss is reported to the peer (client).
> 
> Signed-off-by: Raju Rangoju <rajur-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
> Signed-off-by: Ganesh Goudar <ganeshgr-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>

Acked-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] iw_cxgb4: fix the calculation of ipv6 header size
  2017-05-31 14:09   ` Steve Wise
@ 2017-06-01 22:51     ` Doug Ledford
  0 siblings, 0 replies; 3+ messages in thread
From: Doug Ledford @ 2017-06-01 22:51 UTC (permalink / raw)
  To: Steve Wise, 'Ganesh Goudar'
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	nirranjan-ut6Up61K2wZBDgjK7y7TUQ,
	indranil-ut6Up61K2wZBDgjK7y7TUQ, 'Raju Rangoju'

On Wed, 2017-05-31 at 09:09 -0500, Steve Wise wrote:
> > 
> > From: Raju Rangoju <rajur-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
> > 
> > Take care of ipv6 checks while computing header length for deducing
> > mtu
> > size of ipv6 servers. Due to the incorrect header length
> > computation for
> > ipv6 servers, wrong mss is reported to the peer (client).
> > 
> > Signed-off-by: Raju Rangoju <rajur-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
> > Signed-off-by: Ganesh Goudar <ganeshgr-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
> 
> Acked-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>

Thanks, applied.

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG KeyID: B826A3330E572FDD
   
Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-01 22:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-31  6:36 [PATCH] iw_cxgb4: fix the calculation of ipv6 header size Ganesh Goudar
     [not found] ` <1496212618-18785-1-git-send-email-ganeshgr-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
2017-05-31 14:09   ` Steve Wise
2017-06-01 22:51     ` Doug Ledford

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.