All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Add missing neigh_release, fix ntuple calculation for IPv6
@ 2014-09-23 22:23 Hariprasad Shenai
       [not found] ` <1411511023-14101-1-git-send-email-hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Hariprasad Shenai @ 2014-09-23 22:23 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, roland-BHEL68pLQRGGvPXPguhicg
  Cc: swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW,
	nirranjan-ut6Up61K2wZBDgjK7y7TUQ, kumaras-ut6Up61K2wZBDgjK7y7TUQ,
	pramod-ut6Up61K2wZBDgjK7y7TUQ, Hariprasad Shenai

This patch series adds missing neigh release in find_route function and also
takes IPv6 into consideration in best_mtu and set_emss function. It also fixes
ntuple calculation for IPv6 for T5 adapter.

The patches series is created against 'infiniband' tree.
And includes patches on iw_cxgb4 driver.

We have included all the maintainers of respective drivers. Kindly review the
change and let us know in case of any review comments.

Thanks

Hariprasad Shenai (3):
  RDMA/cxgb4: Take IPv6 into account for best_mtu and set_emss
  RDMA/cxgb4: Add missing neigh_release in find_route
  RDMA/cxgb4: Fix ntuple calculation for ipv6 and remove duplicate line

 drivers/infiniband/hw/cxgb4/cm.c |   32 ++++++++++++++++++++------------
 1 files changed, 20 insertions(+), 12 deletions(-)

--
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] 6+ messages in thread

* [PATCH 1/3] RDMA/cxgb4: Take IPv6 into account for best_mtu and set_emss
       [not found] ` <1411511023-14101-1-git-send-email-hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
@ 2014-09-23 22:23   ` Hariprasad Shenai
  2014-09-23 22:23   ` [PATCH 2/3] RDMA/cxgb4: Add missing neigh_release in find_route Hariprasad Shenai
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Hariprasad Shenai @ 2014-09-23 22:23 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, roland-BHEL68pLQRGGvPXPguhicg
  Cc: swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW,
	nirranjan-ut6Up61K2wZBDgjK7y7TUQ, kumaras-ut6Up61K2wZBDgjK7y7TUQ,
	pramod-ut6Up61K2wZBDgjK7y7TUQ, Hariprasad Shenai

best_mtu and set_emss was not considering ipv6 header for ipv6 case

