Re: [ovs-dev] [PATCH 1/2] datapath: Check maximum netlink message size

2017-10-31 Thread Ben Pfaff
On Fri, Sep 22, 2017 at 07:44:52AM -0700, Greg Rose wrote:
> In kernels < 4.9 the maximum netlink message size is 16KB.
> 
> See http://www.spinics.net/lists/netdev/msg431592.html
> 
> Signed-off-by: Greg Rose 

Thanks, applied to master, branch-2.8, and branch-2.7.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH 1/2] datapath: Check maximum netlink message size

2017-09-22 Thread Greg Rose
In kernels < 4.9 the maximum netlink message size is 16KB.

See http://www.spinics.net/lists/netdev/msg431592.html

Signed-off-by: Greg Rose 
---
 datapath/flow_netlink.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c
index 9b48612..ddabd1f 100644
--- a/datapath/flow_netlink.c
+++ b/datapath/flow_netlink.c
@@ -1902,7 +1902,11 @@ int ovs_nla_put_mask(const struct sw_flow *flow, struct 
sk_buff *skb)
OVS_FLOW_ATTR_MASK, true, skb);
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,9,0)
+#define MAX_ACTIONS_BUFSIZE(16 * 1024)
+#else
 #define MAX_ACTIONS_BUFSIZE(32 * 1024)
+#endif
 
 static struct sw_flow_actions *nla_alloc_flow_actions(int size, bool log)
 {
-- 
1.8.3.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev