diff mbox

linux-generic: decouple odp_errno define from odp-linux

Message ID 1490880665-2278-1-git-send-email-balakrishna.garapati@linaro.org
State Superseded
Headers show

Commit Message

Balakrishna Garapati March 30, 2017, 1:31 p.m. UTC
makes it easy to define odp_errno to dpdk rteerrno and fixes
linking issues.

Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org>

---
 platform/linux-generic/Makefile.am                |  1 +
 platform/linux-generic/include/odp_errno_define.h | 27 +++++++++++++++++++++++
 platform/linux-generic/include/odp_internal.h     |  3 +--
 3 files changed, 29 insertions(+), 2 deletions(-)
 create mode 100644 platform/linux-generic/include/odp_errno_define.h

-- 
1.9.1

Comments

Balakrishna Garapati April 4, 2017, 1:36 p.m. UTC | #1
ping

On 30 March 2017 at 15:31, Balakrishna Garapati <
balakrishna.garapati@linaro.org> wrote:

> makes it easy to define odp_errno to dpdk rteerrno and fixes

> linking issues.

>

> Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org>

> ---

>  platform/linux-generic/Makefile.am                |  1 +

>  platform/linux-generic/include/odp_errno_define.h | 27

> +++++++++++++++++++++++

>  platform/linux-generic/include/odp_internal.h     |  3 +--

>  3 files changed, 29 insertions(+), 2 deletions(-)

>  create mode 100644 platform/linux-generic/include/odp_errno_define.h

>

> diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/

> Makefile.am

> index 37835c3..5452915 100644

> --- a/platform/linux-generic/Makefile.am

> +++ b/platform/linux-generic/Makefile.am

> @@ -125,6 +125,7 @@ noinst_HEADERS = \

>                   ${srcdir}/include/odp_config_internal.h \

>                   ${srcdir}/include/odp_crypto_internal.h \

>                   ${srcdir}/include/odp_debug_internal.h \

> +                 ${srcdir}/include/odp_errno_define.h \

>                   ${srcdir}/include/odp_forward_typedefs_internal.h \

>                   ${srcdir}/include/odp_internal.h \

>                   ${srcdir}/include/odp_name_table_internal.h \

> diff --git a/platform/linux-generic/include/odp_errno_define.h

> b/platform/linux-generic/include/odp_errno_define.h

> new file mode 100644

> index 0000000..9baa7d9

> --- /dev/null

> +++ b/platform/linux-generic/include/odp_errno_define.h

> @@ -0,0 +1,27 @@

> +/* Copyright (c) 2017, Linaro Limited

> + * All rights reserved.

> + *

> + * SPDX-License-Identifier:     BSD-3-Clause

> + */

> +

> +/**

> + * @file

> + *

> + * ODP error number define

> + */

> +

> +

> +#ifndef ODP_ERRNO_DEFINE_H_

> +#define ODP_ERRNO_DEFINE_H_

> +

> +#ifdef __cplusplus

> +extern "C" {

> +#endif

> +

> +extern __thread int __odp_errno;

> +

> +#ifdef __cplusplus

> +}

> +#endif

> +

> +#endif

> diff --git a/platform/linux-generic/include/odp_internal.h

> b/platform/linux-generic/include/odp_internal.h

> index b313b1f..e1267cf 100644

> --- a/platform/linux-generic/include/odp_internal.h

> +++ b/platform/linux-generic/include/odp_internal.h

