public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* net: export TSO helper functions
@ 2014-05-27 10:16 Arnd Bergmann
  2014-05-27 12:37 ` Ezequiel Garcia
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2014-05-27 10:16 UTC (permalink / raw)
  To: netdev; +Cc: ezequiel.garcia, David Miller

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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
diff --git a/net/core/tso.c b/net/core/tso.c
index 097821d..c8caf5b 100644
--- a/net/core/tso.c
+++ b/net/core/tso.c
@@ -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);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: net: export TSO helper functions
  2014-05-27 10:16 net: export TSO helper functions Arnd Bergmann
@ 2014-05-27 12:37 ` Ezequiel Garcia
  2014-05-27 12:52   ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Ezequiel Garcia @ 2014-05-27 12:37 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: netdev, David Miller, sachin.kamat

Hi Arnd,

On 27 May 12:16 PM, Arnd Bergmann wrote:
> 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.
-- 
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: net: export TSO helper functions
  2014-05-27 12:37 ` Ezequiel Garcia
@ 2014-05-27 12:52   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2014-05-27 12:52 UTC (permalink / raw)
  To: Ezequiel Garcia; +Cc: netdev, David Miller, sachin.kamat

On Tuesday 27 May 2014 09:37:47 Ezequiel Garcia wrote:
> On 27 May 12:16 PM, Arnd Bergmann wrote:
> > 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.
 
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-27 12:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-27 10:16 net: export TSO helper functions Arnd Bergmann
2014-05-27 12:37 ` Ezequiel Garcia
2014-05-27 12:52   ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox