[Patch] net: fix build break when CONFIG_NET_CLS_ACT is not set

STALE7799d

5 messages, 2 authors, 2005-03-29 · open the first message on its own page

[Patch] net: fix build break when CONFIG_NET_CLS_ACT is not set

From: Neil Horman <hidden>
Date: 2005-03-29 20:27:28

Patch to fix build break that occurs when CONFIG_NET_CLS_ACT is not set.

Signed-off-by: Neil Horman <redacted>

 cls_fw.c      |    3 ++-
 cls_route.c   |    3 ++-
 cls_tcindex.c |    3 ++-
 cls_u32.c     |    2 ++
 4 files changed, 8 insertions(+), 3 deletions(-)


--- linux-2.6-sctp/net/sched/cls_u32.c.fix	2005-03-29 15:21:04.000000000 -0500
+++ linux-2.6-sctp/net/sched/cls_u32.c	2005-03-29 14:31:34.000000000 -0500
@@ -775,9 +775,11 @@ static int u32_dump(struct tcf_proto *tp
 	}
 
 	rta->rta_len = skb->tail - b;
+#ifdef CONFIG_NET_CLS_ACT
 	if (TC_U32_KEY(n->handle) && n->exts.action && n->exts.action->type == TCA_OLD_COMPAT)
 		if (tcf_exts_dump_stats(skb, &n->exts, &u32_ext_map) < 0)
 			goto rtattr_failure;
+#endif
 	return skb->len;
 
 rtattr_failure:
