Patchwork [PATCHv3,net-next,7/7] {pktgen, xfrm} Show spi value properly when ipsec turned on

login
register
mail settings
Submitter fan.du
Date Dec. 15, 2013, 7:58 a.m.
Message ID <1387094284-2901-8-git-send-email-fan.du@windriver.com>
Download mbox | patch
Permalink /patch/301315/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

fan.du - Dec. 15, 2013, 7:58 a.m.
If user run pktgen plus ipsec by using spi, show spi value
properly when cat /proc/net/pktgen/ethX

Signed-off-by: Fan Du <fan.du@windriver.com>
---
 net/core/pktgen.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch

diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index ae268ff..c7d1052 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -657,8 +657,11 @@  static int pktgen_if_show(struct seq_file *seq, void *v)
 	}
 
 #ifdef CONFIG_XFRM
-	if (pkt_dev->flags & F_IPSEC_ON)
+	if (pkt_dev->flags & F_IPSEC_ON) {
 		seq_printf(seq,  "IPSEC  ");
+		if (pkt_dev->spi)
+			seq_printf(seq, "spi:%u", pkt_dev->spi);
+	}
 #endif
 
 	if (pkt_dev->flags & F_MACSRC_RND)