All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hefty, Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	"roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
	<roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org"
	<erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Shlomo Pongratz <shlomop-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: RE: [PATCH V2 for-next 1/6] IB/ipoib: Fix ipoib_neigh hashing to use the correct daddr octets
Date: Mon, 11 Feb 2013 19:46:12 +0000	[thread overview]
Message-ID: <1828884A29C6694DAF28B7E6B8A8237368B99DDC@ORSMSX101.amr.corp.intel.com> (raw)
In-Reply-To: <1360079337-8173-2-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

> The hash function introduced in commit b63b70d877 "IPoIB: Use a private hash
> table for path lookup in xmit path" was designd to use the 3 octets of the
> IPoIB HW address that holds the remote QPN. However, this currently isn't
> the case under little endian machines as the code there uses the flags part
> (octet[0]) and not the last octet of the QPN (octet[3]), fix that.
> 
> The fix caused a checkpatch warning on line over 80 characters, to
> solve that changed the name of the temp variable that holds the daddr.
> 
> Signed-off-by: Shlomo Pongratz <shlomop-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
>  drivers/infiniband/ulp/ipoib/ipoib_main.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> index 6fdc9e7..e459fa7 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> @@ -844,10 +844,10 @@ static u32 ipoib_addr_hash(struct ipoib_neigh_hash *htbl,
> u8 *daddr)
>  	 * different subnets.
>  	 */
>  	 /* qpn octets[1:4) & port GUID octets[12:20) */
> -	u32 *daddr_32 = (u32 *) daddr;
> +	u32 *d32 = (u32 *)daddr;
>  	u32 hv;
> 
> -	hv = jhash_3words(daddr_32[3], daddr_32[4], 0xFFFFFF & daddr_32[0], 0);
> +	hv = jhash_3words(d32[3], d32[4], cpu_to_be32(0xFFFFFF) & d32[0], 0);

Should d32 be declared as __be32 *?
--
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

  parent reply	other threads:[~2013-02-11 19:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-05 15:48 [PATCH V2 for-next 0/6] IB/IPoIB: Add multi-queue TSS and RSS support Or Gerlitz
     [not found] ` <1360079337-8173-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-02-05 15:48   ` [PATCH V2 for-next 1/6] IB/ipoib: Fix ipoib_neigh hashing to use the correct daddr octets Or Gerlitz
     [not found]     ` <1360079337-8173-2-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-02-11 19:46       ` Hefty, Sean [this message]
     [not found]         ` <1828884A29C6694DAF28B7E6B8A8237368B99DDC-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-02-12 14:47           ` Shlomo Pongratz
     [not found]             ` <511A560D.8020900-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-02-12 16:33               ` Hefty, Sean
     [not found]                 ` <1828884A29C6694DAF28B7E6B8A8237368B9A045-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-02-12 16:53                   ` Or Gerlitz
2013-02-12 20:35               ` Jason Gunthorpe
2013-02-05 15:48   ` [PATCH V2 for-next 2/6] IB/core: Add RSS and TSS QP groups Or Gerlitz
     [not found]     ` <1360079337-8173-3-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-02-11 20:42       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A8237368B99E0B-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-02-12 15:27           ` Or Gerlitz
2013-02-12 16:39           ` Or Gerlitz
2013-02-12 16:46           ` Or Gerlitz
     [not found]             ` <CAJZOPZ+eT=UGfqbwyMn8BtKCei2t1RKj1auAhSbPphLF9A6eVg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-12 18:59               ` Hefty, Sean
     [not found]                 ` <1828884A29C6694DAF28B7E6B8A8237368B9A0FE-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-02-13 10:31                   ` Or Gerlitz
2013-02-05 15:48   ` [PATCH V2 for-next 3/6] IB/mlx4: Add support for " Or Gerlitz
2013-02-05 15:48   ` [PATCH V2 for-next 4/6] IB/ipoib: Move to multi-queue device Or Gerlitz
2013-02-05 15:48   ` [PATCH V2 for-next 5/6] IB/ipoib: Add RSS and TSS support for datagram mode Or Gerlitz
2013-02-05 15:48   ` [PATCH V2 for-next 6/6] IB/ipoib: Support changing the number of RX/TX rings with ethtool Or Gerlitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1828884A29C6694DAF28B7E6B8A8237368B99DDC@ORSMSX101.amr.corp.intel.com \
    --to=sean.hefty-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=shlomop-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.