> @@ -20,11 +20,10 @@ extern "C" {

>  #include <odp/api/init.h>

>  #include <odp/api/cpumask.h>

>  #include <odp/api/thread.h>

> +#include <odp_errno_define.h>

>  #include <stdio.h>

>  #include <sys/types.h>

>

> -extern __thread int __odp_errno;

> -

>  #define MAX_CPU_NUMBER 128

>

>  typedef struct {

> --

> 1.9.1

>

>
Bill Fischofer April 5, 2017, 4:18 p.m. UTC | #2
This patch has an extra blank line that checkpatch flags:

le-odp_errno-define-from-odp-lin.patch
CHECK: Please don't use multiple blank lines
#48: FILE: platform/linux-generic/include/odp_errno_define.h:13:
+
+

But other than that, this is good.

On Thu, Mar 30, 2017 at 8:31 AM, Balakrishna Garapati
<balakrishna.garapati@linaro.org> wrote:
> makes it easy to define odp_errno to dpdk rteerrno and fixes

> linking issues.

>

> Signed-off-by: Balakrishna Garapati <balakrishna.garapati@linaro.org>


Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org>

> ---

>  platform/linux-generic/Makefile.am                |  1 +

>  platform/linux-generic/include/odp_errno_define.h | 27 +++++++++++++++++++++++

>  platform/linux-generic/include/odp_internal.h     |  3 +--

>  3 files changed, 29 insertions(+), 2 deletions(-)

>  create mode 100644 platform/linux-generic/include/odp_errno_define.h

>

> diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am

> index 37835c3..5452915 100644

> --- a/platform/linux-generic/Makefile.am

> +++ b/platform/linux-generic/Makefile.am

> @@ -125,6 +125,7 @@ noinst_HEADERS = \

>                   ${srcdir}/include/odp_config_internal.h \

>                   ${srcdir}/include/odp_crypto_internal.h \

>                   ${srcdir}/include/odp_debug_internal.h \

> +                 ${srcdir}/include/odp_errno_define.h \

>                   ${srcdir}/include/odp_forward_typedefs_internal.h \

>                   ${srcdir}/include/odp_internal.h \

>                   ${srcdir}/include/odp_name_table_internal.h \

> diff --git a/platform/linux-generic/include/odp_errno_define.h b/platform/linux-generic/include/odp_errno_define.h

> new file mode 100644

> index 0000000..9baa7d9

> --- /dev/null

> +++ b/platform/linux-generic/include/odp_errno_define.h

> @@ -0,0 +1,27 @@

> +/* Copyright (c) 2017, Linaro Limited

> + * All rights reserved.

> + *

> + * SPDX-License-Identifier:     BSD-3-Clause

> + */

> +

> +/**

> + * @file

> + *

> + * ODP error number define

> + */

> +

> +

> +#ifndef ODP_ERRNO_DEFINE_H_

> +#define ODP_ERRNO_DEFINE_H_

> +

> +#ifdef __cplusplus

> +extern "C" {

> +#endif

> +

> +extern __thread int __odp_errno;

> +

> +#ifdef __cplusplus

> +}

> +#endif

> +

> +#endif

> diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h

> index b313b1f..e1267cf 100644

> --- a/platform/linux-generic/include/odp_internal.h

> +++ b/platform/linux-generic/include/odp_internal.h

> @@ -20,11 +20,10 @@ extern "C" {

>  #include <odp/api/init.h>

>  #include <odp/api/cpumask.h>

>  #include <odp/api/thread.h>

> +#include <odp_errno_define.h>

>  #include <stdio.h>

>  #include <sys/types.h>

>

> -extern __thread int __odp_errno;

> -

>  #define MAX_CPU_NUMBER 128

>

>  typedef struct {

> --

> 1.9.1

>
diff mbox

Patch

diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index 37835c3..5452915 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -125,6 +125,7 @@  noinst_HEADERS = \
 		  ${srcdir}/include/odp_config_internal.h \
 		  ${srcdir}/include/odp_crypto_internal.h \
 		  ${srcdir}/include/odp_debug_internal.h \
+		  ${srcdir}/include/odp_errno_define.h \
 		  ${srcdir}/include/odp_forward_typedefs_internal.h \
 		  ${srcdir}/include/odp_internal.h \
 		  ${srcdir}/include/odp_name_table_internal.h \
diff --git a/platform/linux-generic/include/odp_errno_define.h b/platform/linux-generic/include/odp_errno_define.h
new file mode 100644
index 0000000..9baa7d9
--- /dev/null
+++ b/platform/linux-generic/include/odp_errno_define.h
@@ -0,0 +1,27 @@ 
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP error number define
+ */
+
+
+#ifndef ODP_ERRNO_DEFINE_H_
+#define ODP_ERRNO_DEFINE_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern __thread int __odp_errno;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h
index b313b1f..e1267cf 100644
--- a/platform/linux-generic/include/odp_internal.h
+++ b/platform/linux-generic/include/odp_internal.h
@@ -20,11 +20,10 @@  extern "C" {
 #include <odp/api/init.h>
 #include <odp/api/cpumask.h>
 #include <odp/api/thread.h>
+#include <odp_errno_define.h>
 #include <stdio.h>
 #include <sys/types.h>
 
-extern __thread int __odp_errno;
-
 #define MAX_CPU_NUMBER 128
 
 typedef struct {