Commit 989a3a8f authored by Maor Gottlieb's avatar Maor Gottlieb Committed by Doug Ledford

IB/uverbs: Add more fields to IPv4 flow specification

Add the following fields to IPv4 flow filter specification:
1. Type of Service
2. Time to Live
3. Flags
4. Protocol
Signed-off-by: default avatarMaor Gottlieb <maorg@mellanox.com>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 15dfbd6b
...@@ -1648,9 +1648,20 @@ struct ib_flow_spec_ib { ...@@ -1648,9 +1648,20 @@ struct ib_flow_spec_ib {
struct ib_flow_ib_filter mask; struct ib_flow_ib_filter mask;
}; };
/* IPv4 header flags */
enum ib_ipv4_flags {
IB_IPV4_DONT_FRAG = 0x2, /* Don't enable packet fragmentation */
IB_IPV4_MORE_FRAG = 0X4 /* For All fragmented packets except the
last have this flag set */
};
struct ib_flow_ipv4_filter { struct ib_flow_ipv4_filter {
__be32 src_ip; __be32 src_ip;
__be32 dst_ip; __be32 dst_ip;
u8 proto;
u8 tos;
u8 ttl;
u8 flags;
/* Must be last */ /* Must be last */
u8 real_sz[0]; u8 real_sz[0];
}; };
......
...@@ -848,6 +848,10 @@ struct ib_uverbs_flow_spec_eth { ...@@ -848,6 +848,10 @@ struct ib_uverbs_flow_spec_eth {
struct ib_uverbs_flow_ipv4_filter { struct ib_uverbs_flow_ipv4_filter {
__be32 src_ip; __be32 src_ip;
__be32 dst_ip; __be32 dst_ip;
__u8 proto;
__u8 tos;
__u8 ttl;
__u8 flags;
}; };
struct ib_uverbs_flow_spec_ipv4 { struct ib_uverbs_flow_spec_ipv4 {
......
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