Skip to contentSkip to conversation

net: export TSO helper functions

PATCH Arnd Bergmann 2 participants 3 messages May 27, 2014

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

The software TSO helper API was recently added but so far only works for built-in device drivers. This adds appropriate exports to let us build the drivers using it as loadable modules.

Found during randconfig testing.

---

net/core/tso.c +4 -0
index 097821d..c8caf5b 100644
@@ -7,6 +7,7 @@ int tso_count_descs(struct sk_buff *skb)
 	/* The Marvell Way */
 	return skb_shinfo(skb)->gso_segs * 2 + skb_shinfo(skb)->nr_frags;
 }
+EXPORT_SYMBOL_GPL(tso_count_descs);
 
 void tso_build_hdr(struct sk_buff *skb, char *hdr, struct tso_t *tso,
 		   int size, bool is_last)
@@ -31,6 +32,7 @@ void tso_build_hdr(struct sk_buff *skb, char *hdr, struct tso_t *tso,
 		tcph->rst = 0;
 	}
 }
+EXPORT_SYMBOL_GPL(tso_build_hdr);
 
 void tso_build_data(struct sk_buff *skb, struct tso_t *tso, int size)
 {
@@ -48,6 +50,7 @@ void tso_build_data(struct sk_buff *skb, struct tso_t *tso, int size)
 		tso->next_frag_idx++;
 	}
 }
+EXPORT_SYMBOL_GPL(tso_build_data);
 
 void tso_start(struct sk_buff *skb, struct tso_t *tso)
 {
@@ -70,3 +73,4 @@ void tso_start(struct sk_buff *skb, struct tso_t *tso)
 		tso->next_frag_idx++;
 	}
 }
+EXPORT_SYMBOL_GPL(tso_start);
#1 lore raw

Hi Arnd,

Quoted 4 lines · Arnd Bergmann

The software TSO helper API was recently added but so far only works for built-in device drivers. This adds appropriate exports to let us build the drivers using it as loadable modules.

Thanks for the patch. Another similar fix was sent recently:

http://patchwork.ozlabs.org/patch/352452/

which proposes to use EXPORT_SYMBOL, instead of EXPORT_SYMBOL_GPL. Being a core API, I think the former is more appropriate, so I'd rather pick it instead of this one.

Signature · 3 lines
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
#2 lore raw
Quoted 9 lines · On Tuesday 27 May 2014 09:37:47 Ezequiel Garcia wrote:
Quoted 4 lines · Arnd Bergmann

The software TSO helper API was recently added but so far only works for built-in device drivers. This adds appropriate exports to let us build the drivers using it as loadable modules.

Thanks for the patch. Another similar fix was sent recently:

http://patchwork.ozlabs.org/patch/352452/

Ah, I missed that.

Quoted 3 lines

which proposes to use EXPORT_SYMBOL, instead of EXPORT_SYMBOL_GPL. Being a core API, I think the former is more appropriate, so I'd rather pick it instead of this one.

I use _GPL out of principle for any new code, but it's not important to me here, as long as one of the patches gets applied.

Arnd