public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
To: Eli Cohen <eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Cc: RDMA list <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCHv10 08/12] mlx4: Add support for IBoE - address resolution
Date: Wed, 20 Oct 2010 22:22:56 -0700	[thread overview]
Message-ID: <adazku85dcf.fsf@cisco.com> (raw)
In-Reply-To: <20100826141851.GI8795@mtldesk30> (Eli Cohen's message of "Thu, 26 Aug 2010 17:18:51 +0300")

Just curious -- what's up with this change here?  Is this connected to
IBoE support, or is this an independent fix?

 > diff --git a/drivers/net/mlx4/en_port.c b/drivers/net/mlx4/en_port.c
 > index a29abe8..a249887 100644
 > --- a/drivers/net/mlx4/en_port.c
 > +++ b/drivers/net/mlx4/en_port.c
 > @@ -127,8 +127,8 @@ int mlx4_SET_PORT_qpn_calc(struct mlx4_dev *dev, u8 port, u32 base_qpn,
 >  	memset(context, 0, sizeof *context);
 >  
 >  	context->base_qpn = cpu_to_be32(base_qpn);
 > -	context->promisc = cpu_to_be32(promisc << SET_PORT_PROMISC_SHIFT | base_qpn);
 > -	context->mcast = cpu_to_be32(1 << SET_PORT_PROMISC_SHIFT | base_qpn);
 > +	context->promisc = cpu_to_be32(promisc << SET_PORT_PROMISC_EN_SHIFT | base_qpn);
 > +	context->mcast = cpu_to_be32(1 << SET_PORT_PROMISC_MODE_SHIFT | base_qpn);
 >  	context->intra_no_vlan = 0;
 >  	context->no_vlan = MLX4_NO_VLAN_IDX;
 >  	context->intra_vlan_miss = 0;
 > diff --git a/drivers/net/mlx4/en_port.h b/drivers/net/mlx4/en_port.h
 > index e6477f1..9354891 100644
 > --- a/drivers/net/mlx4/en_port.h
 > +++ b/drivers/net/mlx4/en_port.h
 > @@ -36,7 +36,8 @@
 >  
 >  
 >  #define SET_PORT_GEN_ALL_VALID	0x7
 > -#define SET_PORT_PROMISC_SHIFT	31
 > +#define SET_PORT_PROMISC_EN_SHIFT	31
 > +#define SET_PORT_PROMISC_MODE_SHIFT	30
 >  
 >  enum {
 >  	MLX4_CMD_SET_VLAN_FLTR  = 0x47,

Also as far as I can tell this variable sgid is write-only (ie you do
the ib_get_cached_gid() but then never do anything with the value that
that returns).  Am I missing something subtle?

 > @@ -1226,43 +1281,59 @@ static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_send_wr *wr,
 >  	int header_size;
 >  	int spc;
 >  	int i;
 > +	union ib_gid sgid;
 > +	int is_eth;
 > +	int is_grh;
 > +	int err;
 >  
 >  	send_size = 0;
 >  	for (i = 0; i < wr->num_sge; ++i)
 >  		send_size += wr->sg_list[i].length;
 >  
 > -	ib_ud_header_init(send_size, 1, 0, mlx4_ib_ah_grh_present(ah), 0, &sqp->ud_header);
 > +	is_eth = rdma_port_get_link_layer(sqp->qp.ibqp.device, sqp->qp.port) == IB_LINK_LAYER_ETHERNET;
 > +	is_grh = mlx4_ib_ah_grh_present(ah);
 > +	err = ib_get_cached_gid(ib_dev, be32_to_cpu(ah->av.ib.port_pd) >> 24,
 > +				ah->av.ib.gid_index, &sgid);
 > 

Finally this patch would have been easier to review without extraneous
whitespace noise like

 > @@ -1337,7 +1419,7 @@ static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_send_wr *wr,
 >  	}
 >  
 >  	*mlx_seg_len =
 > -		ALIGN(i * sizeof (struct mlx4_wqe_inline_seg) + header_size, 16);
 > +	ALIGN(i * sizeof (struct mlx4_wqe_inline_seg) + header_size, 16);
 >  	return 0;
 >  }

 > @@ -100,3 +194,4 @@ int mlx4_ib_destroy_ah(struct ib_ah *ah)
 >  	kfree(to_mah(ah));
 >  	return 0;
 >  }
 > +

etc.
--
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

  reply	other threads:[~2010-10-21  5:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-26 14:18 [PATCHv10 08/12] mlx4: Add support for IBoE - address resolution Eli Cohen
2010-10-21  5:22 ` Roland Dreier [this message]
     [not found]   ` <adazku85dcf.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-21  7:27     ` Eli Cohen
2010-10-21 19:48       ` Roland Dreier
     [not found]         ` <adazku78gzz.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-21 22:51           ` Eli Cohen
2010-10-22  4:15             ` Roland Dreier
2010-10-21 19:57       ` Roland Dreier
     [not found]         ` <adavd4v8gk4.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-21 22:54           ` Eli Cohen
2010-10-21 21:14 ` Roland Dreier
     [not found]   ` <adad3r38d0c.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-21 21:15     ` Roland Dreier
     [not found]       ` <ada8w1r8cxo.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-21 23:03         ` Eli Cohen
2010-10-22  4:15           ` Roland Dreier
     [not found]             ` <adazku6yiag.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-10-22 12:24               ` Eli Cohen
2010-10-21 23:01     ` Eli Cohen
2010-10-22 15:59 ` 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=adazku85dcf.fsf@cisco.com \
    --to=rdreier-fyb4gu1cfyuavxtiumwx3w@public.gmane.org \
    --cc=eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox