RDMA/cma: Add ability to specify type of service

Provide support to specify a type of service for a communication
identifier.  A new function call is used when dealing with IPv4
addresses.  For IPv6 addresses, the ToS is specified through the
traffic class field in the sockaddr_in6 structure.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>

[ The comments Eitan Zahavi and myself have made over the v1 post at 
  <http://lists.openfabrics.org/pipermail/general/2007-August/039247.html>
  were fully addressed. ]
 
Reviewed-by: Or Gerlitz <ogerlitz@voltaire.com> 
Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
Sean Hefty
2007-08-08 15:51:06 -07:00
committed by Roland Dreier
parent 733d65fe33
commit a81c994d5e
2 changed files with 48 additions and 10 deletions

View File

@@ -314,4 +314,18 @@ int rdma_join_multicast(struct rdma_cm_id *id, struct sockaddr *addr,
*/
void rdma_leave_multicast(struct rdma_cm_id *id, struct sockaddr *addr);
/**
* rdma_set_service_type - Set the type of service associated with a
* connection identifier.
* @id: Communication identifier to associated with service type.
* @tos: Type of service.
*
* The type of service is interpretted as a differentiated service
* field (RFC 2474). The service type should be specified before
* performing route resolution, as existing communication on the
* connection identifier may be unaffected. The type of service
* requested may not be supported by the network to all destinations.
*/
void rdma_set_service_type(struct rdma_cm_id *id, int tos);
#endif /* RDMA_CM_H */