d55334dfa6
This reverts commit a508852970
.
Unretirement request: https://pagure.io/releng/issue/9509
Signed-off-by: Tomas Hrcka <thrcka@redhat.com>
637 lines
34 KiB
Diff
637 lines
34 KiB
Diff
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);
|