Module: xenomai-3
Branch: wip/rtnet-fixes
Commit: a3624547ebcf16ad7cb62bf987f4590c9a0575b1
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=a3624547ebcf16ad7cb62bf987f4590c9a0575b1

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Feb 14 18:23:01 2018 +0100

net/ipv4: opt in for non-deliverable packet warning

---

 kernel/drivers/net/stack/ipv4/Kconfig    |    9 +++++++++
 kernel/drivers/net/stack/ipv4/ip_input.c |    3 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/kernel/drivers/net/stack/ipv4/Kconfig 
b/kernel/drivers/net/stack/ipv4/Kconfig
index 6660d21..fef7e19 100644
--- a/kernel/drivers/net/stack/ipv4/Kconfig
+++ b/kernel/drivers/net/stack/ipv4/Kconfig
@@ -62,5 +62,14 @@ config XENO_DRIVERS_NET_RTIPV4_ROUTER
 
     See Documentation/README.routing for further information.
 
+config XENO_DRIVERS_NET_RTIPV4_DEBUG
+    bool "RTipv4 Debugging"
+    depends on XENO_DRIVERS_NET_RTIPV4
+    default n
+    
+    ---help---
+    Enables debug message output of the RTipv4 layer. Typically, you
+    may want to turn this on for tracing issues in packet delivery.
+
 source "drivers/xenomai/net/stack/ipv4/udp/Kconfig"
 # source "drivers/xenomai/net/stack/ipv4/tcp/Kconfig"
diff --git a/kernel/drivers/net/stack/ipv4/ip_input.c 
b/kernel/drivers/net/stack/ipv4/ip_input.c
index 2d2a751..fce09b5 100644
--- a/kernel/drivers/net/stack/ipv4/ip_input.c
+++ b/kernel/drivers/net/stack/ipv4/ip_input.c
@@ -105,7 +105,8 @@ static inline void rt_ip_local_deliver(struct rtskb *skb)
         rt_ip_fallback_handler(skb);
 #endif /* CONFIG_XENO_DRIVERS_NET_ADDON_PROXY */
     } else {
-        rtdm_printk("RTnet: no protocol found\n");
+       if (IS_ENABLED(CONFIG_XENO_DRIVERS_NET_RTIPV4_DEBUG))
+               rtdm_printk("RTnet: no protocol found\n");
         kfree_rtskb(skb);
     }
 }


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to