From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 8E9913F9 for ; Wed, 10 Dec 2014 09:39:48 +0100 (CET) Received: by mail-wg0-f54.google.com with SMTP id l2so2956068wgh.27 for ; Wed, 10 Dec 2014 00:39:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=v5wE3JhjcH1blmAzG/B69eQsuKElZaWYK6Ald6QNjd0=; b=hv8S1QXt+833Vv+SqwKdYKraJ6wZD+g7QfdigeVKQoqNxQmZYB0pVof2JV8i0tmEBe CN6TLfcQEverZw7wn8f/8/0qPlMODhZsd2eVmUdAu7VhJKAkS2IKq9lQCPFKf3x85Jr4 KF/3gukLHqOIQ4W5wkIobK83dBS5eUpyKWh283EOOatFF64Vwhoi0r6VWhYdKApFYG9e 8r9XUrym+BgXsHm3cvYU4PODvQmBlBAnlcgNlEiel5G6fNHqoIZRJmRMKIRh3KsiS0VO zSgHXTYMG4LsHAGc561Kcc1AbvB5q/51FmefKQiglnQCfOFgzZALl6wWE1mabLQT0ocq Sebg== X-Gm-Message-State: ALoCoQkZKPkD1ME64IjzifSlz0oU0f0cfCMYTMMKsU3GMviXkhUC5IvtXgdeWP9PWL7N3YBfv/Uq X-Received: by 10.194.216.170 with SMTP id or10mr4573499wjc.96.1418200788436; Wed, 10 Dec 2014 00:39:48 -0800 (PST) Received: from xps13.localnet ([78.188.139.117]) by mx.google.com with ESMTPSA id j2sm4910684wjs.28.2014.12.10.00.39.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Dec 2014 00:39:47 -0800 (PST) From: Thomas Monjalon To: Jincheng Miao Date: Wed, 10 Dec 2014 09:39:14 +0100 Message-ID: <1663200.Cog0FQ0fDE@xps13> Organization: 6WIND User-Agent: KMail/4.14.3 (Linux/3.17.4-1-ARCH; KDE/4.14.3; x86_64; ; ) In-Reply-To: <1418182383-5744-4-git-send-email-jmiao@redhat.com> References: <1418182383-5744-1-git-send-email-jmiao@redhat.com> <1418182383-5744-4-git-send-email-jmiao@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 3/4] kni: replace strict_strtoul with kstrtoul X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2014 08:39:48 -0000 Hi Jincheng, 2014-12-10 11:33, Jincheng Miao: > From upstream kernel commit 3db2e9cd, strict_strto* serial functions > are removed. So that we should directly used kstrtoul instead. > > And add kni/compat.h for be compatible with older kernel. > > Signed-off-by: Jincheng Miao [...] > new file mode 100644 > index 0000000..c8c662c > --- /dev/null > +++ b/lib/librte_eal/linuxapp/kni/compat.h > @@ -0,0 +1,16 @@ > +/* > + * Minimal wrappers to allow compiling kni on older kernels. > + */ > + > +#ifndef RHEL_RELEASE_VERSION > +#define RHEL_RELEASE_VERSION(a, b) (((a) << 8) + (b)) > +#endif > + > +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) && \ > + (!(defined(RHEL_RELEASE_CODE) && \ > + RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6, 4))) The first indent character must be a tab (highlighted by checkpatch). [...] > --- a/lib/librte_eal/linuxapp/kni/kni_vhost.c > +++ b/lib/librte_eal/linuxapp/kni/kni_vhost.c > @@ -740,7 +740,7 @@ set_sock_en(struct device *dev, struct device_attribute *attr, > unsigned long en; > int err = 0; > > - if (0 != strict_strtoul(buf, 0, &en)) > + if (0 != kstrtoul(buf, 0, &en)) > return -EINVAL; > > if (en) It seems you forgot to include the new compat.h. Did you do some tests with different Fedora/RHEL versions? Thanks -- Thomas