patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] kni: rename variable
@ 2019-12-21  1:02 Stephen Hemminger
  2020-01-14 18:43 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2019-12-21  1:02 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger, dg, stable

All global variables in kernel should be prefixed by the same
to avoid any symbol conflics. Rename dflt_carrier to kni_default_carrier.

Fixes: 89397a01ce4a ("kni: set default carrier state of interface")
Cc: dg@adax.com
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 kernel/linux/kni/kni_dev.h  |  2 +-
 kernel/linux/kni/kni_misc.c | 10 +++++-----
 kernel/linux/kni/kni_net.c  |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/kernel/linux/kni/kni_dev.h b/kernel/linux/kni/kni_dev.h
index 5e75c6371f22..ca5f92a47b70 100644
--- a/kernel/linux/kni/kni_dev.h
+++ b/kernel/linux/kni/kni_dev.h
@@ -32,7 +32,7 @@
 #define MBUF_BURST_SZ 32
 
 /* Default carrier state for created KNI network interfaces */
-extern uint32_t dflt_carrier;
+extern uint32_t kni_dflt_carrier;
 
 /**
  * A structure describing the private information for a kni device.
diff --git a/kernel/linux/kni/kni_misc.c b/kernel/linux/kni/kni_misc.c
index cda71bde08e1..2b464c438113 100644
--- a/kernel/linux/kni/kni_misc.c
+++ b/kernel/linux/kni/kni_misc.c
@@ -39,7 +39,7 @@ static uint32_t multiple_kthread_on;
 
 /* Default carrier state for created KNI network interfaces */
 static char *carrier;
-uint32_t dflt_carrier;
+uint32_t kni_dflt_carrier;
 
 #define KNI_DEV_IN_USE_BIT_NUM 0 /* Bit number for device in use */
 
@@ -554,14 +554,14 @@ static int __init
 kni_parse_carrier_state(void)
 {
 	if (!carrier) {
-		dflt_carrier = 0;
+		kni_dflt_carrier = 0;
 		return 0;
 	}
 
 	if (strcmp(carrier, "off") == 0)
-		dflt_carrier = 0;
+		kni_dflt_carrier = 0;
 	else if (strcmp(carrier, "on") == 0)
-		dflt_carrier = 1;
+		kni_dflt_carrier = 1;
 	else
 		return -1;
 
@@ -588,7 +588,7 @@ kni_init(void)
 		return -EINVAL;
 	}
 
-	if (dflt_carrier == 0)
+	if (kni_dflt_carrier == 0)
 		pr_debug("Default carrier state set to off.\n");
 	else
 		pr_debug("Default carrier state set to on.\n");
diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c
index 1ba9b1b99f66..97fe85be9ac6 100644
--- a/kernel/linux/kni/kni_net.c
+++ b/kernel/linux/kni/kni_net.c
@@ -158,7 +158,7 @@ kni_net_open(struct net_device *dev)
 	struct kni_dev *kni = netdev_priv(dev);
 
 	netif_start_queue(dev);
-	if (dflt_carrier == 1)
+	if (kni_dflt_carrier == 1)
 		netif_carrier_on(dev);
 	else
 		netif_carrier_off(dev);
-- 
2.20.1


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

* Re: [dpdk-stable] [PATCH] kni: rename variable
  2019-12-21  1:02 [dpdk-stable] [PATCH] kni: rename variable Stephen Hemminger
@ 2020-01-14 18:43 ` Ferruh Yigit
  2020-01-19 23:21   ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2020-01-14 18:43 UTC (permalink / raw)
  To: Stephen Hemminger, dev; +Cc: dg, stable

On 12/21/2019 1:02 AM, Stephen Hemminger wrote:
> All global variables in kernel should be prefixed by the same
> to avoid any symbol conflics. Rename dflt_carrier to kni_default_carrier.
> 
> Fixes: 89397a01ce4a ("kni: set default carrier state of interface")
> Cc: dg@adax.com
> Cc: stable@dpdk.org
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* Re: [dpdk-stable] [dpdk-dev]  [PATCH] kni: rename variable
  2020-01-14 18:43 ` Ferruh Yigit
@ 2020-01-19 23:21   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2020-01-19 23:21 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev, dg, stable, Ferruh Yigit

14/01/2020 19:43, Ferruh Yigit:
> On 12/21/2019 1:02 AM, Stephen Hemminger wrote:
> > All global variables in kernel should be prefixed by the same
> > to avoid any symbol conflics. Rename dflt_carrier to kni_default_carrier.
> > 
> > Fixes: 89397a01ce4a ("kni: set default carrier state of interface")
> > Cc: dg@adax.com
> > Cc: stable@dpdk.org
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied, thanks



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

end of thread, other threads:[~2020-01-19 23:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-21  1:02 [dpdk-stable] [PATCH] kni: rename variable Stephen Hemminger
2020-01-14 18:43 ` Ferruh Yigit
2020-01-19 23:21   ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon

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).