From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1124DA04F7; Sat, 21 Dec 2019 02:02:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 79D7F2C19; Sat, 21 Dec 2019 02:02:25 +0100 (CET) Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by dpdk.org (Postfix) with ESMTP id 7CFC51252 for ; Sat, 21 Dec 2019 02:02:24 +0100 (CET) Received: by mail-pl1-f195.google.com with SMTP id c23so4827439plz.4 for ; Fri, 20 Dec 2019 17:02:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=r6kOcSaS6QMUF406GdvjPV06rAgZkbbn9oCGFddjqEQ=; b=h047p4XkpA+tRbQ37ynBgQ+of8x75DMzzSLsbQ4iGf2SOgbPCBm3liwSUpnsmHOCFQ RwbTd6ykOVMICeUb4R8p88OIiBidlrcH3OOGOCYQFlxiS0xTmassk69pB9Mj5IHrrqaM CZrUdgSjZotYYEh2sHxKZ7rxzxDxCJv5wgq8wEOfClDxRQ/vG/svuWn181G94x1hpi7f zDRTAVjv6b/Zi8IaQ6SQOuNBRwaOsHZrzygoSmYhVqdpo7BF9d5TmZxapW1GSQiEmAJd XV6AHN4eOD3ehHaOJnAWUH6bOJx847CyYXqNTd8yCsPMtHe4EtEvkJ57/N4sadgfuUA6 +w1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=r6kOcSaS6QMUF406GdvjPV06rAgZkbbn9oCGFddjqEQ=; b=I4PBu1n9WGxBq/oSJlMGrFC8q+dLW3t0fATUMPH9eVBv6YJ4geNzkxhYjzOyPl1wt+ nSqiC8Xf/x8otU9wAheP9ID6LBy/cDGsGQy7W5Ud9mA3zuUDgQXRxwOX6frddWp/I8aH K1l5CzwO2BLz250RvCVw/yPLHoCRUFLFjxNRFZpPBOSjiDzUiXdrb0qIgx/VHLelTBRE n4CUnE/YdddV2qSwDryx+c18GFPbTogfwDTA84DoB9KCCXXVXdPHIlCUEq8rhzxd2QpU Y6biQlZ+VUL72wm6JYydI5OlgMmngUmrQRsLzLQVsYibdKXj+3Co7Us3PZwWWUHQfElJ AeEg== X-Gm-Message-State: APjAAAW52zlznhAMCaodrsPlPY+ywLC80MVodBXqgq4w7y/G6VhBKfmb hb/oSWKsjQqKSNjcJ7gMZRQL9XdaLMxcCg== X-Google-Smtp-Source: APXvYqxlD7R8E87R57E5OI30kkHGPw0VLrXTtQPw9E2H5nIU7lEyhn/p1TUYLcTl0AsRMurwrDSA8g== X-Received: by 2002:a17:90a:d789:: with SMTP id z9mr19792504pju.5.1576890142924; Fri, 20 Dec 2019 17:02:22 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id p28sm12838851pgb.93.2019.12.20.17.02.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 17:02:21 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , dg@adax.com, stable@dpdk.org Date: Fri, 20 Dec 2019 17:02:14 -0800 Message-Id: <20191221010214.25735-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] kni: rename variable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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