aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Droneaud <ydroneaud@opteya.com>2013-11-06 17:21:46 -0500
committerRoland Dreier <roland@purestorage.com>2013-11-17 11:22:08 -0500
commitb68c956021386eead6b8b28e445f33c8c985d7d2 (patch)
tree73e21c833ac94f8f871209e106997c230816db21
parentd82693dad09b49232cd727ee9e15bd027710edac (diff)
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 436f2ad05a0b ("IB/core: Export ib_create/destroy_flow through uverbs") to keep those names in sync with the data structures added in commit 319a441d1361 ("IB/core: Add receive flow steering support"). It's just a matter of translating 'ib_flow' to 'ib_uverbs_flow'. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Link: http://marc.info/?i=cover.1383773832.git.ydroneaud@opteya.com Signed-off-by: Roland Dreier <roland@purestorage.com>
-rw-r--r--drivers/infiniband/core/uverbs_cmd.c12
-rw-r--r--include/uapi/rdma/ib_user_verbs.h32
2 files changed, 22 insertions, 22 deletions
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index f83c1dc08481..19f14d82c988 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -2602,7 +2602,7 @@ out_put:
2602} 2602}
2603 2603
2604#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING 2604#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
2605static int kern_spec_to_ib_spec(struct ib_uverbs_spec *kern_spec, 2605static int kern_spec_to_ib_spec(struct ib_uverbs_flow_spec *kern_spec,
2606 union ib_flow_spec *ib_spec) 2606 union ib_flow_spec *ib_spec)
2607{ 2607{
2608 ib_spec->type = kern_spec->type; 2608 ib_spec->type = kern_spec->type;
@@ -2676,7 +2676,7 @@ ssize_t ib_uverbs_create_flow(struct ib_uverbs_file *file,
2676 2676
2677 if (cmd.flow_attr.size > (in_len - sizeof(cmd)) || 2677 if (cmd.flow_attr.size > (in_len - sizeof(cmd)) ||
2678 cmd.flow_attr.size > 2678 cmd.flow_attr.size >
2679 (cmd.flow_attr.num_of_specs * sizeof(struct ib_uverbs_spec))) 2679 (cmd.flow_attr.num_of_specs * sizeof(struct ib_uverbs_flow_spec)))
2680 return -EINVAL; 2680 return -EINVAL;
2681 2681
2682 if (cmd.flow_attr.num_of_specs) { 2682 if (cmd.flow_attr.num_of_specs) {
@@ -2725,16 +2725,16 @@ ssize_t ib_uverbs_create_flow(struct ib_uverbs_file *file,
2725 kern_spec = kern_flow_attr + 1; 2725 kern_spec = kern_flow_attr + 1;
2726 ib_spec = flow_attr + 1; 2726 ib_spec = flow_attr + 1;
2727 for (i = 0; i < flow_attr->num_of_specs && 2727 for (i = 0; i < flow_attr->num_of_specs &&
2728 cmd.flow_attr.size > offsetof(struct ib_uverbs_spec, reserved) && 2728 cmd.flow_attr.size > offsetof(struct ib_uverbs_flow_spec, reserved) &&
2729 cmd.flow_attr.size >= 2729 cmd.flow_attr.size >=
2730 ((struct ib_uverbs_spec *)kern_spec)->size; i++) { 2730 ((struct ib_uverbs_flow_spec *)kern_spec)->size; i++) {
2731 err = kern_spec_to_ib_spec(kern_spec, ib_spec); 2731 err = kern_spec_to_ib_spec(kern_spec, ib_spec);
2732 if (err) 2732 if (err)
2733 goto err_free; 2733 goto err_free;
2734 flow_attr->size += 2734 flow_attr->size +=
2735 ((union ib_flow_spec *) ib_spec)->size; 2735 ((union ib_flow_spec *) ib_spec)->size;
2736 cmd.flow_attr.size -= ((struct ib_uverbs_spec *)kern_spec)->size; 2736 cmd.flow_attr.size -= ((struct ib_uverbs_flow_spec *)kern_spec)->size;
2737 kern_spec += ((struct ib_uverbs_spec *) kern_spec)->size; 2737 kern_spec += ((struct ib_uverbs_flow_spec *) kern_spec)->size;
2738 ib_spec += ((union ib_flow_spec *) ib_spec)->size; 2738 ib_spec += ((union ib_flow_spec *) ib_spec)->size;
2739 } 2739 }
2740 if (cmd.flow_attr.size || (i != flow_attr->num_of_specs)) { 2740 if (cmd.flow_attr.size || (i != flow_attr->num_of_specs)) {
diff --git a/include/uapi/rdma/ib_user_verbs.h b/include/uapi/rdma/ib_user_verbs.h
index 96a660533236..ef2be64bf4c3 100644
--- a/include/uapi/rdma/ib_user_verbs.h
+++ b/include/uapi/rdma/ib_user_verbs.h
@@ -701,57 +701,57 @@ struct ib_uverbs_detach_mcast {
701}; 701};
702 702
703#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING 703#ifdef CONFIG_INFINIBAND_EXPERIMENTAL_UVERBS_FLOW_STEERING
704struct ib_uverbs_eth_filter { 704struct ib_uverbs_flow_eth_filter {
705 __u8 dst_mac[6]; 705 __u8 dst_mac[6];
706 __u8 src_mac[6]; 706 __u8 src_mac[6];
707 __be16 ether_type; 707 __be16 ether_type;
708 __be16 vlan_tag; 708 __be16 vlan_tag;
709}; 709};
710 710
711struct ib_uverbs_spec_eth { 711struct ib_uverbs_flow_spec_eth {
712 __u32 type; 712 __u32 type;
713 __u16 size; 713 __u16 size;
714 __u16 reserved; 714 __u16 reserved;
715 struct ib_uverbs_eth_filter val; 715 struct ib_uverbs_flow_eth_filter val;
716 struct ib_uverbs_eth_filter mask; 716 struct ib_uverbs_flow_eth_filter mask;
717}; 717};
718 718
719struct ib_uverbs_ipv4_filter { 719struct ib_uverbs_flow_ipv4_filter {
720 __be32 src_ip; 720 __be32 src_ip;
721 __be32 dst_ip; 721 __be32 dst_ip;
722}; 722};
723 723
724struct ib_uverbs_spec_ipv4 { 724struct ib_uverbs_flow_spec_ipv4 {
725 __u32 type; 725 __u32 type;
726 __u16 size; 726 __u16 size;
727 __u16 reserved; 727 __u16 reserved;
728 struct ib_uverbs_ipv4_filter val; 728 struct ib_uverbs_flow_ipv4_filter val;
729 struct ib_uverbs_ipv4_filter mask; 729 struct ib_uverbs_flow_ipv4_filter mask;
730}; 730};
731 731
732struct ib_uverbs_tcp_udp_filter { 732struct ib_uverbs_flow_tcp_udp_filter {
733 __be16 dst_port; 733 __be16 dst_port;
734 __be16 src_port; 734 __be16 src_port;
735}; 735};
736 736
737struct ib_uverbs_spec_tcp_udp { 737struct ib_uverbs_flow_spec_tcp_udp {
738 __u32 type; 738 __u32 type;
739 __u16 size; 739 __u16 size;
740 __u16 reserved; 740 __u16 reserved;
741 struct ib_uverbs_tcp_udp_filter val; 741 struct ib_uverbs_flow_tcp_udp_filter val;
742 struct ib_uverbs_tcp_udp_filter mask; 742 struct ib_uverbs_flow_tcp_udp_filter mask;
743}; 743};
744 744
745struct ib_uverbs_spec { 745struct ib_uverbs_flow_spec {
746 union { 746 union {
747 struct { 747 struct {
748 __u32 type; 748 __u32 type;
749 __u16 size; 749 __u16 size;
750 __u16 reserved; 750 __u16 reserved;
751 }; 751 };
752 struct ib_uverbs_spec_eth eth; 752 struct ib_uverbs_flow_spec_eth eth;
753 struct ib_uverbs_spec_ipv4 ipv4; 753 struct ib_uverbs_flow_spec_ipv4 ipv4;
754 struct ib_uverbs_spec_tcp_udp tcp_udp; 754 struct ib_uverbs_flow_spec_tcp_udp tcp_udp;
755 }; 755 };
756}; 756};
757 757