public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: "Chandramouli, Dasaratharaman" <dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Parav Pandit <parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	"Hefty,
	Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Subject: Re: [PATCH rdma-next 17/18] IB/core: Define 'ib' and 'eth' rdma_ah_attr types
Date: Tue, 11 Apr 2017 23:29:00 -0700	[thread overview]
Message-ID: <6380e095-c59e-edf0-853c-06d9abb1a0bc@intel.com> (raw)
In-Reply-To: <VI1PR0502MB300833BF0033D3259B29EC69D1030-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>



On 4/11/2017 6:29 PM, Parav Pandit wrote:
>
>
>> -----Original Message-----
>> From: Hefty, Sean [mailto:sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org]
>> Sent: Tuesday, April 11, 2017 7:24 PM
>> To: Parav Pandit <parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>; Chandramouli, Dasaratharaman
>> <dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>; linux-rdma <linux-
>> rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
>> Cc: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
>> Subject: RE: [PATCH rdma-next 17/18] IB/core: Define 'ib' and 'eth'
>> rdma_ah_attr types
>>
>>>>>> +struct ib_ah_attr {
>>>>>> +	struct ib_global_route	grh;
>>>>>> +	u16			dlid;
>>>>>> +	u8			sl;
>>>>>> +	u8			src_path_bits;
>>>>>> +	u8			static_rate;
>>>>>> +	u8			dmac[ETH_ALEN];
>>>>
>>>> I might have missed something in my review.  Why is dmac in the ib
>>>> attributes?
>>>>
>>> Yes. Is should be removed similar to removing dlid from eth_ah_attr.
>>> Respective if-else code will also go away with that.
>>>
>>>>>> +};
>>>>>> +
>>>>>> +struct eth_ah_attr {
>>>>>>  	struct ib_global_route	grh;
>>>>>>  	u16			dlid;
>>>>> Please remove it from eth, as there is no dlid for Eth.
>>>>>
>>>>>>  	u8			sl;
>>>>>>  	u8			src_path_bits;
>>>>>>  	u8			static_rate;
>>>>>> -	u8			ah_flags;
>>>>>> -	u8			port_num;
>>>>>>  	u8			dmac[ETH_ALEN];
>>>>>>  };
>>>>>>
>>>>>
>>>>> Its better to have
>>>>> struct ib_ah_common_attr {} to have common fields between IB and
>>> ETH.
>>>>> And have instance of them in eth_ah_attr and ib_ah_attr structure.
>>>>
>>>> I think part of this exercise is to figure out what fields belong to
>>> each ah type.
>>> Right.
>>>
>>>> I'm not even sure why ethernet has a grh, sl, or src_path_bits.  Are
>>> these
>>> Sl is applicable. Src_path_bits is IB only.
>>>
>>>> used?  Are all of the fields of the grh needed?
>>> Yes. Most of them are common between IB/RoCE. Not sure of iWarp as AH
>>> attribute is common for iwarp and roce.
>>> Can the eth attributes be split
>>>> further based on roce v1 or v2?
>>>
>>> Most fields appear common between all 3 IB/RoCEv1,v2 so far to me in
>>> ib_global_route and are used too.
>>
>> I think this is what we have so far then:
>>
>> /* common */
>> struct rdma_ah_attr {
>> 	u8			ah_flags;
>> 	u8			port_num;
>> 	union ...
>> };
>>
>> struct ib_ah_attr {
>> 	struct ib_global_route	grh;
>> 	u16			dlid;
>> 	u8			sl;
>> 	u8			src_path_bits;
>> 	u8			static_rate;
>> };
>>
>> struct eth_ah_attr {
>>  	struct ib_global_route	grh;
>> 	u8			sl;
>> 	u8			static_rate;
>> 	u8			dmac[ETH_ALEN];
>>  };
>>
>> struct opa_ah_attr {
>> 	struct ib_global_route	grh;
>> 	u32			dlid;
>> 	u8			sl;
>> 	u8			src_path_bits;
>> 	u8			static_rate;
>> };
>>
>> So, the grh, sl, and static_rate are candidates to move directly into
>> rdma_ah_attr.  IMO, it's arguable if that's better, but I don't have a strong
>> opinion either way.  I don't know if iwarp uses ah attributes.
>
> Grep in cxgb4 driver for ah refers only to c4iw_ah_create which returns -ENOSYS
> With that I think we should keep grh, sl, static rate in rdma_ah_attr.
>

Thanks for the feedback. Will move them under rdma_ah_attr.

mlx4 and mlx5 maintain some of these grh fields in their driver data 
structures a little differently. There is ah->av.ib.sl_tclass_flowlabel 
in mlx4 and something like ah->av.grh_gid_fl in mlx5. Now that there is 
an eth specific grh, we might attempt to redefine the grh so the driver 
data structures are a little bit cleaner. Something that could be 
attempted by the respective drivers later.
--
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:[~2017-04-12  6:29 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-11 17:42 [PATCH rdma-next 00/18] Enhance ib_ah_attr to specify types Dasaratharaman Chandramouli
     [not found] ` <1491932545-60894-1-git-send-email-dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-04-11 17:42   ` [PATCH rdma-next 01/18] IB/ocrdma: Add identifier names to function definitions Dasaratharaman Chandramouli
2017-04-11 17:42   ` [PATCH rdma-next 02/18] IB/IPoIB: Remove 'else' when the 'if' has a return Dasaratharaman Chandramouli
2017-04-11 17:42   ` [PATCH rdma-next 03/18] IB/core: Add braces when using sizeof Dasaratharaman Chandramouli
2017-04-11 17:42   ` [PATCH rdma-next 04/18] IB/core: Check for global flag when using ah_attr Dasaratharaman Chandramouli
2017-04-11 17:42   ` [PATCH rdma-next 05/18] IB/rxe: Initialize ib_ah_attr during query_ah Dasaratharaman Chandramouli
2017-04-11 17:42   ` [PATCH rdma-next 06/18] IB/core: Rename struct ib_ah_attr to rdma_ah_attr Dasaratharaman Chandramouli
2017-04-11 17:42   ` [PATCH rdma-next 07/18] IB/core: Rename ib_create_ah to rdma_create_ah Dasaratharaman Chandramouli
2017-04-11 17:42   ` [PATCH rdma-next 08/18] IB/core: Rename ib_modify_ah to rdma_modify_ah Dasaratharaman Chandramouli
2017-04-11 17:42   ` [PATCH rdma-next 09/18] IB/core: Rename ib_query_ah to rdma_query_ah Dasaratharaman Chandramouli
2017-04-11 17:42   ` [PATCH rdma-next 10/18] IB/core: Rename ib_destroy_ah to rdma_destroy_ah Dasaratharaman Chandramouli
2017-04-11 17:42   ` [PATCH rdma-next 11/18] IB/mlx4: Rename to_ib_ah_attr to to_rdma_ah_attr Dasaratharaman Chandramouli
2017-04-11 17:42   ` [PATCH rdma-next 12/18] IB/mlx5: " Dasaratharaman Chandramouli
2017-04-11 17:42   ` [PATCH rdma-next 13/18] IB/mthca: " Dasaratharaman Chandramouli
2017-04-11 17:42   ` [PATCH rdma-next 14/18] IB/PVRDMA: Rename ib_ah_attr related functions Dasaratharaman Chandramouli
2017-04-11 17:42   ` [PATCH rdma-next 15/18] IB/core: Add accessor functions for rdma_ah_attr fields Dasaratharaman Chandramouli
2017-04-11 17:42   ` [PATCH rdma-next 16/18] IB/core: Use rdma_ah_attr accessor functions Dasaratharaman Chandramouli
2017-04-11 17:42   ` [PATCH rdma-next 17/18] IB/core: Define 'ib' and 'eth' rdma_ah_attr types Dasaratharaman Chandramouli
     [not found]     ` <1491932545-60894-18-git-send-email-dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-04-11 23:09       ` Parav Pandit
     [not found]         ` <VI1PR0502MB3008F933EA086C3A47C025B3D1000-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-04-11 23:33           ` Hefty, Sean
     [not found]             ` <1828884A29C6694DAF28B7E6B8A82373AB1119AC-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-04-12  0:04               ` Parav Pandit
     [not found]                 ` <VI1PR0502MB3008E3D0873AFF6F05D7C0BCD1030-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-04-12  0:23                   ` Hefty, Sean
     [not found]                     ` <1828884A29C6694DAF28B7E6B8A82373AB1119E4-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-04-12  1:29                       ` Parav Pandit
     [not found]                         ` <VI1PR0502MB300833BF0033D3259B29EC69D1030-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-04-12  6:29                           ` Chandramouli, Dasaratharaman [this message]
2017-04-12  1:36           ` Chandramouli, Dasaratharaman
     [not found]             ` <9873c7bd-5fe7-7b9a-c28f-e11ffa5d53e9-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-04-12  1:44               ` Parav Pandit
     [not found]                 ` <VI1PR0502MB30081ACB86A0ADEEE2C68743D1030-o1MPJYiShExKsLr+rGaxW8DSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-04-12 14:05                   ` Hefty, Sean
     [not found]                     ` <1828884A29C6694DAF28B7E6B8A82373AB111C5D-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-04-12 14:40                       ` Parav Pandit
2017-04-11 17:42   ` [PATCH rdma-next 18/18] IB/core: Define 'opa' rdma_ah_attr type Dasaratharaman Chandramouli
     [not found]     ` <1491932545-60894-19-git-send-email-dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-04-12  0:14       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A82373AB1119CE-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-04-12  5:31           ` Chandramouli, Dasaratharaman
2017-04-11 22:10   ` [PATCH rdma-next 00/18] Enhance ib_ah_attr to specify types Or Gerlitz
     [not found]     ` <CAJ3xEMibwEmP112g4n9O5a4KfDMtW5wa9=4sZJQm65huMgW9FQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-11 22:22       ` Hefty, Sean

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=6380e095-c59e-edf0-853c-06d9abb1a0bc@intel.com \
    --to=dasaratharaman.chandramouli-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@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