Skip to content

Commit

Permalink
misc compile and runtime fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
handong32 committed Apr 6, 2019
1 parent 86b0252 commit 8a5d249
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions src/native/Debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ void ebbrt::kvprintf(const char* __restrict format, va_list va) {
auto len = vsnprintf(nullptr, 0, format, va);
char buffer[len + 1]; // NOLINT
vsnprintf(buffer, len + 1, format, va2);
#ifdef __EBBRT_ENABLE_BAREMETAL_NIC__
console::Write("\r");
#endif
console::Write(buffer);
}

Expand Down
1 change: 0 additions & 1 deletion src/native/IxgbeDriver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1905,7 +1905,6 @@ void ebbrt::IxgbeDriverRep::ReceivePoll() {
while (GetRxBuf(&len, &bAddr, &rxflag, &process_rsc, &rnt) == 0) {
// hit last rsc context, start to process all buffers
if (process_rsc) {
ret = true;
process_rsc = false;
count++;

Expand Down
2 changes: 1 addition & 1 deletion src/native/IxgbeDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ class IxgbeDriverRep : public MulticoreEbb<IxgbeDriverRep, IxgbeDriver> {
void Send(std::unique_ptr<IOBuf> buf, PacketInfo pinfo);
void AddContext(uint8_t idx, uint8_t maclen, uint16_t iplen, uint8_t l4len,
enum l4_type l4type);
void AddTx(const uint8_t* pa, uint64_t len, uint64_t totallen, bool first,
void AddTx(uint64_t pa, uint64_t len, uint64_t totallen, bool first,
bool last, uint8_t ctx, bool ip_cksum, bool tcpudp_cksum, bool tse, int hdr_len);

private:
Expand Down
2 changes: 1 addition & 1 deletion src/native/Pci.cc
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void ebbrt::pci::Init() {
#ifdef __EBBRT_ENABLE_BAREMETAL_NIC__
// TODO - Kludge to identify where NIC sits in device tree, should incorporate
// Dan's pull request for enumerating bridges
EnumerateBus(0x1);
EnumerateBus(0x4);
#endif
}

Expand Down
6 changes: 3 additions & 3 deletions src/native/config.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# EbbRT native platform-specific configuration
option(__EBBRT_ENABLE_DISTRIBUTED_RUNTIME__ "Enable Distributed Runtime Support" ON)
option(__EBBRT_ENABLE_DISTRIBUTED_RUNTIME__ "Enable Distributed Runtime Support" OFF)
option(__EBBRT_ENABLE_NETWORKING__ "Enable Networking" ON)
option(__EBBRT_ENABLE_BAREMETAL_NIC__ "Enable Baremetal NIC" OFF)
option(__EBBRT_ENABLE_BAREMETAL_NIC__ "Enable Baremetal NIC" ON)
option(__EBBRT_ENABLE_TRACE__ "Enable Tracing Subsystem" OFF)
option(LARGE_WINDOW_HACK "Enable Large TCP Window Hack" OFF)
option(PAGE_CHECKER "Enable Page Checker" OFF)
Expand All @@ -13,7 +13,7 @@ configure_file(${PLATFORM_SOURCE_DIR}/config.h.in config.h @ONLY)
set(CMAKE_CXX_FLAGS "-Wall -Werror -std=gnu++14 -include ${CMAKE_CURRENT_BINARY_DIR}/config.h")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O4 -flto -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O4 -flto")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g3")
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)
set(CMAKE_ASM_FLAGS "-DASSEMBLY")
Expand Down

0 comments on commit 8a5d249

Please # to comment.