Signed-off-by: Hariprasad Shenai <hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
---
 drivers/infiniband/hw/cxgb4/cm.c |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index c2fb71c..2ca9ec8 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -236,10 +236,12 @@ static void release_tid(struct c4iw_rdev *rdev, u32 hwtid, struct sk_buff *skb)
 static void set_emss(struct c4iw_ep *ep, u16 opt)
 {
 	ep->emss = ep->com.dev->rdev.lldi.mtus[GET_TCPOPT_MSS(opt)] -
-		   sizeof(struct iphdr) - sizeof(struct tcphdr);
+		   ((AF_INET == ep->com.remote_addr.ss_family) ?
+		    sizeof(struct iphdr) : sizeof(struct ipv6hdr)) -
+		   sizeof(struct tcphdr);
 	ep->mss = ep->emss;
 	if (GET_TCPOPT_TSTAMP(opt))
-		ep->emss -= 12;
+		ep->emss -= round_up(TCPOLEN_TIMESTAMP, 4);
 	if (ep->emss < 128)
 		ep->emss = 128;
 	if (ep->emss & 7)
@@ -581,11 +583,14 @@ static void c4iw_record_pm_msg(struct c4iw_ep *ep,
 }
 
 static void best_mtu(const unsigned short *mtus, unsigned short mtu,
-		     unsigned int *idx, int use_ts)
+		     unsigned int *idx, int use_ts, int ipv6)
 {
-	unsigned short hdr_size = sizeof(struct iphdr) +
+	unsigned short hdr_size = (ipv6 ?
+				   sizeof(struct ipv6hdr) :
+				   sizeof(struct iphdr)) +
 				  sizeof(struct tcphdr) +
-				  (use_ts ? 12 : 0);
+				  (use_ts ?
+				   round_up(TCPOLEN_TIMESTAMP, 4) : 0);
 	unsigned short data_size = mtu - hdr_size;
 
 	cxgb4_best_aligned_mtu(mtus, hdr_size, data_size, 8, idx);
@@ -634,7 +639,8 @@ static int send_connect(struct c4iw_ep *ep)
 	set_wr_txq(skb, CPL_PRIORITY_SETUP, ep->ctrlq_idx);
 
 	best_mtu(ep->com.dev->rdev.lldi.mtus, ep->mtu, &mtu_idx,
-		 enable_tcp_timestamps);
+		 enable_tcp_timestamps,
+		 (AF_INET == ep->com.remote_addr.ss_family) ? 0 : 1);
 	wscale = compute_wscale(rcv_win);
 
 	/*
@@ -1763,7 +1769,8 @@ static void send_fw_act_open_req(struct c4iw_ep *ep, unsigned int atid)
 	req->tcb.tx_max = (__force __be32) jiffies;
 	req->tcb.rcv_adv = htons(1);
 	best_mtu(ep->com.dev->rdev.lldi.mtus, ep->mtu, &mtu_idx,
-		 enable_tcp_timestamps);
+		 enable_tcp_timestamps,
+		 (AF_INET == ep->com.remote_addr.ss_family) ? 0 : 1);
 	wscale = compute_wscale(rcv_win);
 
 	/*
@@ -2162,7 +2169,8 @@ static void accept_cr(struct c4iw_ep *ep, struct sk_buff *skb,
 						    ep->hwtid));
 
 	best_mtu(ep->com.dev->rdev.lldi.mtus, ep->mtu, &mtu_idx,
-		 enable_tcp_timestamps && req->tcpopt.tstamp);
+		 enable_tcp_timestamps && req->tcpopt.tstamp,
+		 (AF_INET == ep->com.remote_addr.ss_family) ? 0 : 1);
 	wscale = compute_wscale(rcv_win);
 
 	/*
-- 
1.7.1

--
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] 6+ messages in thread

* [PATCH 2/3] RDMA/cxgb4: Add missing neigh_release in find_route
       [not found] ` <1411511023-14101-1-git-send-email-hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
  2014-09-23 22:23   ` [PATCH 1/3] RDMA/cxgb4: Take IPv6 into account for best_mtu and set_emss Hariprasad Shenai
@ 2014-09-23 22:23   ` Hariprasad Shenai
  2014-09-23 22:23   ` [PATCH 3/3] RDMA/cxgb4: Fix ntuple calculation for ipv6 and remove duplicate line Hariprasad Shenai
  2014-09-25 17:23   ` [PATCH 0/3] Add missing neigh_release, fix ntuple calculation for IPv6 Steve Wise
  3 siblings, 0 replies; 6+ messages in thread
From: Hariprasad Shenai @ 2014-09-23 22:23 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, roland-BHEL68pLQRGGvPXPguhicg
  Cc: swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW,
	nirranjan-ut6Up61K2wZBDgjK7y7TUQ, kumaras-ut6Up61K2wZBDgjK7y7TUQ,
	pramod-ut6Up61K2wZBDgjK7y7TUQ, Hariprasad Shenai

Signed-off-by: Hariprasad Shenai <hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
---
 drivers/infiniband/hw/cxgb4/cm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 2ca9ec8..2ee9892 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -417,6 +417,7 @@ static struct dst_entry *find_route(struct c4iw_dev *dev, __be32 local_ip,
 		return NULL;
 	if (!our_interface(dev, n->dev) &&
 	    !(n->dev->flags & IFF_LOOPBACK)) {
+		neigh_release(n);
 		dst_release(&rt->dst);
 		return NULL;
 	}
-- 
1.7.1

--
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] 6+ messages in thread

* [PATCH 3/3] RDMA/cxgb4: Fix ntuple calculation for ipv6 and remove duplicate line
       [not found] ` <1411511023-14101-1-git-send-email-hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
  2014-09-23 22:23   ` [PATCH 1/3] RDMA/cxgb4: Take IPv6 into account for best_mtu and set_emss Hariprasad Shenai
  2014-09-23 22:23   ` [PATCH 2/3] RDMA/cxgb4: Add missing neigh_release in find_route Hariprasad Shenai
@ 2014-09-23 22:23   ` Hariprasad Shenai
  2014-09-25 17:23   ` [PATCH 0/3] Add missing neigh_release, fix ntuple calculation for IPv6 Steve Wise
  3 siblings, 0 replies; 6+ messages in thread
From: Hariprasad Shenai @ 2014-09-23 22:23 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, roland-BHEL68pLQRGGvPXPguhicg
  Cc: swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW,
	nirranjan-ut6Up61K2wZBDgjK7y7TUQ, kumaras-ut6Up61K2wZBDgjK7y7TUQ,
	pramod-ut6Up61K2wZBDgjK7y7TUQ, Hariprasad Shenai

This fixes ntuple calculation for IPv6 active open request for T5 adapter.
And also removes an duplicate line which got added in commit
92e7ae71726c ("iw_cxgb4: Choose appropriate hw mtu index and ISS for iWARP
connections")

Signed-off-by: Hariprasad Shenai <hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
---
 drivers/infiniband/hw/cxgb4/cm.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 2ee9892..fb61f66 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -675,6 +675,7 @@ static int send_connect(struct c4iw_ep *ep)
 	if (is_t5(ep->com.dev->rdev.lldi.adapter_type)) {
 		opt2 |= T5_OPT_2_VALID;
 		opt2 |= V_CONG_CNTRL(CONG_ALG_TAHOE);
+		opt2 |= CONG_CNTRL_VALID; /* OPT_2_ISS for T5 */
 	}
 	t4_set_arp_err_handler(skb, ep, act_open_req_arp_failure);
 
@@ -720,8 +721,6 @@ static int send_connect(struct c4iw_ep *ep)
 	} else {
 		u32 isn = (prandom_u32() & ~7UL) - 1;
 
-		opt2 |= T5_OPT_2_VALID;
-		opt2 |= CONG_CNTRL_VALID; /* OPT_2_ISS for T5 */
 		if (peer2peer)
 			isn += 4;
 
@@ -763,10 +762,10 @@ static int send_connect(struct c4iw_ep *ep)
 			t5_req6->peer_ip_lo = *((__be64 *)
 						(ra6->sin6_addr.s6_addr + 8));
 			t5_req6->opt0 = cpu_to_be64(opt0);
-			t5_req6->params = (__force __be64)cpu_to_be32(
+			t5_req6->params = cpu_to_be64(V_FILTER_TUPLE(
 							cxgb4_select_ntuple(
 						ep->com.dev->rdev.lldi.ports[0],
-						ep->l2t));
+						ep->l2t)));
 			t5_req6->rsvd = cpu_to_be32(isn);
 			PDBG("%s snd_isn %u\n", __func__,
 			     be32_to_cpu(t5_req6->rsvd));
-- 
1.7.1

--
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] 6+ messages in thread

* RE: [PATCH 0/3] Add missing neigh_release, fix ntuple calculation for IPv6
       [not found] ` <1411511023-14101-1-git-send-email-hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
                     ` (2 preceding siblings ...)
  2014-09-23 22:23   ` [PATCH 3/3] RDMA/cxgb4: Fix ntuple calculation for ipv6 and remove duplicate line Hariprasad Shenai
@ 2014-09-25 17:23   ` Steve Wise
  2014-10-08 13:52     ` Steve Wise
  3 siblings, 1 reply; 6+ messages in thread
From: Steve Wise @ 2014-09-25 17:23 UTC (permalink / raw)
  To: 'Hariprasad Shenai', linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	roland-BHEL68pLQRGGvPXPguhicg
  Cc: nirranjan-ut6Up61K2wZBDgjK7y7TUQ, kumaras-ut6Up61K2wZBDgjK7y7TUQ,
	pramod-ut6Up61K2wZBDgjK7y7TUQ

Hey Roland, any chance these bug fixes can make 3.17?

Steve.
> -----Original Message-----
> From: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org [mailto:linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Hariprasad Shenai
> Sent: Tuesday, September 23, 2014 5:24 PM
> To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org
> Cc: swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org; nirranjan-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org; kumaras-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org; pramod-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org; Hariprasad Shenai
> Subject: [PATCH 0/3] Add missing neigh_release, fix ntuple calculation for IPv6
> 
> This patch series adds missing neigh release in find_route function and also
> takes IPv6 into consideration in best_mtu and set_emss function. It also fixes
> ntuple calculation for IPv6 for T5 adapter.
> 
> The patches series is created against 'infiniband' tree.
> And includes patches on iw_cxgb4 driver.
> 
> We have included all the maintainers of respective drivers. Kindly review the
> change and let us know in case of any review comments.
> 
> Thanks
> 
> Hariprasad Shenai (3):
>   RDMA/cxgb4: Take IPv6 into account for best_mtu and set_emss
>   RDMA/cxgb4: Add missing neigh_release in find_route
>   RDMA/cxgb4: Fix ntuple calculation for ipv6 and remove duplicate line
> 
>  drivers/infiniband/hw/cxgb4/cm.c |   32 ++++++++++++++++++++------------
>  1 files changed, 20 insertions(+), 12 deletions(-)
> 
> --
> 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

--
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] 6+ messages in thread

* Re: [PATCH 0/3] Add missing neigh_release, fix ntuple calculation for IPv6
  2014-09-25 17:23   ` [PATCH 0/3] Add missing neigh_release, fix ntuple calculation for IPv6 Steve Wise
@ 2014-10-08 13:52     ` Steve Wise
  0 siblings, 0 replies; 6+ messages in thread
From: Steve Wise @ 2014-10-08 13:52 UTC (permalink / raw)
  To: 'Hariprasad Shenai', linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	roland-BHEL68pLQRGGvPXPguhicg
  Cc: nirranjan-ut6Up61K2wZBDgjK7y7TUQ, kumaras-ut6Up61K2wZBDgjK7y7TUQ,
	pramod-ut6Up61K2wZBDgjK7y7TUQ

Hey Roland, please make sure these make the 3.18 merge , if they are 
acceptable to you.

Thanks,

Steve.
--
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] 6+ messages in thread

end of thread, other threads:[~2014-10-08 13:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-23 22:23 [PATCH 0/3] Add missing neigh_release, fix ntuple calculation for IPv6 Hariprasad Shenai
     [not found] ` <1411511023-14101-1-git-send-email-hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
2014-09-23 22:23   ` [PATCH 1/3] RDMA/cxgb4: Take IPv6 into account for best_mtu and set_emss Hariprasad Shenai
2014-09-23 22:23   ` [PATCH 2/3] RDMA/cxgb4: Add missing neigh_release in find_route Hariprasad Shenai
2014-09-23 22:23   ` [PATCH 3/3] RDMA/cxgb4: Fix ntuple calculation for ipv6 and remove duplicate line Hariprasad Shenai
2014-09-25 17:23   ` [PATCH 0/3] Add missing neigh_release, fix ntuple calculation for IPv6 Steve Wise
2014-10-08 13:52     ` Steve Wise

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.