netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: ptp: mark filter as __initdata
@ 2014-05-10 20:23 Mathias Krause
  2014-05-10 22:22 ` Alexei Starovoitov
  0 siblings, 1 reply; 3+ messages in thread
From: Mathias Krause @ 2014-05-10 20:23 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Mathias Krause

sk_unattached_filter_create() will copy the filter's instructions so we
don't need to have the master copy hanging around after initialization.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
---
 net/core/ptp_classifier.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/ptp_classifier.c b/net/core/ptp_classifier.c
index eaba0f68f8..37d86157b7 100644
--- a/net/core/ptp_classifier.c
+++ b/net/core/ptp_classifier.c
@@ -88,7 +88,7 @@ EXPORT_SYMBOL_GPL(ptp_classify_raw);
 
 void __init ptp_classifier_init(void)
 {
-	static struct sock_filter ptp_filter[] = {
+	static struct sock_filter ptp_filter[] __initdata = {
 		{ 0x28,  0,  0, 0x0000000c },
 		{ 0x15,  0, 12, 0x00000800 },
 		{ 0x30,  0,  0, 0x00000017 },
-- 
1.7.10.4

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

* Re: [PATCH net-next] net: ptp: mark filter as __initdata
  2014-05-10 20:23 [PATCH net-next] net: ptp: mark filter as __initdata Mathias Krause
@ 2014-05-10 22:22 ` Alexei Starovoitov
  2014-05-13 17:17   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Alexei Starovoitov @ 2014-05-10 22:22 UTC (permalink / raw)
  To: Mathias Krause; +Cc: David S. Miller, netdev@vger.kernel.org

On Sat, May 10, 2014 at 1:23 PM, Mathias Krause <minipli@googlemail.com> wrote:
> sk_unattached_filter_create() will copy the filter's instructions so we
> don't need to have the master copy hanging around after initialization.
>
> Signed-off-by: Mathias Krause <minipli@googlemail.com>

Nice! Every bit counts.

Acked-by: Alexei Starovoitov <ast@plumgrid.com>

> ---
>  net/core/ptp_classifier.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/core/ptp_classifier.c b/net/core/ptp_classifier.c
> index eaba0f68f8..37d86157b7 100644
> --- a/net/core/ptp_classifier.c
> +++ b/net/core/ptp_classifier.c
> @@ -88,7 +88,7 @@ EXPORT_SYMBOL_GPL(ptp_classify_raw);
>
>  void __init ptp_classifier_init(void)
>  {
> -       static struct sock_filter ptp_filter[] = {
> +       static struct sock_filter ptp_filter[] __initdata = {
>                 { 0x28,  0,  0, 0x0000000c },
>                 { 0x15,  0, 12, 0x00000800 },
>                 { 0x30,  0,  0, 0x00000017 },
> --
> 1.7.10.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH net-next] net: ptp: mark filter as __initdata
  2014-05-10 22:22 ` Alexei Starovoitov
@ 2014-05-13 17:17   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2014-05-13 17:17 UTC (permalink / raw)
  To: alexei.starovoitov; +Cc: minipli, netdev

From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Date: Sat, 10 May 2014 15:22:38 -0700

> On Sat, May 10, 2014 at 1:23 PM, Mathias Krause <minipli@googlemail.com> wrote:
>> sk_unattached_filter_create() will copy the filter's instructions so we
>> don't need to have the master copy hanging around after initialization.
>>
>> Signed-off-by: Mathias Krause <minipli@googlemail.com>
> 
> Nice! Every bit counts.
> 
> Acked-by: Alexei Starovoitov <ast@plumgrid.com>

Applied, thanks everyone.

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

end of thread, other threads:[~2014-05-13 17:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-10 20:23 [PATCH net-next] net: ptp: mark filter as __initdata Mathias Krause
2014-05-10 22:22 ` Alexei Starovoitov
2014-05-13 17:17   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).