From: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
To: Or Gerlitz <or.gerlitz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "Hefty,
Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
"roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org"
<roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"hadarh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org"
<hadarh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
"matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org"
<matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH V2 for-next 1/4] IB/core: Add receive Flow Steering support
Date: Wed, 26 Jun 2013 16:33:59 -0500 [thread overview]
Message-ID: <51CB5E47.7090404@opengridcomputing.com> (raw)
In-Reply-To: <CAJZOPZK_FkCJZxjyxEdk4WOTvbo8DQpcpqmuPUsqV=bZmU5W_w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 6/26/2013 4:13 PM, Or Gerlitz wrote:
> On Wed, Jun 26, 2013 at 10:56 PM, Hefty, Sean <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
>>> The input to ib_create_flow is instance of struct ib_flow_attr which
>>> contain few mandatory control elements and optional flow specs.
>>>
>>> struct ib_flow_attr {
>>> enum ib_flow_attr_type type;
>>> u16 size;
>>> u16 priority;
>>> u8 num_of_specs;
>>> u8 port;
>>> u32 flags;
>> This structure could be aligned better.
> OK, I assume you mean arrange fields by decreasing size, correct? so
> here we need to put the flags field before the size field.
>
>>> /* Following are the optional layers according to user request
>>> * struct ib_flow_spec_yyy
>>> * struct ib_flow_spec_zzz
>>> */
>>> };
>>>
>>> As these specs are eventually coming from user space, they are defined and
>>> used in a way which allows adding new spec types without kernel/user ABI
>>> change, and with a little API enhancement which defines the newly added spec.
>>>
>>> The flow spec structures are defined in a TLV (Type-Length-Value) manner,
>>> which allows to call ib_create_flow with a list of variable length of
>>> optional specs.
>>>
>>> For the actual processing of ib_flow_attr the driver uses the number of
>>> specs and the size mandatory fields along with the TLV nature of the specs.
>>>
>>> Steering rules processing order is according to rules priority. The user
>>> sets the 12 low-order bits from the priority field and the remaining
>>> 4 high-order bits are set by the kernel according to a domain the
>>> application or the layer that created the rule belongs to. Lower
>>> priority numerical value means higher priority.
>> Why are bit fields being exposed to the user in this way?
> Yes, this is probably not general enough. So what would you suggest,
> use a more integral division? e.g 16 bits for priority and 16 bits for
> location?
If the kernel driver is setting the "location", whatever that is, why
would the application need access to it? IE isn't a priority field
enough to allow the application provide an ordering/prioritization to
the rules?
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
next prev parent reply other threads:[~2013-06-26 21:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 12:57 [PATCH V2 for-next 0/4] Add receive Flow Steering support Or Gerlitz
[not found] ` <1372251464-13394-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-06-26 12:57 ` [PATCH V2 for-next 1/4] IB/core: " Or Gerlitz
[not found] ` <1372251464-13394-2-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-06-26 19:56 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A823736FD36FF3-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-06-26 21:13 ` Or Gerlitz
[not found] ` <CAJZOPZK_FkCJZxjyxEdk4WOTvbo8DQpcpqmuPUsqV=bZmU5W_w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-26 21:33 ` Steve Wise [this message]
[not found] ` <51CB5E47.7090404-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2013-06-27 22:05 ` Or Gerlitz
2013-06-27 20:55 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A823736FD37415-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-06-27 22:09 ` Or Gerlitz
[not found] ` <CAJZOPZLf85TaCM9O3yahspRsuD3KcFzAY5b4nXxe46RiZwnk6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-28 0:10 ` Hefty, Sean
2013-06-26 12:57 ` [PATCH V2 for-next 2/4] IB/core: Infra-structure to support verbs extensions through uverbs Or Gerlitz
[not found] ` <1372251464-13394-3-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-06-26 13:05 ` Roland Dreier
[not found] ` <CAL1RGDWxmM17W2o_era24A-TTDeKyoL6u3NRu_=t_dhV_ZA9MA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-26 15:17 ` Or Gerlitz
[not found] ` <51CB05F3.3040409-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-06-26 15:34 ` Or Gerlitz
2013-07-09 15:00 ` Tzahi Oved
[not found] ` <CACZyyF8=dzjktGYAWfHkXdNQycdkP5x0t=rYckTypxj7GLznzw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-16 3:33 ` Or Gerlitz
2013-06-26 12:57 ` [PATCH V2 for-next 3/4] IB/core: Export ib_create/destroy_flow " Or Gerlitz
2013-06-26 12:57 ` [PATCH V2 for-next 4/4] IB/mlx4: Add receive Flow Steering support 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=51CB5E47.7090404@opengridcomputing.com \
--to=swise-7bpotxp6k4+p2yhjcf5u+vpxobypeauw@public.gmane.org \
--cc=hadarh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=or.gerlitz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=roland-DgEjT+Ai2ygdnm+yROfE0A@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