|
@@ -35,6 +35,8 @@
|
|
|
|
|
|
|
|
#include <config.h>
|
|
#include <config.h>
|
|
|
|
|
|
|
|
|
|
+#include <assert.h>
|
|
|
|
|
+
|
|
|
#ifdef HAVE_RDMA
|
|
#ifdef HAVE_RDMA
|
|
|
#include <totemiba.h>
|
|
#include <totemiba.h>
|
|
|
#endif
|
|
#endif
|
|
@@ -67,6 +69,10 @@ struct transport {
|
|
|
void (*target_set_completed) (
|
|
void (*target_set_completed) (
|
|
|
void *context));
|
|
void *context));
|
|
|
|
|
|
|
|
|
|
+ void *(*buffer_alloc) (void);
|
|
|
|
|
+
|
|
|
|
|
+ void (*buffer_release) (void *ptr);
|
|
|
|
|
+
|
|
|
int (*processor_count_set) (
|
|
int (*processor_count_set) (
|
|
|
void *transport_context,
|
|
void *transport_context,
|
|
|
int processor_count);
|
|
int processor_count);
|
|
@@ -127,6 +133,8 @@ struct transport transport_entries[] = {
|
|
|
{
|
|
{
|
|
|
.name = "UDP/IP Multicast",
|
|
.name = "UDP/IP Multicast",
|
|
|
.initialize = totemudp_initialize,
|
|
.initialize = totemudp_initialize,
|
|
|
|
|
+ .buffer_alloc = totemudp_buffer_alloc,
|
|
|
|
|
+ .buffer_release = totemudp_buffer_release,
|
|
|
.processor_count_set = totemudp_processor_count_set,
|
|
.processor_count_set = totemudp_processor_count_set,
|
|
|
.token_send = totemudp_token_send,
|
|
.token_send = totemudp_token_send,
|
|
|
.mcast_flush_send = totemudp_mcast_flush_send,
|
|
.mcast_flush_send = totemudp_mcast_flush_send,
|
|
@@ -145,6 +153,8 @@ struct transport transport_entries[] = {
|
|
|
{
|
|
{
|
|
|
.name = "UDP/IP Unicast",
|
|
.name = "UDP/IP Unicast",
|
|
|
.initialize = totemudpu_initialize,
|
|
.initialize = totemudpu_initialize,
|
|
|
|
|
+ .buffer_alloc = totemudpu_buffer_alloc,
|
|
|
|
|
+ .buffer_release = totemudpu_buffer_release,
|
|
|
.processor_count_set = totemudpu_processor_count_set,
|
|
.processor_count_set = totemudpu_processor_count_set,
|
|
|
.token_send = totemudpu_token_send,
|
|
.token_send = totemudpu_token_send,
|
|
|
.mcast_flush_send = totemudpu_mcast_flush_send,
|
|
.mcast_flush_send = totemudpu_mcast_flush_send,
|
|
@@ -166,6 +176,8 @@ struct transport transport_entries[] = {
|
|
|
{
|
|
{
|
|
|
.name = "Infiniband/IP",
|
|
.name = "Infiniband/IP",
|
|
|
.initialize = totemiba_initialize,
|
|
.initialize = totemiba_initialize,
|
|
|
|
|
+ .buffer_alloc = totemiba_buffer_alloc,
|
|
|
|
|
+ .buffer_release = totemiba_buffer_release,
|
|
|
.processor_count_set = totemiba_processor_count_set,
|
|
.processor_count_set = totemiba_processor_count_set,
|
|
|
.token_send = totemiba_token_send,
|
|
.token_send = totemiba_token_send,
|
|
|
.mcast_flush_send = totemiba_mcast_flush_send,
|
|
.mcast_flush_send = totemiba_mcast_flush_send,
|
|
@@ -296,6 +308,22 @@ error_destroy:
|
|
|
return (-1);
|
|
return (-1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void *totemnet_buffer_alloc (void *net_context)
|
|
|
|
|
+{
|
|
|
|
|
+ struct totemnet_instance *instance = net_context;
|
|
|
|
|
+ assert (instance != NULL);
|
|
|
|
|
+ assert (instance->transport != NULL);
|
|
|
|
|
+ return instance->transport->buffer_alloc();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void totemnet_buffer_release (void *net_context, void *ptr)
|
|
|
|
|
+{
|
|
|
|
|
+ struct totemnet_instance *instance = net_context;
|
|
|
|
|
+ assert (instance != NULL);
|
|
|
|
|
+ assert (instance->transport != NULL);
|
|
|
|
|
+ instance->transport->buffer_release (ptr);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
int totemnet_processor_count_set (
|
|
int totemnet_processor_count_set (
|
|
|
void *net_context,
|
|
void *net_context,
|
|
|
int processor_count)
|
|
int processor_count)
|