diff --git a/Makefile.am b/Makefile.am index 1ed70855..52e434bc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,7 +24,8 @@ AM_DISTCHECK_CONFIGURE_FLAGS = --with-bmv2 --with-fe-cpp # ensure the distribution of the doxygen configuration file EXTRA_DIST = $(top_srcdir)/docs/doxygen.cfg \ $(top_srcdir)/docs/bfn_latex.sty \ - $(top_srcdir)/docs/*.md + $(top_srcdir)/docs/*.md \ + autogen.sh mostlyclean-local: -$(RM) -r $(DX_CLEANFILES) diff --git a/configure.ac b/configure.ac index 461c70d0..02026583 100644 --- a/configure.ac +++ b/configure.ac @@ -2,9 +2,9 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.68]) -AC_INIT([PI], [0.1], [antonin@barefootnetworks.com]) +AC_INIT([p4lang-pi], [0.1], [antonin@barefootnetworks.com]) AC_CONFIG_AUX_DIR([.]) -AM_INIT_AUTOMAKE([foreign subdir-objects]) +AM_INIT_AUTOMAKE([1.9 tar-pax foreign subdir-objects]) AC_CONFIG_HEADERS([config.h]) AC_PROG_CC @@ -184,13 +184,14 @@ AC_MSG_RESULT([$CLANG]) # Enable all warnings. -Wno-tautological-constant-out-of-range-compare is # necessary because clang is excessively aggressive with this warning and # complains about some reasonable assertions. -EXTRA_CFLAGS="-Wall -Wextra" +EXTRA_CFLAGS="-Wall -Wextra -Wno-deprecated-declarations" +EXTRA_CPPFLAGS="-Wno-deprecated-declarations" AS_IF([test "$enable_Werror" = "yes"], [EXTRA_CFLAGS="$EXTRA_CFLAGS -Werror"]) AS_IF([test "x$CLANG" = "xyes"], [EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-tautological-constant-out-of-range-compare"]) AC_SUBST([AM_CFLAGS], ["$PTHREAD_CFLAGS $EXTRA_CFLAGS"]) -AC_SUBST([AM_CPPFLAGS], ["-DPI_LOG_ON -isystem$INCLUDE_DIR"]) +AC_SUBST([AM_CPPFLAGS], ["$EXTRA_CPPFLAGS -DPI_LOG_ON -isystem$INCLUDE_DIR"]) AC_SUBST([AM_LDFLAGS], ["-L$LIB_DIR"]) # Generate makefiles diff --git a/proto/frontend/src/device_mgr.cpp b/proto/frontend/src/device_mgr.cpp index b5e74ead..d5e52f31 100644 --- a/proto/frontend/src/device_mgr.cpp +++ b/proto/frontend/src/device_mgr.cpp @@ -2082,7 +2082,7 @@ class DeviceMgrImp { case p4v1::StreamMessageRequest::kArbitration: // must be handled by server code RETURN_ERROR_STATUS( - Code::INTERNAL, "Arbitration mesages must be handled by server"); + Code::INTERNAL, "Arbitration messages must be handled by server"); case p4v1::StreamMessageRequest::kPacket: return packet_io.packet_out_send(request.packet(), stream_error); case p4v1::StreamMessageRequest::kDigestAck: diff --git a/proto/p4runtime b/proto/p4runtime index c09cd0bf..bd19174b 160000 --- a/proto/p4runtime +++ b/proto/p4runtime @@ -1 +1 @@ -Subproject commit c09cd0bf2b529d328c7325ab00ab013ea74dc796 +Subproject commit bd19174b0f8a99dd0ea39a185dae311e5f8b3606 diff --git a/proto/server/Makefile.am b/proto/server/Makefile.am index dec1f1e3..30d667ec 100644 --- a/proto/server/Makefile.am +++ b/proto/server/Makefile.am @@ -11,7 +11,7 @@ if WITH_SYSREPO AM_CPPFLAGS += -DWITH_SYSREPO endif -AM_CXXFLAGS = -Wall -Werror +AM_CXXFLAGS = -Wall -Werror -Wno-deprecated-declarations lib_LTLIBRARIES = libpigrpcserver.la diff --git a/proto/server/PI/proto/pi_server.h b/proto/server/PI/proto/pi_server.h index cfd2b604..5af6dc26 100644 --- a/proto/server/PI/proto/pi_server.h +++ b/proto/server/PI/proto/pi_server.h @@ -20,6 +20,7 @@ #pragma once +#include "stddef.h" #include "stdint.h" #ifdef __cplusplus diff --git a/targets/bmv2/configure.ac b/targets/bmv2/configure.ac index dc3b631a..61bd54b7 100644 --- a/targets/bmv2/configure.ac +++ b/targets/bmv2/configure.ac @@ -55,7 +55,7 @@ AC_TYPE_SIZE_T EXTRA_CXXFLAGS="-Wall -Wextra" AS_IF([test "$enable_Werror" = "yes"], [EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Werror"]) -AC_SUBST([AM_CPPFLAGS], ["-isystem$INCLUDE_DIR"]) +AC_SUBST([AM_CPPFLAGS], ["-I$INCLUDE_DIR"]) AC_SUBST([AM_LDFLAGS], ["-L$LIB_DIR"]) AC_SUBST([AM_CXXFLAGS], ["$PTHREAD_CFLAGS $EXTRA_CXXFLAGS"]) AC_SUBST([AM_CFLAGS], ["$PTHREAD_CFLAGS"]) diff --git a/targets/bmv2/conn_mgr.cpp b/targets/bmv2/conn_mgr.cpp index cb977476..3475910c 100644 --- a/targets/bmv2/conn_mgr.cpp +++ b/targets/bmv2/conn_mgr.cpp @@ -45,7 +45,7 @@ using namespace ::apache::thrift::transport; // NOLINT(build/namespaces) namespace pibmv2 { struct ClientImp { - ::stdcxx::shared_ptr transport{nullptr}; + std::shared_ptr transport{nullptr}; std::unique_ptr client{nullptr}; std::unique_ptr mc_client{nullptr}; std::mutex mutex{}; @@ -70,14 +70,14 @@ int conn_mgr_client_init(conn_mgr_t *conn_mgr_state, dev_id_t dev_id, assert(conn_mgr_state->clients.find(dev_id) == conn_mgr_state->clients.end()); auto &client = conn_mgr_state->clients[dev_id]; // construct - ::stdcxx::shared_ptr socket( + std::shared_ptr socket( new TSocket("localhost", thrift_port_num)); - ::stdcxx::shared_ptr transport(new TBufferedTransport(socket)); - ::stdcxx::shared_ptr protocol(new TBinaryProtocol(transport)); + std::shared_ptr transport(new TBufferedTransport(socket)); + std::shared_ptr protocol(new TBinaryProtocol(transport)); - ::stdcxx::shared_ptr standard_protocol( + std::shared_ptr standard_protocol( new TMultiplexedProtocol(protocol, "standard")); - ::stdcxx::shared_ptr mc_protocol( + std::shared_ptr mc_protocol( new TMultiplexedProtocol(protocol, "simple_pre_lag")); try {