7e393220b6
csum_partial is often called for small fixed length packets for which it is suboptimal to use the generic csum_partial() function. For instance, in my configuration, I got: * One place calling it with constant len 4 * Seven places calling it with constant len 8 * Three places calling it with constant len 14 * One place calling it with constant len 20 * One place calling it with constant len 24 * One place calling it with constant len 32 This patch renames csum_partial() to __csum_partial() and implements csum_partial() as a wrapper inline function which * uses csum_add() for small 16bits multiple constant length * uses ip_fast_csum() for other 32bits multiple constant * uses __csum_partial() in all other cases Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Scott Wood <oss@buserror.net>
34 lines
722 B
C
34 lines
722 B
C
#include <linux/string.h>
|
|
#include <linux/uaccess.h>
|
|
#include <linux/bitops.h>
|
|
#include <net/checksum.h>
|
|
|
|
EXPORT_SYMBOL(memcpy);
|
|
EXPORT_SYMBOL(memset);
|
|
EXPORT_SYMBOL(memmove);
|
|
EXPORT_SYMBOL(memcmp);
|
|
EXPORT_SYMBOL(memchr);
|
|
|
|
EXPORT_SYMBOL(strcpy);
|
|
EXPORT_SYMBOL(strncpy);
|
|
EXPORT_SYMBOL(strcat);
|
|
EXPORT_SYMBOL(strlen);
|
|
EXPORT_SYMBOL(strcmp);
|
|
EXPORT_SYMBOL(strncmp);
|
|
|
|
#ifndef CONFIG_GENERIC_CSUM
|
|
EXPORT_SYMBOL(__csum_partial);
|
|
EXPORT_SYMBOL(csum_partial_copy_generic);
|
|
#endif
|
|
|
|
EXPORT_SYMBOL(__copy_tofrom_user);
|
|
EXPORT_SYMBOL(__clear_user);
|
|
EXPORT_SYMBOL(copy_page);
|
|
|
|
#ifdef CONFIG_PPC64
|
|
EXPORT_SYMBOL(__arch_hweight8);
|
|
EXPORT_SYMBOL(__arch_hweight16);
|
|
EXPORT_SYMBOL(__arch_hweight32);
|
|
EXPORT_SYMBOL(__arch_hweight64);
|
|
#endif
|