From: Or Gerlitz <ogerlitz@mellanox.com>
To: Saeed Mahameed <saeedm@mellanox.com>, Maor Gottlieb <maorg@mellanox.com>
Cc: "David S. Miller" <davem@davemloft.net>, <netdev@vger.kernel.org>,
"Doug Ledford" <dledford@redhat.com>,
Eran Ben Elisha <eranbe@mellanox.com>,
"Tal Alon" <talal@mellanox.com>, Majd Dibbiny <majd@mellanox.com>,
Matan Barak <matanb@mellanox.com>,
Moni Shoua <monis@mellanox.com>, <saeedm@dev.mellanox.co.il>
Subject: Re: [PATCH net-next 11/12] IB/mlx5: Add flow steering utilities
Date: Wed, 6 Jan 2016 10:02:52 +0200 [thread overview]
Message-ID: <568CCA2C.1080500@mellanox.com> (raw)
In-Reply-To: <1452024253-21193-12-git-send-email-saeedm@mellanox.com>
On 1/5/2016 10:04 PM, Saeed Mahameed wrote:
> +static bool is_valid_attr(struct ib_flow_attr *flow_attr)
> +{
> + union ib_flow_spec *ib_spec = (union ib_flow_spec *)(flow_attr + 1);
> + bool has_ipv4_spec = false;
> + bool eth_type_ipv4 = true;
> + unsigned int spec_index;
> +
> + /* Validate that ehtertype is correct */
typo s/ehtertype/ethertype/ -- better if you grep all comments in the
patches and run them through speller
> + for (spec_index = 0; spec_index < flow_attr->num_of_specs; spec_index++) {
> + if (ib_spec->type == IB_FLOW_SPEC_ETH &&
> + ib_spec->eth.mask.ether_type) {
> + eth_type_ipv4 = ib_spec->eth.mask.ether_type == 0xffff &&
sparse complains here on this
drivers/infiniband/hw/mlx5//main.c:1006:58: warning: restricted __be16
degrades to integer
even if this isn't real bug, make the tool happy, so we'll have the
driver keep being clean from such warns
> + ib_spec->eth.val.ether_type == htons(ETH_P_IP);
> + } else if (ib_spec->type == IB_FLOW_SPEC_IPV4) {
> + has_ipv4_spec = true;
> + }
> + ib_spec = (void *)ib_spec + ib_spec->size;
> + }
> + return !has_ipv4_spec || eth_type_ipv4;
> +}
next prev parent reply other threads:[~2016-01-06 8:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 20:04 [PATCH net-next 00/12] net/mlx5_core: Enhance flow steering support Saeed Mahameed
2016-01-05 20:04 ` [PATCH net-next 01/12] net/mlx5_core: Introduce flow steering autogrouped flow table Saeed Mahameed
2016-01-06 4:58 ` David Miller
2016-01-05 20:04 ` [PATCH net-next 02/12] net/mlx5_core: Add utilities to find next and prev flow-tables Saeed Mahameed
2016-01-05 20:04 ` [PATCH net-next 03/12] net/mlx5_core: Managing root flow table Saeed Mahameed
2016-01-05 20:04 ` [PATCH net-next 04/12] net/mlx5_core: Introduce modify flow table command Saeed Mahameed
2016-01-05 20:04 ` [PATCH net-next 05/12] net/mlx5_core: Connect flow tables Saeed Mahameed
2016-01-05 20:04 ` [PATCH net-next 06/12] net/mlx5_core: Set priority attributes Saeed Mahameed
2016-01-05 20:04 ` [PATCH net-next 07/12] net/mlx5_core: Initialize namespaces only when supported by device Saeed Mahameed
2016-01-05 20:04 ` [PATCH net-next 08/12] net/mlx5_core: Enable flow steering support for the IB driver Saeed Mahameed
2016-01-05 20:04 ` [PATCH net-next 09/12] net/mlx5_core: Make ipv4/ipv6 location more clear Saeed Mahameed
2016-01-05 20:04 ` [PATCH net-next 10/12] net/mlx5_core: Export flow steering API Saeed Mahameed
2016-01-05 20:04 ` [PATCH net-next 11/12] IB/mlx5: Add flow steering utilities Saeed Mahameed
2016-01-06 8:02 ` Or Gerlitz [this message]
2016-01-05 20:04 ` [PATCH net-next 12/12] IB/mlx5: Add flow steering support Saeed Mahameed
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=568CCA2C.1080500@mellanox.com \
--to=ogerlitz@mellanox.com \
--cc=davem@davemloft.net \
--cc=dledford@redhat.com \
--cc=eranbe@mellanox.com \
--cc=majd@mellanox.com \
--cc=maorg@mellanox.com \
--cc=matanb@mellanox.com \
--cc=monis@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@dev.mellanox.co.il \
--cc=saeedm@mellanox.com \
--cc=talal@mellanox.com \
/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.