Commit b68c9560 authored by Yann Droneaud's avatar Yann Droneaud Committed by Roland Dreier

IB/core: Make uverbs flow structure use names like verbs ones

This patch adds "flow" prefix to most of data structure added as part
of commit 436f2ad0 ("IB/core: Export ib_create/destroy_flow through
uverbs") to keep those names in sync with the data structures added in
commit 319a441d ("IB/core: Add receive flow steering support").

It's just a matter of translating 'ib_flow' to 'ib_uverbs_flow'.
Signed-off-by: default avatarYann Droneaud <ydroneaud@opteya.com>
Link: http://marc.info/?i=cover.1383773832.git.ydroneaud@opteya.comSigned-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent d82693da
...@@ -2602,7 +2602,7 @@ ssize_t ib_uverbs_detach_mcast(struct ib_uverbs_file *file, ...@@ -2602,7 +2602,7 @@ ssize_t ib_uverbs_detach_mcast(struct ib_uverbs_file *file,
} }
#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING #ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
static int kern_spec_to_ib_spec(struct ib_uverbs_spec *kern_spec, static int kern_spec_to_ib_spec(struct ib_uverbs_flow_spec *kern_spec,
union ib_flow_spec *ib_spec) union ib_flow_spec *ib_spec)
{ {
ib_spec->type = kern_spec->type; ib_spec->type = kern_spec->type;
...@@ -2676,7 +2676,7 @@ ssize_t ib_uverbs_create_flow(struct ib_uverbs_file *file, ...@@ -2676,7 +2676,7 @@ ssize_t ib_uverbs_create_flow(struct ib_uverbs_file *file,
if (cmd.flow_attr.size > (in_len - sizeof(cmd)) || if (cmd.flow_attr.size > (in_len - sizeof(cmd)) ||
cmd.flow_attr.size > cmd.flow_attr.size >
(cmd.flow_attr.num_of_specs * sizeof(struct ib_uverbs_spec))) (cmd.flow_attr.num_of_specs * sizeof(struct ib_uverbs_flow_spec)))
return -EINVAL; return -EINVAL;
if (cmd.flow_attr.num_of_specs) { if (cmd.flow_attr.num_of_specs) {
...@@ -2725,16 +2725,16 @@ ssize_t ib_uverbs_create_flow(struct ib_uverbs_file *file, ...@@ -2725,16 +2725,16 @@ ssize_t ib_uverbs_create_flow(struct ib_uverbs_file *file,
kern_spec = kern_flow_attr + 1; kern_spec = kern_flow_attr + 1;
ib_spec = flow_attr + 1; ib_spec = flow_attr + 1;
for (i = 0; i < flow_attr->num_of_specs && for (i = 0; i < flow_attr->num_of_specs &&
cmd.flow_attr.size > offsetof(struct ib_uverbs_spec, reserved) && cmd.flow_attr.size > offsetof(struct ib_uverbs_flow_spec, reserved) &&
cmd.flow_attr.size >= cmd.flow_attr.size >=
((struct ib_uverbs_spec *)kern_spec)->size; i++) { ((struct ib_uverbs_flow_spec *)kern_spec)->size; i++) {
err = kern_spec_to_ib_spec(kern_spec, ib_spec); err = kern_spec_to_ib_spec(kern_spec, ib_spec);
if (err) if (err)
goto err_free; goto err_free;
flow_attr->size += flow_attr->size +=
((union ib_flow_spec *) ib_spec)->size; ((union ib_flow_spec *) ib_spec)->size;
cmd.flow_attr.size -= ((struct ib_uverbs_spec *)kern_spec)->size; cmd.flow_attr.size -= ((struct ib_uverbs_flow_spec *)kern_spec)->size;
kern_spec += ((struct ib_uverbs_spec *) kern_spec)->size; kern_spec += ((struct ib_uverbs_flow_spec *) kern_spec)->size;
ib_spec += ((union ib_flow_spec *) ib_spec)->size; ib_spec += ((union ib_flow_spec *) ib_spec)->size;
} }
if (cmd.flow_attr.size || (i != flow_attr->num_of_specs)) { if (cmd.flow_attr.size || (i != flow_attr->num_of_specs)) {
......
...@@ -701,57 +701,57 @@ struct ib_uverbs_detach_mcast { ...@@ -701,57 +701,57 @@ struct ib_uverbs_detach_mcast {
}; };
#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING #ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
struct ib_uverbs_eth_filter { struct ib_uverbs_flow_eth_filter {
__u8 dst_mac[6]; __u8 dst_mac[6];
__u8 src_mac[6]; __u8 src_mac[6];
__be16 ether_type; __be16 ether_type;
__be16 vlan_tag; __be16 vlan_tag;
}; };
struct ib_uverbs_spec_eth { struct ib_uverbs_flow_spec_eth {
__u32 type; __u32 type;
__u16 size; __u16 size;
__u16 reserved; __u16 reserved;
struct ib_uverbs_eth_filter val; struct ib_uverbs_flow_eth_filter val;
struct ib_uverbs_eth_filter mask; struct ib_uverbs_flow_eth_filter mask;
}; };
struct ib_uverbs_ipv4_filter { struct ib_uverbs_flow_ipv4_filter {
__be32 src_ip; __be32 src_ip;
__be32 dst_ip; __be32 dst_ip;
}; };
struct ib_uverbs_spec_ipv4 { struct ib_uverbs_flow_spec_ipv4 {
__u32 type; __u32 type;
__u16 size; __u16 size;
__u16 reserved; __u16 reserved;
struct ib_uverbs_ipv4_filter val; struct ib_uverbs_flow_ipv4_filter val;
struct ib_uverbs_ipv4_filter mask; struct ib_uverbs_flow_ipv4_filter mask;
}; };
struct ib_uverbs_tcp_udp_filter { struct ib_uverbs_flow_tcp_udp_filter {
__be16 dst_port; __be16 dst_port;
__be16 src_port; __be16 src_port;
}; };
struct ib_uverbs_spec_tcp_udp { struct ib_uverbs_flow_spec_tcp_udp {
__u32 type; __u32 type;
__u16 size; __u16 size;
__u16 reserved; __u16 reserved;
struct ib_uverbs_tcp_udp_filter val; struct ib_uverbs_flow_tcp_udp_filter val;
struct ib_uverbs_tcp_udp_filter mask; struct ib_uverbs_flow_tcp_udp_filter mask;
}; };
struct ib_uverbs_spec { struct ib_uverbs_flow_spec {
union { union {
struct { struct {
__u32 type; __u32 type;
__u16 size; __u16 size;
__u16 reserved; __u16 reserved;
}; };
struct ib_uverbs_spec_eth eth; struct ib_uverbs_flow_spec_eth eth;
struct ib_uverbs_spec_ipv4 ipv4; struct ib_uverbs_flow_spec_ipv4 ipv4;
struct ib_uverbs_spec_tcp_udp tcp_udp; struct ib_uverbs_flow_spec_tcp_udp tcp_udp;
}; };
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment