libvma fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1675315
This commit is contained in:
parent
a3cea8a52b
commit
a508852970
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +0,0 @@
|
||||
/libvma-8.0.1.tar.gz
|
1
dead.package
Normal file
1
dead.package
Normal file
@ -0,0 +1 @@
|
||||
libvma fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1675315
|
@ -1,636 +0,0 @@
|
||||
diff -up libvma-8.0.1/src/vlogger/vlogger.cpp.me libvma-8.0.1/src/vlogger/vlogger.cpp
|
||||
diff -up libvma-8.0.1/src/vlogger/vlogger.h.me libvma-8.0.1/src/vlogger/vlogger.h
|
||||
--- libvma-8.0.1/src/vlogger/vlogger.h.me 2018-02-05 16:37:02.817681804 +0100
|
||||
+++ libvma-8.0.1/src/vlogger/vlogger.h 2018-02-05 16:41:24.109434120 +0100
|
||||
@@ -223,11 +223,11 @@ static inline void vlog_printf(vlog_leve
|
||||
|
||||
switch (g_vlogger_details) {
|
||||
case 3: // Time
|
||||
- len += snprintf(buf+len, VLOGGER_STR_SIZE-len-1, " Time: %9.3f", ((float)vlog_get_usec_since_start())/1000);
|
||||
+ len += snprintf(buf+len, VLOGGER_STR_SIZE-len-1, " Time: %9.3f", ((float)vlog_get_usec_since_start())/1000); // fallthrough
|
||||
case 2: // Pid
|
||||
- len += snprintf(buf+len, VLOGGER_STR_SIZE-len-1, " Pid: %5u", getpid());
|
||||
+ len += snprintf(buf+len, VLOGGER_STR_SIZE-len-1, " Pid: %5u", getpid()); // fallthrough
|
||||
case 1: // Tid
|
||||
- len += snprintf(buf+len, VLOGGER_STR_SIZE-len-1, " Tid: %5u", gettid());
|
||||
+ len += snprintf(buf+len, VLOGGER_STR_SIZE-len-1, " Tid: %5u", gettid()); // fallthrough
|
||||
case 0: // Func
|
||||
default:
|
||||
len += snprintf(buf+len, VLOGGER_STR_SIZE-len-1, " %s %s: ", g_vlogger_module_name, log_level::to_str(log_level));
|
||||
diff -up libvma-8.0.1.me libvma-8.0.1
|
||||
Nur in libvma-8.0.1.me: aclocal.m4.
|
||||
Nur in libvma-8.0.1.me: autom4te.cache.
|
||||
Gemeinsame Unterverzeichnisse: libvma-8.0.1.me/build und libvma-8.0.1/build.
|
||||
Gemeinsame Unterverzeichnisse: libvma-8.0.1.me/config und libvma-8.0.1/config.
|
||||
Nur in libvma-8.0.1.me: config.h.
|
||||
Nur in libvma-8.0.1.me: config.h.in.
|
||||
Nur in libvma-8.0.1.me: config.log.
|
||||
Nur in libvma-8.0.1.me: config.status.
|
||||
Nur in libvma-8.0.1.me: configure.
|
||||
Gemeinsame Unterverzeichnisse: libvma-8.0.1.me/debian und libvma-8.0.1/debian.
|
||||
Nur in libvma-8.0.1.me: libtool.
|
||||
Nur in libvma-8.0.1.me: Makefile.
|
||||
Nur in libvma-8.0.1.me: Makefile.in.
|
||||
Gemeinsame Unterverzeichnisse: libvma-8.0.1.me/src und libvma-8.0.1/src.
|
||||
Nur in libvma-8.0.1.me: stamp-h1.
|
||||
Gemeinsame Unterverzeichnisse: libvma-8.0.1.me/tests und libvma-8.0.1/tests.
|
||||
Nur in libvma-8.0.1.me: VMA_VERSION.
|
||||
diff -up libvma-8.0.1.me/src/vma/dev/buffer_pool.cpp.me libvma-8.0.1.me/src/vma/dev/buffer_pool.cpp
|
||||
--- libvma-8.0.1.me/src/vma/dev/buffer_pool.cpp.me 2018-02-05 16:50:45.046086354 +0100
|
||||
+++ libvma-8.0.1.me/src/vma/dev/buffer_pool.cpp 2018-02-05 16:55:01.233840952 +0100
|
||||
@@ -116,7 +116,7 @@ buffer_pool::buffer_pool(size_t buffer_c
|
||||
throw_vma_exception_no_msg();
|
||||
}
|
||||
break;
|
||||
- }
|
||||
+ } // fallthrough
|
||||
case ALLOC_TYPE_CONTIG:
|
||||
#ifndef VMA_IBV_ACCESS_ALLOCATE_MR
|
||||
m_is_contig_alloc = false;
|
||||
@@ -132,6 +132,7 @@ buffer_pool::buffer_pool(size_t buffer_c
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
+ // fallthrough
|
||||
case ALLOC_TYPE_ANON:
|
||||
default:
|
||||
__log_info_dbg("allocating memory using malloc()");
|
||||
diff -up libvma-8.0.1.me/src/vma/dev/net_device_val.cpp.me libvma-8.0.1.me/src/vma/dev/net_device_val.cpp
|
||||
diff -up libvma-8.0.1.me/src/vma/dev/qp_mgr.h.me libvma-8.0.1.me/src/vma/dev/qp_mgr.h
|
||||
--- libvma-8.0.1.me/src/vma/dev/qp_mgr.h.me 2018-02-05 16:46:49.759393319 +0100
|
||||
+++ libvma-8.0.1.me/src/vma/dev/qp_mgr.h 2018-02-05 16:50:25.235028000 +0100
|
||||
@@ -179,7 +179,7 @@ class qp_mgr_eth : public qp_mgr
|
||||
{
|
||||
public:
|
||||
qp_mgr_eth(const ring_simple* p_ring, const ib_ctx_handler* p_context, const uint8_t port_num,
|
||||
- struct ibv_comp_channel* p_rx_comp_event_channel, const uint32_t tx_num_wr, const uint16_t vlan) throw (vma_error) :
|
||||
+ struct ibv_comp_channel* p_rx_comp_event_channel, const uint32_t tx_num_wr, const uint16_t vlan) :
|
||||
qp_mgr(p_ring, p_context, port_num, tx_num_wr), m_vlan(vlan) { if(configure(p_rx_comp_event_channel)) throw_vma_exception("failed creating qp"); };
|
||||
|
||||
virtual void modify_qp_to_ready_state();
|
||||
@@ -196,7 +196,7 @@ class qp_mgr_ib : public qp_mgr
|
||||
{
|
||||
public:
|
||||
qp_mgr_ib(const ring_simple* p_ring, const ib_ctx_handler* p_context, const uint8_t port_num,
|
||||
- struct ibv_comp_channel* p_rx_comp_event_channel, const uint32_t tx_num_wr, const uint16_t pkey) throw (vma_error) :
|
||||
+ struct ibv_comp_channel* p_rx_comp_event_channel, const uint32_t tx_num_wr, const uint16_t pkey) :
|
||||
qp_mgr(p_ring, p_context, port_num, tx_num_wr), m_pkey(pkey) { update_pkey_index(); if(configure(p_rx_comp_event_channel)) throw_vma_exception("failed creating qp"); };
|
||||
|
||||
virtual void modify_qp_to_ready_state();
|
||||
diff -up libvma-8.0.1.me/src/vma/dev/ring_bond.h.me libvma-8.0.1.me/src/vma/dev/ring_bond.h
|
||||
--- libvma-8.0.1.me/src/vma/dev/ring_bond.h.me 2018-02-05 16:59:22.388610183 +0100
|
||||
+++ libvma-8.0.1.me/src/vma/dev/ring_bond.h 2018-02-05 16:59:45.409677991 +0100
|
||||
@@ -88,23 +88,23 @@ private:
|
||||
class ring_bond_eth : public ring_bond
|
||||
{
|
||||
public:
|
||||
- ring_bond_eth(in_addr_t local_if, ring_resource_creation_info_t* p_ring_info, int count, bool active_slaves[], uint16_t vlan, net_device_val::bond_type type, net_device_val::bond_xmit_hash_policy bond_xmit_hash_policy, uint32_t mtu) throw (vma_error):
|
||||
+ ring_bond_eth(in_addr_t local_if, ring_resource_creation_info_t* p_ring_info, int count, bool active_slaves[], uint16_t vlan, net_device_val::bond_type type, net_device_val::bond_xmit_hash_policy bond_xmit_hash_policy, uint32_t mtu):
|
||||
ring_bond(count, type, bond_xmit_hash_policy, mtu){
|
||||
create_slave_list(local_if, p_ring_info, active_slaves, vlan);
|
||||
update_rx_channel_fds();
|
||||
};
|
||||
protected:
|
||||
- virtual void create_slave_list(in_addr_t local_if, ring_resource_creation_info_t* p_ring_info, bool active_slaves[], uint16_t partition) throw (vma_error);
|
||||
+ virtual void create_slave_list(in_addr_t local_if, ring_resource_creation_info_t* p_ring_info, bool active_slaves[], uint16_t partition);
|
||||
};
|
||||
|
||||
class ring_bond_ib : public ring_bond
|
||||
{
|
||||
public:
|
||||
- ring_bond_ib(in_addr_t local_if, ring_resource_creation_info_t* p_ring_info, int count, bool active_slaves[], uint16_t pkey, net_device_val::bond_type type, net_device_val::bond_xmit_hash_policy bond_xmit_hash_policy, uint32_t mtu) throw (vma_error):
|
||||
+ ring_bond_ib(in_addr_t local_if, ring_resource_creation_info_t* p_ring_info, int count, bool active_slaves[], uint16_t pkey, net_device_val::bond_type type, net_device_val::bond_xmit_hash_policy bond_xmit_hash_policy, uint32_t mtu):
|
||||
ring_bond(count, type, bond_xmit_hash_policy, mtu){
|
||||
create_slave_list(local_if, p_ring_info, active_slaves, pkey);
|
||||
update_rx_channel_fds();
|
||||
};
|
||||
protected:
|
||||
- virtual void create_slave_list(in_addr_t local_if, ring_resource_creation_info_t* p_ring_info, bool active_slaves[], uint16_t partition) throw (vma_error);
|
||||
+ virtual void create_slave_list(in_addr_t local_if, ring_resource_creation_info_t* p_ring_info, bool active_slaves[], uint16_t partition);
|
||||
};
|
||||
diff -up libvma-8.0.1.me/src/vma/dev/ring_simple.h.me libvma-8.0.1.me/src/vma/dev/ring_simple.h
|
||||
--- libvma-8.0.1.me/src/vma/dev/ring_simple.h.me 2018-02-05 16:56:07.957037486 +0100
|
||||
+++ libvma-8.0.1.me/src/vma/dev/ring_simple.h 2018-02-05 16:56:36.450121414 +0100
|
||||
@@ -40,7 +40,7 @@
|
||||
class ring_simple : public ring
|
||||
{
|
||||
public:
|
||||
- ring_simple(in_addr_t local_if, uint16_t partition_sn, int count, transport_type_t transport_type, uint32_t mtu, ring* parent = NULL) throw (vma_error);
|
||||
+ ring_simple(in_addr_t local_if, uint16_t partition_sn, int count, transport_type_t transport_type, uint32_t mtu, ring* parent = NULL) ;
|
||||
virtual ~ring_simple();
|
||||
|
||||
virtual int request_notification(cq_type_t cq_type, uint64_t poll_sn);
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual qp_mgr* create_qp_mgr(const ib_ctx_handler* ib_ctx, uint8_t port_num, struct ibv_comp_channel* p_rx_comp_event_channel) = 0;
|
||||
- void create_resources(ring_resource_creation_info_t* p_ring_info, bool active) throw (vma_error);
|
||||
+ void create_resources(ring_resource_creation_info_t* p_ring_info, bool active) ;
|
||||
// Internal functions. No need for locks mechanism.
|
||||
bool rx_process_buffer(mem_buf_desc_t* p_rx_wc_buf_desc, transport_type_t m_transport_type, void* pv_fd_ready_array);
|
||||
void print_flow_to_rfs_udp_uc_map(flow_spec_udp_uc_map_t *p_flow_map);
|
||||
@@ -149,21 +149,21 @@ private:
|
||||
class ring_eth : public ring_simple
|
||||
{
|
||||
public:
|
||||
- ring_eth(in_addr_t local_if, ring_resource_creation_info_t* p_ring_info, int count, bool active, uint16_t vlan, uint32_t mtu, ring* parent = NULL) throw (vma_error):
|
||||
+ ring_eth(in_addr_t local_if, ring_resource_creation_info_t* p_ring_info, int count, bool active, uint16_t vlan, uint32_t mtu, ring* parent = NULL) :
|
||||
ring_simple(local_if, vlan, count, VMA_TRANSPORT_ETH, mtu, parent) { create_resources(p_ring_info, active); };
|
||||
|
||||
protected:
|
||||
- virtual qp_mgr* create_qp_mgr(const ib_ctx_handler* ib_ctx, uint8_t port_num, struct ibv_comp_channel* p_rx_comp_event_channel) throw (vma_error);
|
||||
+ virtual qp_mgr* create_qp_mgr(const ib_ctx_handler* ib_ctx, uint8_t port_num, struct ibv_comp_channel* p_rx_comp_event_channel) ;
|
||||
};
|
||||
|
||||
class ring_ib : public ring_simple
|
||||
{
|
||||
public:
|
||||
- ring_ib(in_addr_t local_if, ring_resource_creation_info_t* p_ring_info, int count, bool active, uint16_t pkey, uint32_t mtu, ring* parent = NULL) throw (vma_error):
|
||||
+ ring_ib(in_addr_t local_if, ring_resource_creation_info_t* p_ring_info, int count, bool active, uint16_t pkey, uint32_t mtu, ring* parent = NULL) :
|
||||
ring_simple(local_if, pkey, count, VMA_TRANSPORT_IB, mtu, parent) { create_resources(p_ring_info, active); };
|
||||
|
||||
protected:
|
||||
- virtual qp_mgr* create_qp_mgr(const ib_ctx_handler* ib_ctx, uint8_t port_num, struct ibv_comp_channel* p_rx_comp_event_channel) throw (vma_error);
|
||||
+ virtual qp_mgr* create_qp_mgr(const ib_ctx_handler* ib_ctx, uint8_t port_num, struct ibv_comp_channel* p_rx_comp_event_channel) ;
|
||||
};
|
||||
|
||||
#endif //RING_SIMPLE_H
|
||||
diff -up libvma-8.0.1.me/src/vma/sock/socket_fd_api.h.me libvma-8.0.1.me/src/vma/sock/socket_fd_api.h
|
||||
--- libvma-8.0.1.me/src/vma/sock/socket_fd_api.h.me 2018-02-05 16:56:50.925164049 +0100
|
||||
+++ libvma-8.0.1.me/src/vma/sock/socket_fd_api.h 2018-02-05 16:57:28.586274977 +0100
|
||||
@@ -119,13 +119,13 @@ public:
|
||||
virtual int getpeername(sockaddr *__name, socklen_t *__namelen);
|
||||
|
||||
virtual int setsockopt(int __level, int __optname,
|
||||
- __const void *__optval, socklen_t __optlen) throw (vma_error);
|
||||
+ __const void *__optval, socklen_t __optlen) ;
|
||||
|
||||
virtual int getsockopt(int __level, int __optname, void *__optval,
|
||||
- socklen_t *__optlen) throw (vma_error);
|
||||
- virtual int fcntl(int __cmd, unsigned long int __arg) throw (vma_error) = 0;
|
||||
+ socklen_t *__optlen) ;
|
||||
+ virtual int fcntl(int __cmd, unsigned long int __arg) ;
|
||||
|
||||
- virtual int ioctl(unsigned long int __request, unsigned long int __arg) throw (vma_error) = 0;
|
||||
+ virtual int ioctl(unsigned long int __request, unsigned long int __arg) ;
|
||||
|
||||
virtual ssize_t rx(const rx_call_t call_type, iovec* iov,
|
||||
const ssize_t iovlen, int* p_flags = 0,
|
||||
diff -up libvma-8.0.1.me/src/vma/sock/sockinfo.h.me libvma-8.0.1.me/src/vma/sock/sockinfo.h
|
||||
--- libvma-8.0.1.me/src/vma/sock/sockinfo.h.me 2018-02-05 16:57:44.453321715 +0100
|
||||
+++ libvma-8.0.1.me/src/vma/sock/sockinfo.h 2018-02-05 16:58:08.290391925 +0100
|
||||
@@ -102,7 +102,7 @@ typedef std::tr1::unordered_map<ring*, r
|
||||
class sockinfo : public socket_fd_api, public pkt_rcvr_sink, public pkt_sndr_source, public wakeup_pipe
|
||||
{
|
||||
public:
|
||||
- sockinfo(int fd) throw (vma_exception);
|
||||
+ sockinfo(int fd);
|
||||
virtual ~sockinfo();
|
||||
|
||||
#if _BullseyeCoverage
|
||||
@@ -169,8 +169,8 @@ protected:
|
||||
void* m_rx_callback_context; // user context
|
||||
|
||||
virtual void set_blocking(bool is_blocked);
|
||||
- virtual int fcntl(int __cmd, unsigned long int __arg) throw (vma_error);
|
||||
- virtual int ioctl(unsigned long int __request, unsigned long int __arg) throw (vma_error);
|
||||
+ virtual int fcntl(int __cmd, unsigned long int __arg);
|
||||
+ virtual int ioctl(unsigned long int __request, unsigned long int __arg);
|
||||
|
||||
virtual mem_buf_desc_t* get_front_m_rx_pkt_ready_list() = 0;
|
||||
virtual size_t get_size_m_rx_pkt_ready_list() = 0;
|
||||
diff -up libvma-8.0.1.me/src/vma/sock/sock-redirect.h.me libvma-8.0.1.me/src/vma/sock/sock-redirect.h
|
||||
--- libvma-8.0.1.me/src/vma/sock/sock-redirect.h.me 2018-02-05 16:55:23.796907411 +0100
|
||||
+++ libvma-8.0.1.me/src/vma/sock/sock-redirect.h 2018-02-05 16:55:50.402985778 +0100
|
||||
@@ -114,10 +114,10 @@ struct os_api {
|
||||
int (*connect) (int __fd, const struct sockaddr *__to, socklen_t __tolen);
|
||||
int (*listen) (int __fd, int __backlog);
|
||||
|
||||
- int (*setsockopt) (int __fd, int __level, int __optname, __const void *__optval, socklen_t __optlen) throw (vma_error);
|
||||
- int (*getsockopt) (int __fd, int __level, int __optname, void *__optval, socklen_t *__optlen) throw (vma_error);
|
||||
- int (*fcntl) (int __fd, int __cmd, ...) throw (vma_error);
|
||||
- int (*ioctl) (int __fd, unsigned long int __request, ...) throw (vma_error);
|
||||
+ int (*setsockopt) (int __fd, int __level, int __optname, __const void *__optval, socklen_t __optlen) ;
|
||||
+ int (*getsockopt) (int __fd, int __level, int __optname, void *__optval, socklen_t *__optlen) ;
|
||||
+ int (*fcntl) (int __fd, int __cmd, ...) ;
|
||||
+ int (*ioctl) (int __fd, unsigned long int __request, ...) ;
|
||||
int (*getsockname) (int __fd, struct sockaddr *__name,socklen_t *__namelen);
|
||||
int (*getpeername) (int __fd, struct sockaddr *__name,socklen_t *__namelen);
|
||||
|
||||
diff -up libvma-8.0.1/src/stats/stats_publisher.cpp.me libvma-8.0.1/src/stats/stats_publisher.cpp
|
||||
--- libvma-8.0.1/src/stats/stats_publisher.cpp.me 2018-02-05 20:51:58.289661916 +0100
|
||||
+++ libvma-8.0.1/src/stats/stats_publisher.cpp 2018-02-05 20:54:40.342177526 +0100
|
||||
@@ -189,7 +189,11 @@ void vma_shmem_stats_open(vlog_levels_t*
|
||||
|
||||
g_sh_mem_info.filename_sh_stats[0] = '\0';
|
||||
g_sh_mem_info.p_sh_stats = MAP_FAILED;
|
||||
- sprintf(g_sh_mem_info.filename_sh_stats, "%s/vmastat.%d", mce_sys.stats_shmem_dirname, getpid());
|
||||
+ ret = snprintf(g_sh_mem_info.filename_sh_stats, sizeof(g_sh_mem_info.filename_sh_stats), "%s/vmastat.%d", mce_sys.stats_shmem_dirname, getpid());
|
||||
+ if (!((0 < ret) && (ret < (int)sizeof(g_sh_mem_info.filename_sh_stats)))) {
|
||||
+ vlog_printf(VLOG_ERROR, "%s: Could not create file under %s %m\n", __func__, mce_sys.stats_shmem_dirname, errno);
|
||||
+ goto no_shmem;
|
||||
+ }
|
||||
saved_mode = umask(0);
|
||||
g_sh_mem_info.fd_sh_stats = open(g_sh_mem_info.filename_sh_stats, O_CREAT|O_RDWR, S_IRWXU | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
|
||||
umask(saved_mode);
|
||||
diff -up libvma-8.0.1/src/vma/config_parser.c.me libvma-8.0.1/src/vma/config_parser.c
|
||||
--- libvma-8.0.1/src/vma/config_parser.c.me 2018-02-05 20:55:30.352336647 +0100
|
||||
+++ libvma-8.0.1/src/vma/config_parser.c 2018-02-05 20:55:58.015424668 +0100
|
||||
@@ -117,7 +117,7 @@ static void __vma_set_ipv4_addr(short a0
|
||||
|
||||
p_ipv4 = &(__vma_address_port_rule->ipv4);
|
||||
|
||||
- sprintf(buf,"%d.%d.%d.%d", a0, a1, a2, a3);
|
||||
+ snprintf(buf, sizeof(buf), "%hd.%hd.%hd.%hd", a0, a1, a2, a3);
|
||||
if (!inet_aton(buf, p_ipv4))
|
||||
{
|
||||
parse_err = 1;
|
||||
diff -up libvma-8.0.1/src/vma/dev/net_device_val.cpp.me libvma-8.0.1/src/vma/dev/net_device_val.cpp
|
||||
--- libvma-8.0.1/src/vma/dev/net_device_val.cpp.me 2018-02-05 20:34:51.781395825 +0100
|
||||
+++ libvma-8.0.1/src/vma/dev/net_device_val.cpp 2018-02-05 20:39:30.698283260 +0100
|
||||
@@ -230,9 +230,12 @@ void net_device_val::configure(struct if
|
||||
// find the ibv context and port num
|
||||
for (int j=0; j<num_devices; j++) {
|
||||
char ib_res[1024] = {0};
|
||||
- char ib_path[256] = {0};
|
||||
- sprintf(ib_path, "%s/device/resource", pp_ibv_context_list[j]->device->ibdev_path);
|
||||
- priv_read_file(ib_path, ib_res, 1024);
|
||||
+ const char ib_path_format[] = "%s/device/resource";
|
||||
+ char ib_path[IBV_SYSFS_PATH_MAX + sizeof(ib_path_format)] = {0};
|
||||
+ snprintf(ib_path, sizeof(ib_path), ib_path_format, pp_ibv_context_list[j]->device->ibdev_path);
|
||||
+ if (priv_read_file(ib_path, ib_res, sizeof(ib_res)) <= 0) {
|
||||
+ continue;
|
||||
+ }
|
||||
if (strcmp(sys_res, ib_res) == 0) {
|
||||
m_slaves[i]->p_ib_ctx = g_p_ib_ctx_handler_collection->get_ib_ctx(pp_ibv_context_list[j]);
|
||||
int dev_id = -1;
|
||||
diff -up libvma-8.0.1/src/vma/dev/ring_bond.cpp.me libvma-8.0.1/src/vma/dev/ring_bond.cpp
|
||||
--- libvma-8.0.1/src/vma/dev/ring_bond.cpp.me 2018-02-05 20:42:02.186765259 +0100
|
||||
+++ libvma-8.0.1/src/vma/dev/ring_bond.cpp 2018-02-05 20:42:10.008790148 +0100
|
||||
@@ -465,7 +465,7 @@ void ring_bond::mem_buf_desc_return_to_o
|
||||
ring_logpanic("programming error, how did we got here?");
|
||||
}
|
||||
|
||||
-void ring_bond_eth::create_slave_list(in_addr_t local_if, ring_resource_creation_info_t* p_ring_info, bool active_slaves[], uint16_t vlan) throw (vma_error)
|
||||
+void ring_bond_eth::create_slave_list(in_addr_t local_if, ring_resource_creation_info_t* p_ring_info, bool active_slaves[], uint16_t vlan)
|
||||
{
|
||||
for (uint32_t i = 0; i < m_n_num_resources; i++) {
|
||||
m_bond_rings[i] = new ring_eth(local_if, &p_ring_info[i], 1, active_slaves[i], vlan, get_mtu(), this);
|
||||
@@ -482,7 +482,7 @@ void ring_bond_eth::create_slave_list(in
|
||||
close_gaps_active_rings();
|
||||
}
|
||||
|
||||
-void ring_bond_ib::create_slave_list(in_addr_t local_if, ring_resource_creation_info_t* p_ring_info, bool active_slaves[], uint16_t pkey) throw (vma_error)
|
||||
+void ring_bond_ib::create_slave_list(in_addr_t local_if, ring_resource_creation_info_t* p_ring_info, bool active_slaves[], uint16_t pkey)
|
||||
{
|
||||
for (uint32_t i = 0; i < m_n_num_resources; i++) {
|
||||
m_bond_rings[i] = new ring_ib(local_if, &p_ring_info[i], 1, active_slaves[i], pkey, get_mtu(), this); // get_mtu() reads the MTU from ifconfig when created. Now passing it to its slaves. could have sent 0 here, as the MTU of the bond is already on the bond
|
||||
diff -up libvma-8.0.1/src/vma/dev/ring_simple.cpp.me libvma-8.0.1/src/vma/dev/ring_simple.cpp
|
||||
--- libvma-8.0.1/src/vma/dev/ring_simple.cpp.me 2018-02-05 20:40:52.005541960 +0100
|
||||
+++ libvma-8.0.1/src/vma/dev/ring_simple.cpp 2018-02-05 20:41:42.553702792 +0100
|
||||
@@ -80,18 +80,18 @@ inline void ring_simple::send_status_han
|
||||
BULLSEYE_EXCLUDE_BLOCK_END
|
||||
}
|
||||
|
||||
-qp_mgr* ring_eth::create_qp_mgr(const ib_ctx_handler* ib_ctx, uint8_t port_num, struct ibv_comp_channel* p_rx_comp_event_channel) throw (vma_error)
|
||||
+qp_mgr* ring_eth::create_qp_mgr(const ib_ctx_handler* ib_ctx, uint8_t port_num, struct ibv_comp_channel* p_rx_comp_event_channel)
|
||||
{
|
||||
return new qp_mgr_eth(this, ib_ctx, port_num, p_rx_comp_event_channel, get_tx_num_wr(), get_partition());
|
||||
}
|
||||
|
||||
-qp_mgr* ring_ib::create_qp_mgr(const ib_ctx_handler* ib_ctx, uint8_t port_num, struct ibv_comp_channel* p_rx_comp_event_channel) throw (vma_error)
|
||||
+qp_mgr* ring_ib::create_qp_mgr(const ib_ctx_handler* ib_ctx, uint8_t port_num, struct ibv_comp_channel* p_rx_comp_event_channel)
|
||||
{
|
||||
return new qp_mgr_ib(this, ib_ctx, port_num, p_rx_comp_event_channel, get_tx_num_wr(), get_partition());
|
||||
}
|
||||
|
||||
|
||||
-ring_simple::ring_simple(in_addr_t local_if, uint16_t partition_sn, int count, transport_type_t transport_type, uint32_t mtu, ring* parent /*=NULL*/) throw (vma_error):
|
||||
+ring_simple::ring_simple(in_addr_t local_if, uint16_t partition_sn, int count, transport_type_t transport_type, uint32_t mtu, ring* parent /*=NULL*/):
|
||||
ring(count, mtu), m_lock_ring_rx("ring_simple:lock_rx"), m_lock_ring_tx("ring_simple:lock_tx"),
|
||||
m_p_qp_mgr(NULL), m_p_cq_mgr_rx(NULL), m_p_cq_mgr_tx(NULL),
|
||||
m_lock_ring_tx_buf_wait("ring:lock_tx_buf_wait"), m_tx_num_bufs(0), m_tx_num_wr(0), m_tx_num_wr_free(0),
|
||||
@@ -182,7 +182,7 @@ ring_simple::~ring_simple()
|
||||
ring_logdbg("delete ring() completed");
|
||||
}
|
||||
|
||||
-void ring_simple::create_resources(ring_resource_creation_info_t* p_ring_info, bool active) throw (vma_error)
|
||||
+void ring_simple::create_resources(ring_resource_creation_info_t* p_ring_info, bool active)
|
||||
{
|
||||
ring_logdbg("new ring()");
|
||||
|
||||
@@ -201,8 +201,7 @@ void ring_simple::create_resources(ring_
|
||||
VLOG_PRINTF_INFO_ONCE_THEN_ALWAYS(VLOG_ERROR, VLOG_DEBUG, "ibv_create_comp_channel for tx failed. m_p_tx_comp_event_channel = %p (errno=%d %m)", m_p_tx_comp_event_channel, errno);
|
||||
if (errno == EMFILE) {
|
||||
VLOG_PRINTF_INFO_ONCE_THEN_ALWAYS(VLOG_ERROR, VLOG_DEBUG, "did we run out of file descriptors? traffic may not be offloaded, increase ulimit -n");
|
||||
- }
|
||||
- throw_vma_exception("create event channel failed");
|
||||
+ };
|
||||
}
|
||||
BULLSEYE_EXCLUDE_BLOCK_END
|
||||
|
||||
@@ -226,8 +225,7 @@ void ring_simple::create_resources(ring_
|
||||
VLOG_PRINTF_INFO_ONCE_THEN_ALWAYS(VLOG_ERROR, VLOG_DEBUG, "ibv_create_comp_channel for rx failed. p_rx_comp_event_channel = %p (errno=%d %m)", m_p_rx_comp_event_channel, errno);
|
||||
if (errno == EMFILE) {
|
||||
VLOG_PRINTF_INFO_ONCE_THEN_ALWAYS(VLOG_ERROR, VLOG_DEBUG, "did we run out of file descriptors? traffic may not be offloaded, increase ulimit -n");
|
||||
- }
|
||||
- throw_vma_exception("create event channel failed");
|
||||
+ };
|
||||
}
|
||||
BULLSEYE_EXCLUDE_BLOCK_END
|
||||
|
||||
diff -up libvma-8.0.1/src/vma/proto/flow_tuple.cpp.me libvma-8.0.1/src/vma/proto/flow_tuple.cpp
|
||||
--- libvma-8.0.1/src/vma/proto/flow_tuple.cpp.me 2018-02-05 20:43:41.835082317 +0100
|
||||
+++ libvma-8.0.1/src/vma/proto/flow_tuple.cpp 2018-02-05 20:44:57.456322925 +0100
|
||||
@@ -160,7 +160,7 @@ bool flow_tuple::is_3_tuple()
|
||||
|
||||
void flow_tuple::set_str()
|
||||
{
|
||||
- snprintf(m_str, STR_MAX_LENGTH, "dst:%d.%d.%d.%d:%d, src:%d.%d.%d.%d:%d, protocol:%s",
|
||||
+ snprintf(m_str, sizeof(m_str), "dst:%hhu.%hhu.%hhu.%hhu:%hu, src:%hhu.%hhu.%hhu.%hhu:%hu, proto:%s",
|
||||
NIPQUAD(m_dst_ip), ntohs(m_dst_port),
|
||||
NIPQUAD(m_src_ip), ntohs(m_src_port),
|
||||
__vma_get_protocol_str(m_protocol));
|
||||
@@ -172,7 +172,7 @@ void flow_tuple::set_str()
|
||||
|
||||
void flow_tuple_with_local_if::set_str()
|
||||
{
|
||||
- snprintf(m_str, STR_MAX_LENGTH, "dst:%d.%d.%d.%d:%d, src:%d.%d.%d.%d:%d, protocol:%s, local if:%d.%d.%d.%d",
|
||||
+ snprintf(m_str, sizeof(m_str), "dst:%hhu.%hhu.%hhu.%hhu:%hu, src:%hhu.%hhu.%hhu.%hhu:%hu, proto:%s, if:%hhu.%hhu.%hhu.%hhu",
|
||||
NIPQUAD(m_dst_ip), ntohs(m_dst_port),
|
||||
NIPQUAD(m_src_ip), ntohs(m_src_port),
|
||||
__vma_get_protocol_str(m_protocol), NIPQUAD(m_local_if));
|
||||
diff -up libvma-8.0.1/src/vma/sock/pipeinfo.cpp.me libvma-8.0.1/src/vma/sock/pipeinfo.cpp
|
||||
--- libvma-8.0.1/src/vma/sock/pipeinfo.cpp.me 2018-02-05 20:49:49.731252877 +0100
|
||||
+++ libvma-8.0.1/src/vma/sock/pipeinfo.cpp 2018-02-05 20:50:05.167301990 +0100
|
||||
@@ -43,7 +43,7 @@
|
||||
#define VLOG_PRINTF(log_level, log_fmt, log_args...) vlog_printf(log_level, "fd[%#x]:%s() " log_fmt "\n", m_fd, __FUNCTION__, ##log_args)
|
||||
#define VLOG_PRINTF_DETAILS(log_level, log_fmt, log_args...) vlog_printf(log_level, MODULE_NAME ":%d:fd[%#x]:%s() " log_fmt "\n", __LINE__, m_fd, __FUNCTION__, ##log_args)
|
||||
|
||||
-#define pi_logpanic(log_fmt, log_args...) VLOG_PRINTF(VLOG_PANIC, log_fmt, ##log_args); throw;
|
||||
+#define pi_logpanic(log_fmt, log_args...) VLOG_PRINTF(VLOG_PANIC, log_fmt, ##log_args);
|
||||
#define pi_logerr(log_fmt, log_args...) VLOG_PRINTF(VLOG_ERROR, log_fmt, ##log_args)
|
||||
#define pi_logwarn(log_fmt, log_args...) VLOG_PRINTF(VLOG_WARNING, log_fmt, ##log_args)
|
||||
#define pi_loginfo(log_fmt, log_args...) VLOG_PRINTF(VLOG_INFO, log_fmt, ##log_args)
|
||||
@@ -125,7 +125,7 @@ void pipeinfo::clean_obj()
|
||||
g_p_event_handler_manager->unregister_timers_event_and_delete(this);
|
||||
}
|
||||
|
||||
-int pipeinfo::fcntl(int __cmd, unsigned long int __arg) throw (vma_error)
|
||||
+int pipeinfo::fcntl(int __cmd, unsigned long int __arg)
|
||||
{
|
||||
switch (__cmd) {
|
||||
case F_SETFL:
|
||||
@@ -163,7 +163,7 @@ int pipeinfo::fcntl(int __cmd, unsigned
|
||||
return orig_os_api.fcntl(m_fd, __cmd, __arg);
|
||||
}
|
||||
|
||||
-int pipeinfo::ioctl(unsigned long int __request, unsigned long int __arg) throw (vma_error)
|
||||
+int pipeinfo::ioctl(unsigned long int __request, unsigned long int __arg)
|
||||
{
|
||||
int *p_arg = (int *)__arg;
|
||||
|
||||
diff -up libvma-8.0.1/src/vma/sock/pipeinfo.h.me libvma-8.0.1/src/vma/sock/pipeinfo.h
|
||||
--- libvma-8.0.1/src/vma/sock/pipeinfo.h.me 2018-02-05 20:49:12.706135069 +0100
|
||||
+++ libvma-8.0.1/src/vma/sock/pipeinfo.h 2018-02-05 20:49:29.239187672 +0100
|
||||
@@ -47,8 +47,8 @@ public:
|
||||
|
||||
virtual void clean_obj();
|
||||
|
||||
- int fcntl(int __cmd, unsigned long int __arg) throw (vma_error);
|
||||
- int ioctl(unsigned long int __request, unsigned long int __arg) throw (vma_error);
|
||||
+ int fcntl(int __cmd, unsigned long int __arg);
|
||||
+ int ioctl(unsigned long int __request, unsigned long int __arg);
|
||||
|
||||
// Process a Rx request, we might have a ready packet, or we might block until
|
||||
// we have one (if sockinfo::m_b_blocking == true)
|
||||
diff -up libvma-8.0.1/src/vma/sock/socket_fd_api.cpp.me libvma-8.0.1/src/vma/sock/socket_fd_api.cpp
|
||||
--- libvma-8.0.1/src/vma/sock/socket_fd_api.cpp.me 2018-02-05 20:50:20.506350795 +0100
|
||||
+++ libvma-8.0.1/src/vma/sock/socket_fd_api.cpp 2018-02-05 20:50:28.599376542 +0100
|
||||
@@ -155,7 +155,7 @@ int socket_fd_api::getpeername(sockaddr
|
||||
}
|
||||
|
||||
int socket_fd_api::setsockopt(int __level, int __optname,
|
||||
- __const void *__optval, socklen_t __optlen) throw (vma_error)
|
||||
+ __const void *__optval, socklen_t __optlen)
|
||||
{
|
||||
__log_info_func("");
|
||||
int ret = orig_os_api.setsockopt(m_fd, __level, __optname, __optval, __optlen);
|
||||
@@ -166,7 +166,7 @@ int socket_fd_api::setsockopt(int __leve
|
||||
}
|
||||
|
||||
int socket_fd_api::getsockopt(int __level, int __optname, void *__optval,
|
||||
- socklen_t *__optlen) throw (vma_error)
|
||||
+ socklen_t *__optlen)
|
||||
{
|
||||
__log_info_func("");
|
||||
int ret = orig_os_api.getsockopt(m_fd, __level, __optname, __optval, __optlen);
|
||||
diff -up libvma-8.0.1/src/vma/sock/sockinfo.cpp.me libvma-8.0.1/src/vma/sock/sockinfo.cpp
|
||||
--- libvma-8.0.1/src/vma/sock/sockinfo.cpp.me 2018-02-05 20:45:56.355510329 +0100
|
||||
+++ libvma-8.0.1/src/vma/sock/sockinfo.cpp 2018-02-05 20:46:38.833645483 +0100
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
#define si_logdbg_no_funcname(log_fmt, log_args...) do { if (g_vlogger_level >= VLOG_DEBUG) vlog_printf(VLOG_DEBUG, MODULE_NAME "[fd=%d]:%d: " log_fmt "\n", m_fd, __LINE__, ##log_args); } while (0)
|
||||
|
||||
-sockinfo::sockinfo(int fd) throw (vma_exception):
|
||||
+sockinfo::sockinfo(int fd):
|
||||
socket_fd_api(fd),
|
||||
m_b_closed(false), m_b_blocking(true), m_protocol(PROTO_UNDEFINED),
|
||||
m_lock_rcv(MODULE_NAME "::m_lock_rcv"),
|
||||
@@ -117,7 +117,7 @@ void sockinfo::set_blocking(bool is_bloc
|
||||
m_p_socket_stats->b_blocking = m_b_blocking;
|
||||
}
|
||||
|
||||
-int sockinfo::fcntl(int __cmd, unsigned long int __arg) throw (vma_error)
|
||||
+int sockinfo::fcntl(int __cmd, unsigned long int __arg)
|
||||
{
|
||||
switch (__cmd) {
|
||||
case F_SETFL:
|
||||
@@ -160,7 +160,7 @@ int sockinfo::fcntl(int __cmd, unsigned
|
||||
return orig_os_api.fcntl(m_fd, __cmd, __arg);
|
||||
}
|
||||
|
||||
-int sockinfo::ioctl(unsigned long int __request, unsigned long int __arg) throw (vma_error)
|
||||
+int sockinfo::ioctl(unsigned long int __request, unsigned long int __arg)
|
||||
{
|
||||
|
||||
int *p_arg = (int *)__arg;
|
||||
diff -up libvma-8.0.1/src/vma/sock/sockinfo_tcp.cpp.me libvma-8.0.1/src/vma/sock/sockinfo_tcp.cpp
|
||||
--- libvma-8.0.1/src/vma/sock/sockinfo_tcp.cpp.me 2018-02-05 20:48:22.058973921 +0100
|
||||
+++ libvma-8.0.1/src/vma/sock/sockinfo_tcp.cpp 2018-02-05 20:48:52.602071103 +0100
|
||||
@@ -170,7 +170,7 @@ inline void sockinfo_tcp::reuse_buffer(m
|
||||
}
|
||||
}
|
||||
|
||||
-sockinfo_tcp::sockinfo_tcp(int fd) throw (vma_exception) :
|
||||
+sockinfo_tcp::sockinfo_tcp(int fd) :
|
||||
sockinfo(fd),
|
||||
m_timer_handle(NULL),
|
||||
m_timer_pending(false)
|
||||
@@ -2923,7 +2923,7 @@ bad_state:
|
||||
#define TCP_INFO 11 /* Information about this connection. */
|
||||
#define TCP_QUICKACK 12 /* Bock/reenable quick ACKs. */
|
||||
|
||||
-int sockinfo_tcp::fcntl(int __cmd, unsigned long int __arg) throw (vma_error)
|
||||
+int sockinfo_tcp::fcntl(int __cmd, unsigned long int __arg)
|
||||
{
|
||||
if (!mce_sys.avoid_sys_calls_on_tcp_fd || !is_connected())
|
||||
return sockinfo::fcntl(__cmd, __arg);
|
||||
@@ -2954,7 +2954,7 @@ int sockinfo_tcp::fcntl(int __cmd, unsig
|
||||
return sockinfo::fcntl(__cmd, __arg);
|
||||
}
|
||||
|
||||
-int sockinfo_tcp::ioctl(unsigned long int __request, unsigned long int __arg) throw (vma_error)
|
||||
+int sockinfo_tcp::ioctl(unsigned long int __request, unsigned long int __arg)
|
||||
{
|
||||
if (!mce_sys.avoid_sys_calls_on_tcp_fd || !is_connected())
|
||||
return sockinfo::ioctl(__request, __arg);
|
||||
@@ -3040,7 +3040,7 @@ bool sockinfo_tcp::try_un_offloading() /
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#define SOCKOPT_HANDLE_BY_OS -2
|
||||
int sockinfo_tcp::setsockopt(int __level, int __optname,
|
||||
- __const void *__optval, socklen_t __optlen) throw (vma_error)
|
||||
+ __const void *__optval, socklen_t __optlen)
|
||||
{
|
||||
//todo check optlen and set proper errno on failure
|
||||
|
||||
@@ -3297,7 +3297,7 @@ int sockinfo_tcp::getsockopt_offload(int
|
||||
}
|
||||
|
||||
int sockinfo_tcp::getsockopt(int __level, int __optname, void *__optval,
|
||||
- socklen_t *__optlen) throw (vma_error)
|
||||
+ socklen_t *__optlen)
|
||||
{
|
||||
int ret = getsockopt_offload(__level, __optname, __optval, __optlen);
|
||||
if (ret != SOCKOPT_HANDLE_BY_OS)
|
||||
diff -up libvma-8.0.1/src/vma/sock/sockinfo_tcp.h.me libvma-8.0.1/src/vma/sock/sockinfo_tcp.h
|
||||
--- libvma-8.0.1/src/vma/sock/sockinfo_tcp.h.me 2018-02-05 18:30:44.283370969 +0100
|
||||
+++ libvma-8.0.1/src/vma/sock/sockinfo_tcp.h 2018-02-05 18:31:16.207484436 +0100
|
||||
@@ -95,7 +95,7 @@ typedef std::map<peer_key, vma_desc_list
|
||||
class sockinfo_tcp : public sockinfo, public timer_handler
|
||||
{
|
||||
public:
|
||||
- sockinfo_tcp(int fd) throw (vma_exception);
|
||||
+ sockinfo_tcp(int fd);
|
||||
virtual ~sockinfo_tcp();
|
||||
|
||||
virtual void clean_obj();
|
||||
@@ -118,10 +118,10 @@ public:
|
||||
void create_dst_entry();
|
||||
bool prepare_dst_to_send(bool is_accepted_socket = false);
|
||||
|
||||
- virtual int fcntl(int __cmd, unsigned long int __arg) throw (vma_error);
|
||||
- virtual int ioctl(unsigned long int __request, unsigned long int __arg) throw (vma_error);
|
||||
- virtual int setsockopt(int __level, int __optname, const void *__optval, socklen_t __optlen) throw (vma_error);
|
||||
- virtual int getsockopt(int __level, int __optname, void *__optval, socklen_t *__optlen) throw (vma_error);
|
||||
+ virtual int fcntl(int __cmd, unsigned long int __arg);
|
||||
+ virtual int ioctl(unsigned long int __request, unsigned long int __arg);
|
||||
+ virtual int setsockopt(int __level, int __optname, const void *__optval, socklen_t __optlen);
|
||||
+ virtual int getsockopt(int __level, int __optname, void *__optval, socklen_t *__optlen);
|
||||
int getsockopt_offload(int __level, int __optname, void *__optval, socklen_t *__optlen);
|
||||
virtual int connect(const sockaddr*, socklen_t);
|
||||
virtual int bind(const sockaddr *__addr, socklen_t __addrlen);
|
||||
diff -up libvma-8.0.1/src/vma/sock/sockinfo_udp.cpp.me libvma-8.0.1/src/vma/sock/sockinfo_udp.cpp
|
||||
--- libvma-8.0.1/src/vma/sock/sockinfo_udp.cpp.me 2018-02-05 20:47:41.730845607 +0100
|
||||
+++ libvma-8.0.1/src/vma/sock/sockinfo_udp.cpp 2018-02-05 20:48:02.920913029 +0100
|
||||
@@ -363,7 +363,7 @@ const char * setsockopt_ip_opt_to_str(in
|
||||
// Throttle the amount of ring polling we do (remember last time we check for receive packets)
|
||||
tscval_t g_si_tscv_last_poll = 0;
|
||||
|
||||
-sockinfo_udp::sockinfo_udp(int fd) throw (vma_exception) :
|
||||
+sockinfo_udp::sockinfo_udp(int fd) :
|
||||
sockinfo(fd)
|
||||
,m_mc_tx_if(INADDR_ANY)
|
||||
,m_b_mc_tx_loop(mce_sys.tx_mc_loopback_default) // default value is 'true'. User can change this with config parameter SYS_VAR_TX_MC_LOOPBACK
|
||||
@@ -694,7 +694,7 @@ int sockinfo_udp::on_sockname_change(str
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
-int sockinfo_udp::setsockopt(int __level, int __optname, __const void *__optval, socklen_t __optlen) throw (vma_error)
|
||||
+int sockinfo_udp::setsockopt(int __level, int __optname, __const void *__optval, socklen_t __optlen)
|
||||
{
|
||||
si_udp_logfunc("level=%d, optname=%d", __level, __optname);
|
||||
|
||||
@@ -1090,7 +1090,7 @@ int sockinfo_udp::setsockopt(int __level
|
||||
return orig_os_api.setsockopt(m_fd, __level, __optname, __optval, __optlen);
|
||||
}
|
||||
|
||||
-int sockinfo_udp::getsockopt(int __level, int __optname, void *__optval, socklen_t *__optlen) throw (vma_error)
|
||||
+int sockinfo_udp::getsockopt(int __level, int __optname, void *__optval, socklen_t *__optlen)
|
||||
{
|
||||
si_udp_logfunc("level=%d, optname=%d", __level, __optname);
|
||||
|
||||
diff -up libvma-8.0.1/src/vma/sock/sockinfo_udp.h.me libvma-8.0.1/src/vma/sock/sockinfo_udp.h
|
||||
--- libvma-8.0.1/src/vma/sock/sockinfo_udp.h.me 2018-02-05 20:47:05.955731778 +0100
|
||||
+++ libvma-8.0.1/src/vma/sock/sockinfo_udp.h 2018-02-05 20:47:22.191783438 +0100
|
||||
@@ -92,7 +92,7 @@ struct cmsg_state
|
||||
class sockinfo_udp : public sockinfo
|
||||
{
|
||||
public:
|
||||
- sockinfo_udp(int fd) throw (vma_exception);
|
||||
+ sockinfo_udp(int fd);
|
||||
virtual ~sockinfo_udp();
|
||||
|
||||
void setPassthrough() { m_p_socket_stats->b_is_offloaded = m_sock_offload = false;}
|
||||
@@ -103,8 +103,8 @@ public:
|
||||
int bind(const struct sockaddr *__addr, socklen_t __addrlen);
|
||||
int connect(const struct sockaddr *__to, socklen_t __tolen);
|
||||
int getsockname(struct sockaddr *__name, socklen_t *__namelen);
|
||||
- int setsockopt(int __level, int __optname, const void *__optval, socklen_t __optlen) throw (vma_error);
|
||||
- int getsockopt(int __level, int __optname, void *__optval, socklen_t *__optlen) throw (vma_error);
|
||||
+ int setsockopt(int __level, int __optname, const void *__optval, socklen_t __optlen);
|
||||
+ int getsockopt(int __level, int __optname, void *__optval, socklen_t *__optlen);
|
||||
|
||||
/**
|
||||
* Sampling the OS immediately by matching the rx_skip_os counter (m_rx_udp_poll_os_ratio_counter) to the limit (mce_sys.rx_udp_poll_os_ratio)
|
||||
diff -up libvma-8.0.1/src/vma/sock/sock-redirect.cpp.me libvma-8.0.1/src/vma/sock/sock-redirect.cpp
|
||||
--- libvma-8.0.1/src/vma/sock/sock-redirect.cpp.me 2018-02-05 20:50:44.442426951 +0100
|
||||
+++ libvma-8.0.1/src/vma/sock/sock-redirect.cpp 2018-02-05 20:51:04.640491219 +0100
|
||||
@@ -623,7 +623,7 @@ int connect(int __fd, const struct socka
|
||||
Returns 0 on success, -1 for errors. */
|
||||
extern "C"
|
||||
int setsockopt(int __fd, int __level, int __optname,
|
||||
- __const void *__optval, socklen_t __optlen) throw (vma_error)
|
||||
+ __const void *__optval, socklen_t __optlen)
|
||||
{
|
||||
BULLSEYE_EXCLUDE_BLOCK_START
|
||||
if (!orig_os_api.setsockopt) get_orig_funcs();
|
||||
@@ -659,7 +659,7 @@ int setsockopt(int __fd, int __level, in
|
||||
Returns 0 on success, -1 for errors. */
|
||||
extern "C"
|
||||
int getsockopt(int __fd, int __level, int __optname,
|
||||
- void *__optval, socklen_t *__optlen) throw (vma_error)
|
||||
+ void *__optval, socklen_t *__optlen)
|
||||
{
|
||||
BULLSEYE_EXCLUDE_BLOCK_START
|
||||
if (!orig_os_api.getsockopt) get_orig_funcs();
|
||||
@@ -706,7 +706,7 @@ int getsockopt(int __fd, int __level, in
|
||||
accordingly (see README.txt)
|
||||
*/
|
||||
extern "C"
|
||||
-int fcntl(int __fd, int __cmd, ...) throw (vma_error)
|
||||
+int fcntl(int __fd, int __cmd, ...)
|
||||
{
|
||||
BULLSEYE_EXCLUDE_BLOCK_START
|
||||
if (!orig_os_api.fcntl) get_orig_funcs();
|
||||
@@ -743,7 +743,7 @@ int fcntl(int __fd, int __cmd, ...) thro
|
||||
One argument may follow; its presence and type depend on REQUEST.
|
||||
Return value depends on REQUEST. Usually -1 indicates error. */
|
||||
extern "C"
|
||||
-int ioctl (int __fd, unsigned long int __request, ...) throw (vma_error)
|
||||
+int ioctl (int __fd, unsigned long int __request, ...)
|
||||
{
|
||||
BULLSEYE_EXCLUDE_BLOCK_START
|
||||
if (!orig_os_api.fcntl) get_orig_funcs();
|
||||
diff -up libvma-8.0.1/src/stats/stats_reader.cpp.me libvma-8.0.1/src/stats/stats_reader.cpp
|
||||
--- libvma-8.0.1/src/stats/stats_reader.cpp.me 2018-02-05 21:25:40.793097034 +0100
|
||||
+++ libvma-8.0.1/src/stats/stats_reader.cpp 2018-02-05 21:28:30.415637551 +0100
|
||||
@@ -1525,7 +1525,7 @@ int init_print_process_stats(sh_mem_inf
|
||||
sh_mem_t* sh_mem;
|
||||
int pid = sh_mem_info.pid;
|
||||
|
||||
- sprintf(sh_mem_info.filename_sh_stats, "%s/vmastat.%d", g_vma_shmem_dir, pid);
|
||||
+ snprintf(sh_mem_info.filename_sh_stats, sizeof(sh_mem_info.filename_sh_stats), "%s/vmastat.%d", g_vma_shmem_dir, pid);
|
||||
|
||||
if (user_params.write_auth)
|
||||
sh_mem_info.fd_sh_stats = open(sh_mem_info.filename_sh_stats,O_RDWR, S_IRWXU|S_IROTH);
|
@ -1,189 +0,0 @@
|
||||
diff -up libvma-8.0.1/src/stats/stats_publisher.cpp.me libvma-8.0.1/src/stats/stats_publisher.cpp
|
||||
--- libvma-8.0.1/src/stats/stats_publisher.cpp.me 2018-02-06 17:39:15.618093186 +0100
|
||||
+++ libvma-8.0.1/src/stats/stats_publisher.cpp 2018-02-06 17:39:54.488171577 +0100
|
||||
@@ -268,7 +268,7 @@ shmem_error:
|
||||
g_sh_mem_info.fd_sh_stats = -1;
|
||||
g_sh_mem_info.p_sh_stats = MAP_FAILED;
|
||||
g_sh_mem = &g_local_sh_mem;
|
||||
- memset(g_sh_mem, 0, sizeof(*g_sh_mem));
|
||||
+ memset(static_cast<void*>(g_sh_mem), 0, sizeof(*g_sh_mem));
|
||||
*p_p_vma_log_level = &g_sh_mem->log_level;
|
||||
*p_p_vma_log_details = &g_sh_mem->log_details_level;
|
||||
BULLSEYE_EXCLUDE_BLOCK_END
|
||||
@@ -332,7 +332,7 @@ void vma_stats_instance_create_socket_bl
|
||||
|
||||
out:
|
||||
if (p_skt_stats) {
|
||||
- memset(p_skt_stats, 0, sizeof(*p_skt_stats));
|
||||
+ memset(static_cast<void*>(p_skt_stats), 0, sizeof(*p_skt_stats));
|
||||
p_skt_stats->mc_grp_map.reset();
|
||||
g_p_stats_data_reader->add_data_reader(local_stats_addr, p_skt_stats, sizeof(socket_stats_t));
|
||||
}
|
||||
diff -up libvma-8.0.1/src/stats/stats_reader.cpp.me libvma-8.0.1/src/stats/stats_reader.cpp
|
||||
--- libvma-8.0.1/src/stats/stats_reader.cpp.me 2018-02-06 15:59:12.754199479 +0100
|
||||
+++ libvma-8.0.1/src/stats/stats_reader.cpp 2018-02-06 16:39:38.406905488 +0100
|
||||
@@ -1525,8 +1525,10 @@ int init_print_process_stats(sh_mem_inf
|
||||
sh_mem_t* sh_mem;
|
||||
int pid = sh_mem_info.pid;
|
||||
|
||||
- snprintf(sh_mem_info.filename_sh_stats, sizeof(sh_mem_info.filename_sh_stats), "%s/vmastat.%d", g_vma_shmem_dir, pid);
|
||||
-
|
||||
+ //snprintf(sh_mem_info.filename_sh_stats, sizeof(sh_mem_info.filename_sh_stats), "%s/vmastat.%d", g_vma_shmem_dir, pid);
|
||||
+ const char ib_path_format[] = "%s/vmastat.%d";
|
||||
+ snprintf(sh_mem_info.filename_sh_stats, sizeof(sh_mem_info.filename_sh_stats), ib_path_format, g_vma_shmem_dir, pid);
|
||||
+
|
||||
if (user_params.write_auth)
|
||||
sh_mem_info.fd_sh_stats = open(sh_mem_info.filename_sh_stats,O_RDWR, S_IRWXU|S_IROTH);
|
||||
else
|
||||
diff -up libvma-8.0.1/src/vma/dev/buffer_pool.cpp.me libvma-8.0.1/src/vma/dev/buffer_pool.cpp
|
||||
--- libvma-8.0.1/src/vma/dev/buffer_pool.cpp.me 2018-02-06 17:18:48.792336254 +0100
|
||||
+++ libvma-8.0.1/src/vma/dev/buffer_pool.cpp 2018-02-06 17:18:25.927276800 +0100
|
||||
@@ -166,7 +166,7 @@ buffer_pool::buffer_pool(size_t buffer_c
|
||||
for (size_t i = 0; i < buffer_count; ++i) {
|
||||
|
||||
mem_buf_desc_t* ptr_desc_mbdt = (mem_buf_desc_t*)ptr_desc;
|
||||
- memset(ptr_desc_mbdt, 0, sizeof (*ptr_desc_mbdt));
|
||||
+ memset(static_cast<void*>(ptr_desc_mbdt), 0, sizeof (*ptr_desc_mbdt));
|
||||
mem_buf_desc_t *desc = new (ptr_desc) mem_buf_desc_t(ptr_buff, buf_size);
|
||||
desc->serial_num = i;
|
||||
desc->p_desc_owner = owner;
|
||||
diff -up libvma-8.0.1/src/vma/infra/subject_observer.cpp.me libvma-8.0.1/src/vma/infra/subject_observer.cpp
|
||||
--- libvma-8.0.1/src/vma/infra/subject_observer.cpp.me 2018-02-06 17:38:01.739951162 +0100
|
||||
+++ libvma-8.0.1/src/vma/infra/subject_observer.cpp 2018-02-06 17:38:43.712031849 +0100
|
||||
@@ -52,11 +52,11 @@ bool subject::register_observer(IN const
|
||||
}
|
||||
|
||||
auto_unlocker lock(m_lock);
|
||||
- if (m_observers.count((observer * const)new_observer) > 0) {
|
||||
+ if (m_observers.count((observer *)new_observer) > 0) {
|
||||
// sub_obs_logdbg("[%s] Observer is already registered (%p)", to_str(), new_observer);
|
||||
return false;
|
||||
}
|
||||
- m_observers.insert((observer * const)new_observer);
|
||||
+ m_observers.insert((observer *)new_observer);
|
||||
// sub_obs_logdbg("[%s] Successfully registered new_observer %s", to_str(), new_observer->to_str());
|
||||
return true;
|
||||
}
|
||||
@@ -69,7 +69,7 @@ bool subject::unregister_observer(IN con
|
||||
}
|
||||
|
||||
auto_unlocker lock(m_lock);
|
||||
- m_observers.erase((observer * const)old_observer);
|
||||
+ m_observers.erase((observer *)old_observer);
|
||||
// sub_obs_logdbg("[%s] Successfully unregistered old_observer %s",to_str(), old_observer->to_str());
|
||||
return true;
|
||||
}
|
||||
diff -up libvma-8.0.1/src/vma/proto/L2_address.h.me libvma-8.0.1/src/vma/proto/L2_address.h
|
||||
--- libvma-8.0.1/src/vma/proto/L2_address.h.me 2018-02-06 16:40:59.152129368 +0100
|
||||
+++ libvma-8.0.1/src/vma/proto/L2_address.h 2018-02-06 16:49:34.787559057 +0100
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
void set(address_t const address, addrlen_t const len);
|
||||
|
||||
addrlen_t get_addrlen() const { return m_len; };
|
||||
- address_t get_address() const { return (const address_t)m_p_raw_address; };
|
||||
+ address_t get_address() const { return (address_t) m_p_raw_address; };
|
||||
|
||||
virtual bool compare(L2_address const& other) const;
|
||||
|
||||
diff -up libvma-8.0.1/src/vma/proto/mem_buf_desc.h.me libvma-8.0.1/src/vma/proto/mem_buf_desc.h
|
||||
diff -up libvma-8.0.1/src/vma/proto/route_rule_table_key.h.me libvma-8.0.1/src/vma/proto/route_rule_table_key.h
|
||||
--- libvma-8.0.1/src/vma/proto/route_rule_table_key.h.me 2018-02-06 17:17:44.241168404 +0100
|
||||
+++ libvma-8.0.1/src/vma/proto/route_rule_table_key.h 2018-02-06 17:34:50.072582707 +0100
|
||||
@@ -36,6 +36,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
+#include <cstring>
|
||||
|
||||
#include "vma/util/to_str.h"
|
||||
#include "vma/util/vtypes.h"
|
||||
@@ -53,13 +54,18 @@ public:
|
||||
|
||||
const std::string to_str() const
|
||||
{
|
||||
- char s[100];
|
||||
+ char s[100] = {0};
|
||||
sprintf(s, "Destination IP:%d.%d.%d.%d", NIPQUAD(m_dst_ip));
|
||||
- if (m_src_ip)
|
||||
- sprintf(s, "%s Source IP:%d.%d.%d.%d", s, NIPQUAD(m_src_ip));
|
||||
- if (m_tos)
|
||||
- sprintf(s, "%s TOS:%u", s, m_tos);
|
||||
-
|
||||
+ if (m_src_ip) {
|
||||
+ char sx[40] = {0};
|
||||
+ sprintf(sx, " Source IP:%d.%d.%d.%d", NIPQUAD(m_src_ip));
|
||||
+ strcat(s, sx);
|
||||
+ }
|
||||
+ if (m_tos) {
|
||||
+ char sx[20] = {0};
|
||||
+ sprintf(sx, " TOS:%u", m_tos);
|
||||
+ strcat(s, sx);
|
||||
+ }
|
||||
return(std::string(s));
|
||||
}
|
||||
|
||||
@@ -85,16 +91,22 @@ public:
|
||||
size_t operator()(const route_rule_table_key &key) const
|
||||
{
|
||||
hash<string>_hash;
|
||||
- char s[40];
|
||||
+ char s[40] = {0};
|
||||
/*
|
||||
Build string from exist parameter (destination IP, source IP, TOS)
|
||||
which is unique for different route-rule entries.
|
||||
*/
|
||||
sprintf(s, "%d.%d.%d.%d", NIPQUAD(key.get_dst_ip()));
|
||||
- if (key.get_src_ip())
|
||||
- sprintf(s, "%s %d.%d.%d.%d", s, NIPQUAD(key.get_src_ip()));
|
||||
- if (key.get_tos())
|
||||
- sprintf(s, "%s %u", s, key.get_tos());
|
||||
+ if (key.get_src_ip()) {
|
||||
+ char sx[20] = {0};
|
||||
+ sprintf(sx, " %d.%d.%d.%d", NIPQUAD(key.get_src_ip()));
|
||||
+ strcat(s, sx);
|
||||
+ }
|
||||
+ if (key.get_tos()) {
|
||||
+ char sx[20] = {0};
|
||||
+ sprintf(sx, " %u", key.get_tos());
|
||||
+ strcat(s, sx);
|
||||
+ }
|
||||
return _hash(std::string(s));// Use built in hash function for string input.
|
||||
}
|
||||
};
|
||||
diff -up libvma-8.0.1/src/vma/sock/pipeinfo.cpp.me libvma-8.0.1/src/vma/sock/pipeinfo.cpp
|
||||
--- libvma-8.0.1/src/vma/sock/pipeinfo.cpp.me 2018-02-06 17:36:50.905814995 +0100
|
||||
+++ libvma-8.0.1/src/vma/sock/pipeinfo.cpp 2018-02-06 17:37:33.543896959 +0100
|
||||
@@ -72,7 +72,7 @@ pipeinfo::pipeinfo(int fd) : socket_fd_a
|
||||
// pi_logdbg("Got NULL from mce_stats_instance_create_socket_block, using local member");
|
||||
m_p_socket_stats = &m_socket_stats;
|
||||
}
|
||||
- memset(m_p_socket_stats, 0, sizeof(*m_p_socket_stats));
|
||||
+ memset(static_cast<void*>(m_p_socket_stats), 0, sizeof(*m_p_socket_stats));
|
||||
m_p_socket_stats->fd = m_fd;
|
||||
m_p_socket_stats->b_blocking = m_b_blocking;
|
||||
m_p_socket_stats->n_rx_ready_pkt_count = 0;
|
||||
diff -up libvma-8.0.1/src/vma/sock/sockinfo.cpp.me libvma-8.0.1/src/vma/sock/sockinfo.cpp
|
||||
--- libvma-8.0.1/src/vma/sock/sockinfo.cpp.me 2018-02-06 17:35:47.210692547 +0100
|
||||
+++ libvma-8.0.1/src/vma/sock/sockinfo.cpp 2018-02-06 17:36:07.360731283 +0100
|
||||
@@ -85,7 +85,7 @@ sockinfo::sockinfo(int fd):
|
||||
|
||||
m_p_socket_stats = &m_socket_stats; // Save stats as local copy and allow state publisher to copy from this location
|
||||
vma_stats_instance_create_socket_block(m_p_socket_stats);
|
||||
- memset(m_p_socket_stats, 0, sizeof(*m_p_socket_stats));
|
||||
+ memset(static_cast<void*>(m_p_socket_stats), 0, sizeof(*m_p_socket_stats));
|
||||
m_p_socket_stats->fd = m_fd;
|
||||
m_p_socket_stats->inode = fd2inode(m_fd);
|
||||
m_p_socket_stats->b_blocking = m_b_blocking;
|
||||
diff -up libvma-8.0.1/src/vma/util/sys_vars.h.me libvma-8.0.1/src/vma/util/sys_vars.h
|
||||
diff -up libvma-8.0.1/src/vma/util/sock_addr.h.me libvma-8.0.1/src/vma/util/sock_addr.h
|
||||
--- libvma-8.0.1/src/vma/util/sock_addr.h.me 2018-02-07 04:14:27.942612450 -0500
|
||||
+++ libvma-8.0.1/src/vma/util/sock_addr.h 2018-02-07 04:25:37.714699564 -0500
|
||||
@@ -157,7 +157,7 @@ private:
|
||||
struct sockaddr_in* m_p_sa_in;
|
||||
|
||||
char m_str_in_addr[16];
|
||||
- char m_str_in_port[6];
|
||||
+ char m_str_in_port[11];
|
||||
char m_str[22];
|
||||
|
||||
void set_str_in_addr() { sprintf(m_str_in_addr, "%d.%d.%d.%d", NIPQUAD(get_in_addr())); set_str(); }
|
128
libvma.spec
128
libvma.spec
@ -1,128 +0,0 @@
|
||||
Name: libvma
|
||||
Version: 8.0.1
|
||||
Release: 8%{?dist}
|
||||
Summary: A library for boosting TCP and UDP traffic (over RDMA hardware)
|
||||
|
||||
License: GPLv2 or BSD
|
||||
Url: https://github.com/Mellanox/libvma
|
||||
Source: http://www.mellanox.com/downloads/Accelerator/%{name}-%{version}.tar.gz
|
||||
#arm is excluded since libvma fails to compile on arm.
|
||||
#Reason: libvma uses assembly commands that are not supported by arm.
|
||||
Patch0: libvma-8.0.1-gcc7.patch
|
||||
Patch1: libvma-8.0.1-gcc8.patch
|
||||
ExcludeArch: %{arm}
|
||||
Requires: pam
|
||||
# rdma-core doesn't not exist on s390x. need to check later
|
||||
# disable it temporary
|
||||
ExcludeArch: s390x
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: rdma-core-devel libnl3-devel
|
||||
BuildRequires: automake autoconf libtool
|
||||
|
||||
%description
|
||||
libvma is a LD_PRELOAD-able library that boosts performance
|
||||
of TCP and UDP traffic.
|
||||
It allows application written over standard socket API to handle
|
||||
fast path data traffic from user space over Ethernet and/or
|
||||
Infiniband with full network stack bypass and get better throughput,
|
||||
latency and packets/sec rate.
|
||||
No application binary change is required for that.
|
||||
libvma is supported by RDMA capable devices that support
|
||||
"verbs" IBV_QPT_RAW_PACKET QP for Ethernet and/or IBV_QPT_UD QP for IPoIB.
|
||||
|
||||
%package devel
|
||||
Summary: Header files required to develop with libvma
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
Headers files required to develop with the libvma library.
|
||||
|
||||
%package utils
|
||||
Summary: Libvma utilities
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description utils
|
||||
Tools for collecting and analyzing libvma statistic.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .gcc7
|
||||
%patch1 -p1 -b .gcc8
|
||||
|
||||
%build
|
||||
./autogen.sh
|
||||
%configure
|
||||
make %{?_smp_mflags} V=1
|
||||
|
||||
%install
|
||||
%make_install
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%{_libdir}/%{name}*.so.*
|
||||
#libvma.so in needed in the main package so that
|
||||
#'LD_PRELOAD=libvma.so <command>' works.
|
||||
%{_libdir}/%{name}.so
|
||||
%license COPYING LICENSE
|
||||
%doc README.txt journal.txt VMA_VERSION
|
||||
%config(noreplace) %{_sysconfdir}/libvma.conf
|
||||
%config(noreplace) %{_sysconfdir}/security/limits.d/30-libvma-limits.conf
|
||||
|
||||
%files devel
|
||||
%{_includedir}/*
|
||||
|
||||
%files utils
|
||||
%{_bindir}/vma_stats
|
||||
|
||||
%changelog
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.1-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.1-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.1-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Mon Feb 05 2018 Than Ngo <than@redhat.com> - 8.0.1-5
|
||||
- fixed FTBS with gcc7/gcc8
|
||||
|
||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Sun Mar 13 2016 Alex Vainman <alexv@mellanox.com> - 8.0.1-1
|
||||
- New upstream release
|
||||
- Move to dual license: GPLv2 or BSD
|
||||
- ExcludeArch update
|
||||
- Removal of extra space in:
|
||||
config(noreplace) {_sysconfdir}/security/limits.d/30-libvma-limits.conf
|
||||
- Add V=1 to make
|
||||
|
||||
* Wed Mar 2 2016 Alex Vainman <alexv@mellanox.com> - 7.0.14-2
|
||||
- Added reasoning for archs exclusion
|
||||
- Package description improvement
|
||||
- Removal of the pre scriplet
|
||||
- Added COPYING and LICENSE files to the package
|
||||
|
||||
* Sun Feb 21 2016 Alex Vainman <alexv@mellanox.com> - 7.0.14-1
|
||||
- New upstream release
|
||||
- Removal of redundant macros and obsolete/unneeded tags
|
||||
- Added ExcludeArch, BuildRequires and Require sections
|
||||
- Fixes and cleanups in the build and installation sections
|
||||
- Install 30-libvma-limits.conf file under
|
||||
/etc/security/limits.d/
|
||||
- Fixes related to files/directories ownerships
|
||||
- Removal of vma_perf_envelope.sh from the utility package
|
||||
- Update Source tag URL
|
||||
- Fix most of the rpmlint warnings
|
||||
|
||||
* Mon Jan 4 2016 Avner BenHanoch <avnerb@mellanox.com> - 7.0.12-1
|
||||
- Initial Packaging
|
Loading…
Reference in New Issue
Block a user