Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Enumerations | Functions
multicast.c File Reference
#include <linux/completion.h>
#include <linux/dma-mapping.h>
#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/bitops.h>
#include <linux/random.h>
#include <rdma/ib_cache.h>
#include "sa.h"

Go to the source code of this file.

Data Structures

struct  mcast_port
 
struct  mcast_device
 
struct  mcast_group
 
struct  mcast_member
 

Enumerations

enum  mcast_state {
  MCAST_JOINING, MCAST_MEMBER, MCAST_ERROR, MCAST_NOT_MEMBER = 0,
  MCAST_MEMBER
}
 
enum  mcast_group_state {
  MCAST_IDLE, MCAST_BUSY, MCAST_GROUP_ERROR, MCAST_PKEY_EVENT,
  MCAST_IDLE, MCAST_JOIN_SENT, MCAST_LEAVE_SENT, MCAST_RESP_READY
}
 
enum  { MCAST_INVALID_PKEY_INDEX = 0xFFFF }
 

Functions

struct ib_sa_multicastib_sa_join_multicast (struct ib_sa_client *client, struct ib_device *device, u8 port_num, struct ib_sa_mcmember_rec *rec, ib_sa_comp_mask comp_mask, gfp_t gfp_mask, int(*callback)(int status, struct ib_sa_multicast *multicast), void *context)
 
 EXPORT_SYMBOL (ib_sa_join_multicast)
 
void ib_sa_free_multicast (struct ib_sa_multicast *multicast)
 
 EXPORT_SYMBOL (ib_sa_free_multicast)
 
int ib_sa_get_mcmember_rec (struct ib_device *device, u8 port_num, union ib_gid *mgid, struct ib_sa_mcmember_rec *rec)
 
 EXPORT_SYMBOL (ib_sa_get_mcmember_rec)
 
int ib_init_ah_from_mcmember (struct ib_device *device, u8 port_num, struct ib_sa_mcmember_rec *rec, struct ib_ah_attr *ah_attr)
 
 EXPORT_SYMBOL (ib_init_ah_from_mcmember)
 
int mcast_init (void)
 
void mcast_cleanup (void)
 

Enumeration Type Documentation

anonymous enum
Enumerator:
MCAST_INVALID_PKEY_INDEX 

Definition at line 90 of file multicast.c.

Enumerator:
MCAST_IDLE 
MCAST_BUSY 
MCAST_GROUP_ERROR 
MCAST_PKEY_EVENT 
MCAST_IDLE 
MCAST_JOIN_SENT 
MCAST_LEAVE_SENT 
MCAST_RESP_READY 

Definition at line 83 of file multicast.c.

Enumerator:
MCAST_JOINING 
MCAST_MEMBER 
MCAST_ERROR 
MCAST_NOT_MEMBER 
MCAST_MEMBER 

Definition at line 77 of file multicast.c.

Function Documentation

EXPORT_SYMBOL ( ib_sa_join_multicast  )
EXPORT_SYMBOL ( ib_sa_free_multicast  )
EXPORT_SYMBOL ( ib_sa_get_mcmember_rec  )
EXPORT_SYMBOL ( ib_init_ah_from_mcmember  )
int ib_init_ah_from_mcmember ( struct ib_device device,
u8  port_num,
struct ib_sa_mcmember_rec rec,
struct ib_ah_attr ah_attr 
)

ib_init_ah_from_mcmember - Initialize address handle attributes based on an SA multicast member record.

Definition at line 719 of file multicast.c.

void ib_sa_free_multicast ( struct ib_sa_multicast multicast)

ib_free_multicast - Frees the multicast tracking structure, and releases any reference on the multicast group. : Multicast tracking structure allocated by ib_join_multicast.

This call blocks until the multicast identifier is destroyed. It may not be called from within the multicast callback; however, returning a non- zero value from the callback will result in destroying the multicast tracking structure.

Definition at line 662 of file multicast.c.

int ib_sa_get_mcmember_rec ( struct ib_device device,
u8  port_num,
union ib_gid mgid,
struct ib_sa_mcmember_rec rec 
)

ib_get_mcmember_rec - Looks up a multicast member record by its MGID and returns it if found. : Device associated with the multicast group. : Port on the specified device to associate with the multicast group. : MGID of multicast group. : Location to copy SA multicast member record.

Definition at line 693 of file multicast.c.

struct ib_sa_multicast* ib_sa_join_multicast ( struct ib_sa_client client,
struct ib_device device,
u8  port_num,
struct ib_sa_mcmember_rec rec,
ib_sa_comp_mask  comp_mask,
gfp_t  gfp_mask,
int(*)(int status, struct ib_sa_multicast *multicast)  callback,
void context 
)
read

ib_sa_join_multicast - Initiates a join request to the specified multicast group. : SA client : Device associated with the multicast group. : Port on the specified device to associate with the multicast group. : SA multicast member record specifying group attributes. : Component mask indicating which group attributes of rec are valid. : GFP mask for memory allocations. : User callback invoked once the join operation completes. : User specified context stored with the ib_sa_multicast structure.

This call initiates a multicast join request with the SA for the specified multicast group. If the join operation is started successfully, it returns an ib_sa_multicast structure that is used to track the multicast operation. Users must free this structure by calling ib_free_multicast, even if the join operation later fails. (The callback status is non-zero.)

If the join operation fails; status will be non-zero, with the following failures possible: -ETIMEDOUT: The request timed out. -EIO: An error occurred sending the query. -EINVAL: The MCMemberRecord values differed from the existing group's. -ENETRESET: Indicates that an fatal error has occurred on the multicast group, and the user must rejoin the group to continue using it.

Definition at line 607 of file multicast.c.

void mcast_cleanup ( void  )

Definition at line 893 of file multicast.c.

int mcast_init ( void  )

Definition at line 872 of file multicast.c.