2018-10-09 10:12:41 +00:00
|
|
|
/* Copyright (c) 2015-2016, 2018 The Linux Foundation. All rights reserved.
|
2012-09-10 18:58:33 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 and
|
|
|
|
* only version 2 as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*/
|
|
|
|
|
2015-06-08 06:26:09 +00:00
|
|
|
#ifndef _NET_CNSS_PREALLOC_H_
|
|
|
|
#define _NET_CNSS_PREALLOC_H_
|
2012-09-10 18:58:33 +00:00
|
|
|
|
2017-04-18 01:29:57 +00:00
|
|
|
#include <linux/skbuff.h>
|
|
|
|
|
2015-06-08 06:26:09 +00:00
|
|
|
#define WCNSS_PRE_ALLOC_GET_THRESHOLD (4*1024)
|
2016-02-25 09:31:59 +00:00
|
|
|
#define WCNSS_PRE_SKB_ALLOC_GET_THRESHOLD (50*1024)
|
2012-09-10 18:58:33 +00:00
|
|
|
|
2018-10-09 10:12:41 +00:00
|
|
|
extern void *wcnss_prealloc_get(size_t size);
|
2015-06-08 06:26:09 +00:00
|
|
|
extern int wcnss_prealloc_put(void *ptr);
|
|
|
|
extern int wcnss_pre_alloc_reset(void);
|
2017-04-18 01:29:57 +00:00
|
|
|
|
2015-06-08 06:26:09 +00:00
|
|
|
void wcnss_prealloc_check_memory_leak(void);
|
2016-02-25 09:31:59 +00:00
|
|
|
extern struct sk_buff *wcnss_skb_prealloc_get(unsigned int size);
|
|
|
|
extern int wcnss_skb_prealloc_put(struct sk_buff *skb);
|
2015-06-08 06:26:09 +00:00
|
|
|
|
2017-04-18 01:29:57 +00:00
|
|
|
|
2015-06-08 06:26:09 +00:00
|
|
|
#endif /* _NET_CNSS__PREALLOC_H_ */
|