Skip to contentSkip to conversation

flex_array: export some symbols for nfnetlink_queue use

PATCH In review Changli Gao 3 participants 3 messages Apr 9, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/3 flex_array: export some symbols for nfnetlink_queue use

export some symbols for nfnetlink_queue use

export some symbols for nfnetlink_queue use.

----
lib/Makefile | 4 ++--
lib/flex_array.c | 5 +++++

2 files changed, 7 insertions(+), 2 deletions(-)
lib/Makefile +2 -2
index 0a6ab6f..0700e74 100644
@@ -12,7 +12,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
 	 idr.o int_sqrt.o extable.o prio_tree.o \
 	 sha1.o irq_regs.o reciprocal_div.o argv_split.o \
 	 proportions.o prio_heap.o ratelimit.o show_mem.o \
-	 is_single_threaded.o plist.o decompress.o flex_array.o
+	 is_single_threaded.o plist.o decompress.o
 
 lib-$(CONFIG_MMU) += ioremap.o
 lib-$(CONFIG_SMP) += cpumask.o
@@ -21,7 +21,7 @@ lib-y	+= kobject.o kref.o klist.o
 
 obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
 	 bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \
-	 string_helpers.o gcd.o lcm.o list_sort.o
+	 string_helpers.o gcd.o lcm.o list_sort.o flex_array.o
 
 ifeq ($(CONFIG_DEBUG_KOBJECT),y)
 CFLAGS_kobject.o += -DDEBUG
lib/flex_array.c +5 -0
index 66eef2e..0e18e54 100644
@@ -23,6 +23,7 @@
 #include <linux/flex_array.h>
 #include <linux/slab.h>
 #include <linux/stddef.h>
+#include <linux/module.h>
 
 struct flex_array_part {
 	char elements[FLEX_ARRAY_PART_SIZE];
@@ -103,6 +104,7 @@ struct flex_array *flex_array_alloc(int element_size, unsigned int total,
 						FLEX_ARRAY_BASE_BYTES_LEFT);
 	return ret;
 }
+EXPORT_SYMBOL(flex_array_alloc);
 
 static int fa_element_to_part_nr(struct flex_array *fa,
 					unsigned int element_nr)
@@ -132,6 +134,7 @@ void flex_array_free(struct flex_array *fa)
 	flex_array_free_parts(fa);
 	kfree(fa);
 }
+EXPORT_SYMBOL(flex_array_free);
 
 static unsigned int index_inside_part(struct flex_array *fa,
 					unsigned int element_nr)
@@ -257,6 +260,7 @@ int flex_array_prealloc(struct flex_array *fa, unsigned int start,
 	}
 	return 0;
 }
+EXPORT_SYMBOL(flex_array_prealloc);
 
 /**
  * flex_array_get - pull data back out of the array
@@ -285,6 +289,7 @@ void *flex_array_get(struct flex_array *fa, unsigned int element_nr)
 	}
 	return &part->elements[index_inside_part(fa, element_nr)];
 }
+EXPORT_SYMBOL(flex_array_get);
 
 static int part_is_free(struct flex_array_part *part)
 {
#1 lore raw
Quoted 15 lines · Changli Gao

export some symbols for nfnetlink_queue use

export some symbols for nfnetlink_queue use.

----
lib/Makefile | 4 ++--
lib/flex_array.c | 5 +++++

2 files changed, 7 insertions(+), 2 deletions(-)
lib/Makefile +0 -0
index 0a6ab6f..0700e74 100644

lib/Makefile lib-y := ctype.o string.o vsprintf.o cmdline.o \ · line 16

Quoted 6 lines
lib/Makefile +1 -1
@@ -12,7 +12,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
 	 idr.o int_sqrt.o extable.o prio_tree.o \
 	 sha1.o irq_regs.o reciprocal_div.o argv_split.o \
 	 proportions.o prio_heap.o ratelimit.o show_mem.o \
-	 is_single_threaded.o plist.o decompress.o flex_array.o
+	 is_single_threaded.o plist.o decompress.o
 

Hmm, could you instead add a lib-$(CONFIG_FLEX_ARRAY) += flex_array.o instead ?

And do the necessary Kconfig changes as well.

You should CC people who where involved with flex_array :

scripts/get_maintainer.pl -f lib/flex_array.c

Andrew Morton <[email protected]> David Rientjes <[email protected]>
Dave Hansen <[email protected]> Jonathan Corbet <[email protected]>
KAMEZAWA Hiroyuki <[email protected]>

Thanks

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 26 lines · Eric Dumazet
Quoted 15 lines · Changli Gao

export some symbols for nfnetlink_queue use

export some symbols for nfnetlink_queue use.

----
lib/Makefile | 4 ++--
lib/flex_array.c | 5 +++++

2 files changed, 7 insertions(+), 2 deletions(-)
lib/Makefile +0 -0
index 0a6ab6f..0700e74 100644

lib/Makefile lib-y := ctype.o string.o vsprintf.o cmdline.o \ · line 16

Quoted 6 lines
lib/Makefile +1 -1
@@ -12,7 +12,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \
        idr.o int_sqrt.o extable.o prio_tree.o \
        sha1.o irq_regs.o reciprocal_div.o argv_split.o \
        proportions.o prio_heap.o ratelimit.o show_mem.o \
-      is_single_threaded.o plist.o decompress.o flex_array.o
+      is_single_threaded.o plist.o decompress.o
 

Hmm, could you instead add a lib-$(CONFIG_FLEX_ARRAY) += flex_array.o instead ?

Quoted 2 lines

And do the necessary Kconfig changes as well.

Right, if nfnetlink will use flex_array, CONFIG_NETFILTER_NETLINK will need to depend on or select CONFIG_FLEX_ARRAY.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html