usnic: remove unnecessary header union
Realistically, the usnic BTL doesn't need to know anything about the underlying transport except for its header length (so that it knows where the payload begins in a received buffer). So remove the use of the specific transport prefix union and just rely on the usnic verbs extension to tell us what the header length is if we're using the usNIC/UDP transport, or sizeof(struct ibv_grh) if we're using usNIC/L2 transport. This commit was SVN r30914.
Этот коммит содержится в:
родитель
05af83d5d8
Коммит
6710c2ef3f
@ -97,18 +97,6 @@ typedef struct ompi_btl_usnic_reg_t {
|
||||
/* UDP headers are always 42 bytes long */
|
||||
#define OMPI_BTL_USNIC_UDP_HDR_SZ (42)
|
||||
|
||||
/*
|
||||
* Header that is the beginning of every usnic packet buffer.
|
||||
*/
|
||||
typedef union {
|
||||
/* Verbs UD global resource header (GRH), which appears on the receiving
|
||||
* side only. Valid iff mca_btl_usnic_component.use_udp is false. */
|
||||
struct ibv_grh grh;
|
||||
|
||||
/* Valid iff mca_btl_usnic_component.use_udp is true. */
|
||||
char udp_bytes[OMPI_BTL_USNIC_UDP_HDR_SZ];
|
||||
} __attribute__((__packed__)) ompi_btl_usnic_protocol_header_t;
|
||||
|
||||
#define OMPI_BTL_USNIC_PROTO_HDR_SZ \
|
||||
(mca_btl_usnic_component.use_udp ? \
|
||||
OMPI_BTL_USNIC_UDP_HDR_SZ : \
|
||||
@ -204,7 +192,7 @@ typedef struct ompi_btl_usnic_recv_segment_t {
|
||||
mca_btl_base_segment_t rs_segment;
|
||||
|
||||
/* receive segments have protocol header prepended */
|
||||
ompi_btl_usnic_protocol_header_t *rs_protocol_header;
|
||||
uint8_t *rs_protocol_header;
|
||||
|
||||
ompi_btl_usnic_endpoint_t *rs_endpoint;
|
||||
|
||||
|
@ -73,19 +73,6 @@ void ompi_btl_usnic_recv_call(ompi_btl_usnic_module_t *module,
|
||||
opal_memchecker_base_mem_defined((void*)(seg->rs_recv_desc.sg_list[0].addr),
|
||||
seg->rs_recv_desc.sg_list[0].length);
|
||||
|
||||
#if MSGDEBUG1
|
||||
memset(src_mac, 0, sizeof(src_mac));
|
||||
memset(dest_mac, 0, sizeof(dest_mac));
|
||||
ompi_btl_usnic_sprintf_gid_mac(src_mac,
|
||||
&seg->rs_protocol_header->grh.sgid);
|
||||
ompi_btl_usnic_sprintf_gid_mac(dest_mac,
|
||||
&seg->rs_protocol_header->grh.dgid);
|
||||
|
||||
opal_output(0, "Got message from MAC %s", src_mac);
|
||||
opal_output(0, "Looking for sender: 0x%016lx",
|
||||
bseg->us_btl_header->sender);
|
||||
#endif
|
||||
|
||||
/* Find out who sent this segment */
|
||||
endpoint = seg->rs_endpoint;
|
||||
if (FAKE_RECV_FRAG_DROP || OPAL_UNLIKELY(NULL == endpoint)) {
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user