netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: David Miller <davem@davemloft.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	Steffen Klassert <steffen.klassert@secunet.com>,
	netdev@vger.kernel.org
Subject: [PATCH 15/15] {xfrm,pktgen} Fix compiling error when CONFIG_XFRM is not set
Date: Tue, 14 Jan 2014 07:49:19 +0100	[thread overview]
Message-ID: <1389682159-3260-16-git-send-email-steffen.klassert@secunet.com> (raw)
In-Reply-To: <1389682159-3260-1-git-send-email-steffen.klassert@secunet.com>

From: Fan Du <fan.du@windriver.com>

0-DAY kernel build testing backend reported below error:
All error/warnings:

   net/core/pktgen.c: In function 'pktgen_if_write':
>> >> net/core/pktgen.c:1487:10: error: 'struct pktgen_dev' has no member named 'spi'
>> >> net/core/pktgen.c:1488:43: error: 'struct pktgen_dev' has no member named 'spi'

Fix this by encapuslating the code with CONFIG_XFRM.

Cc: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Fan Du <fan.du@windriver.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 net/core/pktgen.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index a37ec53..fa3e128 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -1482,7 +1482,7 @@ static ssize_t pktgen_if_write(struct file *file,
 		sprintf(pg_result, "OK: flows=%u", pkt_dev->cflows);
 		return count;
 	}
-
+#ifdef CONFIG_XFRM
 	if (!strcmp(name, "spi")) {
 		len = num_arg(&user_buffer[i], 10, &value);
 		if (len < 0)
@@ -1493,7 +1493,7 @@ static ssize_t pktgen_if_write(struct file *file,
 		sprintf(pg_result, "OK: spi=%u", pkt_dev->spi);
 		return count;
 	}
-
+#endif
 	if (!strcmp(name, "flowlen")) {
 		len = num_arg(&user_buffer[i], 10, &value);
 		if (len < 0)
-- 
1.7.9.5

  parent reply	other threads:[~2014-01-14  6:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14  6:49 pull request (net-next): ipsec-next 2014-01-14 Steffen Klassert
2014-01-14  6:49 ` [PATCH 01/15] xfrm: checkpatch errors with space Steffen Klassert
2014-01-14  6:49 ` [PATCH 02/15] xfrm: checkpatch errors with foo * bar Steffen Klassert
2014-01-14  6:49 ` [PATCH 03/15] xfrm: checkpatch erros with space prohibited Steffen Klassert
2014-01-14  6:49 ` [PATCH 04/15] xfrm: fix checkpatch error Steffen Klassert
2014-01-14  6:49 ` [PATCH 05/15] xfrm: checkpatch erros with inline keyword position Steffen Klassert
2014-01-14  6:49 ` [PATCH 06/15] {pktgen, xfrm} Correct xfrm state lock usage when transforming Steffen Klassert
2014-01-14  6:49 ` [PATCH 07/15] {pktgen, xfrm} Add statistics counting " Steffen Klassert
2014-01-14  6:49 ` [PATCH 08/15] {pktgen, xfrm} Correct xfrm_state_lock usage in xfrm_stateonly_find Steffen Klassert
2014-01-14  6:49 ` [PATCH 09/15] {pktgen, xfrm} Using "pgset spi xxx" to spedifiy SA for a given flow Steffen Klassert
2014-01-14  6:49 ` [PATCH 10/15] {pktgen, xfrm} Construct skb dst for tunnel mode transformation Steffen Klassert
2014-01-14  6:49 ` [PATCH 11/15] {pktgen, xfrm} Introduce xfrm_state_lookup_byspi for pktgen Steffen Klassert
2014-01-14  6:49 ` [PATCH 12/15] {pktgen, xfrm} Show spi value properly when ipsec turned on Steffen Klassert
2014-01-14  6:49 ` [PATCH 13/15] {pktgen, xfrm} Document IPsec usage in pktgen.txt Steffen Klassert
2014-01-14  6:49 ` [PATCH 14/15] pktgen_dst_metrics[] can be static Steffen Klassert
2014-01-14  6:49 ` Steffen Klassert [this message]
2014-01-14  7:14 ` pull request (net-next): ipsec-next 2014-01-14 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1389682159-3260-16-git-send-email-steffen.klassert@secunet.com \
    --to=steffen.klassert@secunet.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).