aboutsummaryrefslogtreecommitdiffstats
path: root/debian/patches/ubuntu-backport-43-fix-level-type-retrieving.patch
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-06-15 20:29:06 +0200
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-06-15 20:37:12 +0200
commit199e427d5dea3051eec1726eb9c857aa3d5fdde2 (patch)
tree5477b3bd4868676a210bbd3ef67a469d34814e61 /debian/patches/ubuntu-backport-43-fix-level-type-retrieving.patch
parentb5cdd645c9fc62341d55aebbfc93a1b648415512 (diff)
Merge Ubuntu DPDK packaging as of 15th June 2016
As discussed this shall be our initial baseline. If history is needed for any sort of debugging or analysis it can be found at https://code.launchpad.net/~ubuntu-server/dpdk/+git/dpdk Change-Id: Ie95c7effbbea34d723df14f6451c1f782000cbc1 Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'debian/patches/ubuntu-backport-43-fix-level-type-retrieving.patch')
-rw-r--r--debian/patches/ubuntu-backport-43-fix-level-type-retrieving.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/debian/patches/ubuntu-backport-43-fix-level-type-retrieving.patch b/debian/patches/ubuntu-backport-43-fix-level-type-retrieving.patch
new file mode 100644
index 00000000..9a56223f
--- /dev/null
+++ b/debian/patches/ubuntu-backport-43-fix-level-type-retrieving.patch
@@ -0,0 +1,61 @@
+Index: dpdk/lib/librte_eal/common/eal_common_log.c
+===================================================================
+--- dpdk.orig/lib/librte_eal/common/eal_common_log.c
++++ dpdk/lib/librte_eal/common/eal_common_log.c
+@@ -57,9 +57,10 @@ static FILE *default_log_stream;
+ struct log_cur_msg {
+ uint32_t loglevel; /**< log level - see rte_log.h */
+ uint32_t logtype; /**< log type - see rte_log.h */
+-} __rte_cache_aligned;
+-static struct log_cur_msg log_cur_msg[RTE_MAX_LCORE]; /**< per core log */
++};
+
++ /* per core log */
++static RTE_DEFINE_PER_LCORE(struct log_cur_msg, log_cur_msg);
+
+ /* default logs */
+
+@@ -121,21 +122,13 @@ rte_get_log_type(void)
+ /* get the current loglevel for the message beeing processed */
+ int rte_log_cur_msg_loglevel(void)
+ {
+- unsigned lcore_id;
+- lcore_id = rte_lcore_id();
+- if (lcore_id >= RTE_MAX_LCORE)
+- return rte_get_log_level();
+- return log_cur_msg[lcore_id].loglevel;
++ return RTE_PER_LCORE(log_cur_msg).loglevel;
+ }
+
+ /* get the current logtype for the message beeing processed */
+ int rte_log_cur_msg_logtype(void)
+ {
+- unsigned lcore_id;
+- lcore_id = rte_lcore_id();
+- if (lcore_id >= RTE_MAX_LCORE)
+- return rte_get_log_type();
+- return log_cur_msg[lcore_id].logtype;
++ return RTE_PER_LCORE(log_cur_msg).logtype;
+ }
+
+ /* Dump log history to file */
+@@ -153,17 +146,13 @@ rte_vlog(uint32_t level, uint32_t logtyp
+ {
+ int ret;
+ FILE *f = rte_logs.file;
+- unsigned lcore_id;
+
+ if ((level > rte_logs.level) || !(logtype & rte_logs.type))
+ return 0;
+
+ /* save loglevel and logtype in a global per-lcore variable */
+- lcore_id = rte_lcore_id();
+- if (lcore_id < RTE_MAX_LCORE) {
+- log_cur_msg[lcore_id].loglevel = level;
+- log_cur_msg[lcore_id].logtype = logtype;
+- }
++ RTE_PER_LCORE(log_cur_msg).loglevel = level;
++ RTE_PER_LCORE(log_cur_msg).logtype = logtype;
+
+ ret = vfprintf(f, format, ap);
+ fflush(f);