--- linux-2.6-sctp/net/sched/cls_fw.c.fix	2005-03-29 14:28:29.000000000 -0500
+++ linux-2.6-sctp/net/sched/cls_fw.c	2005-03-29 14:28:43.000000000 -0500
@@ -337,10 +337,11 @@ static int fw_dump(struct tcf_proto *tp,
 		goto rtattr_failure;
 
 	rta->rta_len = skb->tail - b;
-
+#ifdef CONFIG_NET_CLS_ACT
 	if (f->exts.action && f->exts.action->type == TCA_OLD_COMPAT)
 		if (tcf_exts_dump_stats(skb, &f->exts, &fw_ext_map) < 0)
 			goto rtattr_failure;
+#endif
 
 	return skb->len;
 
--- linux-2.6-sctp/net/sched/cls_tcindex.c.fix	2005-03-29 14:30:18.000000000 -0500
+++ linux-2.6-sctp/net/sched/cls_tcindex.c	2005-03-29 14:30:44.000000000 -0500
@@ -495,10 +495,11 @@ static int tcindex_dump(struct tcf_proto
 		if (tcf_exts_dump(skb, &r->exts, &tcindex_ext_map) < 0)
 			goto rtattr_failure;
 		rta->rta_len = skb->tail-b;
-
+#ifdef CONFIG_NET_CLS_ACT
 		if (r->exts.action && r->exts.action->type == TCA_OLD_COMPAT)
 			if (tcf_exts_dump_stats(skb, &r->exts, &tcindex_ext_map) < 0)
 				goto rtattr_failure;
+#endif
 	}
 	
 	return skb->len;
--- linux-2.6-sctp/net/sched/cls_route.c.fix	2005-03-29 14:29:30.000000000 -0500
+++ linux-2.6-sctp/net/sched/cls_route.c	2005-03-29 14:29:55.000000000 -0500
@@ -598,10 +598,11 @@ static int route4_dump(struct tcf_proto 
 		goto rtattr_failure;
 
 	rta->rta_len = skb->tail - b;
-
+#ifdef CONFIG_NET_CLS_ACT
 	if (f->exts.action && f->exts.action->type == TCA_OLD_COMPAT)
 		if (tcf_exts_dump_stats(skb, &f->exts, &route_ext_map) < 0)
 			goto rtattr_failure;
+#endif
 
 	return skb->len;
 
-- 
/***************************************************
 *Neil Horman
 *Software Engineer
 *Red Hat, Inc.
 *nhorman@redhat.com
 *gpg keyid: 1024D / 0x92A74FA1
 *http://pgp.mit.edu
 ***************************************************/

Re: [Patch] net: fix build break when CONFIG_NET_CLS_ACT is not set

From: jamal <hidden>
Date: 2005-03-29 21:14:18

This is being discussed on netdev at the moment. Thomas Graf is working
on a patch.
Thanks for the effort though.

cheers,
jamal

On Tue, 2005-03-29 at 15:25, Neil Horman wrote:
Patch to fix build break that occurs when CONFIG_NET_CLS_ACT is not set.

Signed-off-by: Neil Horman <redacted>

 cls_fw.c      |    3 ++-
 cls_route.c   |    3 ++-
 cls_tcindex.c |    3 ++-
 cls_u32.c     |    2 ++
 4 files changed, 8 insertions(+), 3 deletions(-)

Re: [Patch] net: fix build break when CONFIG_NET_CLS_ACT is not set

From: Neil Horman <hidden>
Date: 2005-03-29 21:24:53

On Tue, Mar 29, 2005 at 04:12:01PM -0500, jamal wrote:
This is being discussed on netdev at the moment. Thomas Graf is working
on a patch.
Thanks for the effort though.

cheers,
jamal
No worries.  What exactly is the point of contention on netdev? (I'm not
currently following that list).  My patch seems to follow the common practice
for CONFIG_NET_CLS_ACT, in that all references to the action member of the
appropriate struct are themselves ifdef-ed.
Regards,
Neil
On Tue, 2005-03-29 at 15:25, Neil Horman wrote:
quoted
Patch to fix build break that occurs when CONFIG_NET_CLS_ACT is not set.

Signed-off-by: Neil Horman <redacted>

 cls_fw.c      |    3 ++-
 cls_route.c   |    3 ++-
 cls_tcindex.c |    3 ++-
 cls_u32.c     |    2 ++
 4 files changed, 8 insertions(+), 3 deletions(-)
-- 
/***************************************************
 *Neil Horman
 *Software Engineer
 *Red Hat, Inc.
 *nhorman@redhat.com
 *gpg keyid: 1024D / 0x92A74FA1
 *http://pgp.mit.edu
 ***************************************************/

Re: [Patch] net: fix build break when CONFIG_NET_CLS_ACT is not set

From: jamal <hidden>
Date: 2005-03-29 21:30:02

On Tue, 2005-03-29 at 16:17, Neil Horman wrote:
No worries.  What exactly is the point of contention on netdev? (I'm not
currently following that list).  My patch seems to follow the common practice
for CONFIG_NET_CLS_ACT, in that all references to the action member of the
appropriate struct are themselves ifdef-ed.
We are trying to kill appearance of any #ifdef CONFIG_NET_CLS_ACT in the
classifiers. The patch you sent is correct except it will introduce
an ifdef that we are trying to kill. The current workaround is to turn
on CONFIG_NET_CLS_ACT in the kernel build.

cheers,
jamal

Re: [Patch] net: fix build break when CONFIG_NET_CLS_ACT is not set

From: Neil Horman <hidden>
Date: 2005-03-29 21:32:50

On Tue, Mar 29, 2005 at 04:26:00PM -0500, jamal wrote:
On Tue, 2005-03-29 at 16:17, Neil Horman wrote:
quoted
No worries.  What exactly is the point of contention on netdev? (I'm not
currently following that list).  My patch seems to follow the common practice
for CONFIG_NET_CLS_ACT, in that all references to the action member of the
appropriate struct are themselves ifdef-ed.
We are trying to kill appearance of any #ifdef CONFIG_NET_CLS_ACT in the
classifiers. The patch you sent is correct except it will introduce
an ifdef that we are trying to kill. The current workaround is to turn
on CONFIG_NET_CLS_ACT in the kernel build.

cheers,
jamal
Gotcha.  That seems like a pretty good idea. :)  Thanks!
Neil
-- 
/***************************************************
 *Neil Horman
 *Software Engineer
 *Red Hat, Inc.
 *nhorman@redhat.com
 *gpg keyid: 1024D / 0x92A74FA1
 *http://pgp.mit.edu
 ***************************************************/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help