aboutsummaryrefslogtreecommitdiffstats
path: root/stacks/vpp/patch/0001-Fix-modify-makefile-to-adapt-dmm.patch
diff options
context:
space:
mode:
Diffstat (limited to 'stacks/vpp/patch/0001-Fix-modify-makefile-to-adapt-dmm.patch')
-rw-r--r--stacks/vpp/patch/0001-Fix-modify-makefile-to-adapt-dmm.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/stacks/vpp/patch/0001-Fix-modify-makefile-to-adapt-dmm.patch b/stacks/vpp/patch/0001-Fix-modify-makefile-to-adapt-dmm.patch
new file mode 100644
index 0000000..bb3eca7
--- /dev/null
+++ b/stacks/vpp/patch/0001-Fix-modify-makefile-to-adapt-dmm.patch
@@ -0,0 +1,72 @@
+From deb61897f0505a82bd26e7fa35b6923c1455732d Mon Sep 17 00:00:00 2001
+From: Jiang Wenjiang <jiangwenjiang@huawei.com>
+Date: Thu, 9 Aug 2018 08:22:24 +0800
+Subject: [PATCH] Fix: modify makefile to adapt dmm
+
+---
+ src/vcl.am | 17 +++++++++++++++--
+ src/vcl/ldp.c | 2 +-
+ 2 files changed, 16 insertions(+), 3 deletions(-)
+
+diff --git a/src/vcl.am b/src/vcl.am
+index 89e1841..b09cacb 100644
+--- a/src/vcl.am
++++ b/src/vcl.am
+@@ -11,13 +11,18 @@
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+
+-lib_LTLIBRARIES += libvppcom.la libvcl_ldpreload.la
++lib_LTLIBRARIES += libvppcom.la libvcl_ldpreload.la libdmm_vcl.la
+
+ libvppcom_la_SOURCES =
+ libvcl_ldpreload_la_SOURCES =
++libdmm_vcl_la_SOURCES =
+ libvppcom_la_DEPENDENCIES = \
+ libsvm.la \
+ libvlibmemoryclient.la
++libdmm_vcl_la_DEPENDENCIES = \
++ libsvm.la \
++ libvlibmemoryclient.la \
++ libvcl_ldpreload.la
+
+ libvppcom_la_LIBADD = $(libvppcom_la_DEPENDENCIES) -lpthread -lrt -ldl
+
+@@ -40,12 +45,20 @@ libvcl_ldpreload_la_SOURCES += \
+ vcl/ldp.c \
+ $(libvppcom_la_SOURCES)
+
++libdmm_vcl_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/../../../../release/include
++
++libdmm_vcl_la_LIBADD = $(libdmm_vcl_la_DEPENDENCIES) -lpthread -lrt -ldl
++
++libdmm_vcl_la_SOURCES += \
++ vcl/dmm_vcl_adpt.c \
++ $(libvcl_ldpreload_la_SOURCES)
++
+ nobase_include_HEADERS += \
+ vcl/ldp_socket_wrapper.h \
+ vcl/ldp_glibc_socket.h \
+ vcl/ldp.h
+
+-noinst_PROGRAMS += \
++bin_PROGRAMS += \
+ vcl_test_server \
+ vcl_test_client \
+ sock_test_server \
+diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c
+index d31cd2c..e386855 100644
+--- a/src/vcl/ldp.c
++++ b/src/vcl/ldp.c
+@@ -1669,7 +1669,7 @@ send (int fd, const void *buf, size_t n, int flags)
+ getpid (), fd, fd, func_str, sid, sid, buf, n, flags);
+
+ size = vppcom_session_sendto (sid, (void *) buf, n, flags, NULL);
+- if (size != VPPCOM_OK)
++ if (size <= VPPCOM_OK)
+ {
+ errno = -size;
+ size = -1;
+--
+1.8.3.1
+