Skip to content

Commit 585c6c6

Browse files
issue: 4656811 Removing IPoIB support
Removing IPoIB data and control pathes. IPoIB is not supported any more due to restrictions in the mlx5 driver. Signed-off-by: Alexander Grissik <[email protected]>
1 parent 0dc96e0 commit 585c6c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+175
-2821
lines changed

config/m4/verbs.m4

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ CHECK_VERBS_ATTRIBUTE([IBV_QPT_RAW_PACKET], [infiniband/verbs.h])
128128
CHECK_VERBS_ATTRIBUTE([IBV_WC_WITH_VLAN], [infiniband/verbs.h])
129129
CHECK_VERBS_ATTRIBUTE([IBV_ACCESS_ALLOCATE_MR], [infiniband/verbs.h])
130130
CHECK_VERBS_ATTRIBUTE([IBV_QP_CREATE_SOURCE_QPN], [infiniband/verbs.h], [IBV_QP_INIT_SOURCE_QPN])
131-
CHECK_VERBS_ATTRIBUTE([IBV_FLOW_SPEC_IB], [infiniband/verbs.h], [IBV_FLOW_SPEC_IB])
132131
CHECK_VERBS_ATTRIBUTE([IBV_DEVICE_RAW_IP_CSUM], [infiniband/verbs.h])
133132
CHECK_VERBS_ATTRIBUTE([IBV_SEND_IP_CSUM], [infiniband/verbs.h])
134133
CHECK_VERBS_ATTRIBUTE([IBV_FLOW_SPEC_ACTION_TAG], [infiniband/verbs.h], [IBV_FLOW_TAG])
@@ -145,7 +144,6 @@ if test "x$vma_cv_verbs" == x2; then
145144
CHECK_VERBS_ATTRIBUTE([IBV_EXP_WR_NOP], [infiniband/verbs_exp.h], [IBV_WR_NOP])
146145
CHECK_VERBS_ATTRIBUTE([IBV_EXP_ACCESS_ALLOCATE_MR], [infiniband/verbs_exp.h])
147146
CHECK_VERBS_ATTRIBUTE([IBV_EXP_QP_INIT_ATTR_ASSOCIATED_QPN], [infiniband/verbs_exp.h], [IBV_QP_INIT_SOURCE_QPN])
148-
CHECK_VERBS_ATTRIBUTE([IBV_EXP_FLOW_SPEC_IB], [infiniband/verbs_exp.h], [IBV_FLOW_SPEC_IB])
149147
CHECK_VERBS_ATTRIBUTE([IBV_EXP_SEND_IP_CSUM], [infiniband/verbs_exp.h])
150148
CHECK_VERBS_ATTRIBUTE([IBV_EXP_DEVICE_ATTR_MAX_DM_SIZE], [infiniband/verbs_exp.h], [IBV_DM])
151149
CHECK_VERBS_ATTRIBUTE([IBV_EXP_QP_RATE_LIMIT], [infiniband/verbs_exp.h], [IBV_PACKET_PACING_CAPS])

src/vma/Makefile.am

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ libvma_la_SOURCES := \
8383
dev/net_device_entry.cpp \
8484
dev/net_device_table_mgr.cpp \
8585
dev/wqe_send_handler.cpp \
86-
dev/wqe_send_ib_handler.cpp \
8786
dev/ring.cpp \
8887
dev/ring_bond.cpp \
8988
dev/ring_slave.cpp \
@@ -137,8 +136,6 @@ libvma_la_SOURCES := \
137136
proto/dst_entry_tcp.cpp \
138137
proto/header.cpp \
139138
proto/arp.cpp \
140-
proto/igmp_mgr.cpp \
141-
proto/igmp_handler.cpp \
142139
\
143140
sock/sockinfo.cpp \
144141
sock/sockinfo_udp.cpp \
@@ -190,7 +187,6 @@ libvma_la_SOURCES := \
190187
dev/ring_profile.h \
191188
dev/ring_allocation_logic.h \
192189
dev/wqe_send_handler.h \
193-
dev/wqe_send_ib_handler.h \
194190
\
195191
event/command.h \
196192
event/delta_timer.h \
@@ -245,14 +241,11 @@ libvma_la_SOURCES := \
245241
proto/dst_entry_udp_mc.h \
246242
proto/flow_tuple.h \
247243
proto/header.h \
248-
proto/igmp_handler.h \
249-
proto/igmp_mgr.h \
250244
proto/ip_address.h \
251245
proto/ip_frag.h \
252246
proto/L2_address.h \
253247
proto/mem_buf_desc.h \
254248
proto/neighbour.h \
255-
proto/neighbour_observer.h \
256249
proto/neighbour_table_mgr.h \
257250
proto/netlink_socket_mgr.h \
258251
proto/peer_key.h \

src/vma/dev/cq_mgr.cpp

Lines changed: 13 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,9 @@ cq_mgr::cq_mgr(ring_simple* p_ring, ib_ctx_handler* p_ib_ctx_handler, int cq_siz
6060
,m_n_sysvar_cq_poll_batch_max(safe_mce_sys().cq_poll_batch_max)
6161
,m_n_sysvar_progress_engine_wce_max(safe_mce_sys().progress_engine_wce_max)
6262
,m_p_cq_stat(&m_cq_stat_static) // use local copy of stats by default (on rx cq get shared memory stats)
63-
,m_transport_type(m_p_ring->get_transport_type())
6463
,m_p_next_rx_desc_poll(NULL)
6564
,m_n_sysvar_rx_prefetch_bytes_before_poll(safe_mce_sys().rx_prefetch_bytes_before_poll)
6665
,m_n_sysvar_rx_prefetch_bytes(safe_mce_sys().rx_prefetch_bytes)
67-
,m_sz_transport_header(0)
6866
,m_p_ib_ctx_handler(p_ib_ctx_handler)
6967
,m_n_sysvar_rx_num_wr_to_post_recv(safe_mce_sys().rx_num_wr_to_post_recv)
7068
,m_comp_event_channel(p_comp_event_channel)
@@ -106,25 +104,9 @@ void cq_mgr::configure(int cq_size)
106104
}
107105
BULLSEYE_EXCLUDE_BLOCK_END
108106
VALGRIND_MAKE_MEM_DEFINED(m_p_ibv_cq, sizeof(ibv_cq));
109-
switch (m_transport_type) {
110-
case VMA_TRANSPORT_IB:
111-
m_sz_transport_header = GRH_HDR_LEN;
112-
break;
113-
case VMA_TRANSPORT_ETH:
114-
m_sz_transport_header = ETH_HDR_LEN;
115-
break;
116-
BULLSEYE_EXCLUDE_BLOCK_START
117-
default:
118-
cq_logpanic("Unknown transport type: %d", m_transport_type);
119-
break;
120-
BULLSEYE_EXCLUDE_BLOCK_END
121-
}
122107

123108
if (m_b_is_rx) {
124109
vma_stats_instance_create_cq_block(m_p_cq_stat);
125-
}
126-
127-
if (m_b_is_rx) {
128110
m_b_is_rx_hw_csum_on = vma_is_rx_hw_csum_supported(m_p_ib_ctx_handler->get_ibv_device_attr());
129111
cq_logdbg("RX CSUM support = %d", m_b_is_rx_hw_csum_on);
130112
}
@@ -499,9 +481,8 @@ mem_buf_desc_t* cq_mgr::process_cq_element_rx(vma_ibv_wc* p_wce)
499481

500482
VALGRIND_MAKE_MEM_DEFINED(p_mem_buf_desc->p_buffer, p_mem_buf_desc->sz_data);
501483

502-
prefetch_range((uint8_t*)p_mem_buf_desc->p_buffer + m_sz_transport_header,
503-
std::min(p_mem_buf_desc->sz_data - m_sz_transport_header, (size_t)m_n_sysvar_rx_prefetch_bytes));
504-
//prefetch((uint8_t*)p_mem_buf_desc->p_buffer + m_sz_transport_header);
484+
prefetch_range((uint8_t*)p_mem_buf_desc->p_buffer + ETH_HDR_LEN,
485+
std::min(p_mem_buf_desc->sz_data - ETH_HDR_LEN, (size_t)m_n_sysvar_rx_prefetch_bytes));
505486
}
506487

507488
return p_mem_buf_desc;
@@ -790,29 +771,19 @@ int cq_mgr::drain_and_proccess(uintptr_t* p_recycle_buffers_last_wr_id /*=NULL*/
790771
if (p_recycle_buffers_last_wr_id) {
791772
m_p_cq_stat->n_rx_pkt_drop++;
792773
reclaim_recv_buffer_helper(buff);
793-
} else {
794-
bool procces_now = false;
795-
if (m_transport_type == VMA_TRANSPORT_ETH) {
796-
procces_now = is_eth_tcp_frame(buff);
797-
}
798-
if (m_transport_type == VMA_TRANSPORT_IB) {
799-
procces_now = is_ib_tcp_frame(buff);
800-
}
774+
} else if (is_eth_tcp_frame(buff)) {
801775
// We process immediately all non udp/ip traffic..
802-
if (procces_now) {
803-
buff->rx.is_vma_thr = true;
804-
if ((++m_qp_rec.debt < (int)m_n_sysvar_rx_num_wr_to_post_recv) ||
805-
!compensate_qp_poll_success(buff)) {
806-
process_recv_buffer(buff, NULL);
807-
}
776+
buff->rx.is_vma_thr = true;
777+
if ((++m_qp_rec.debt < (int)m_n_sysvar_rx_num_wr_to_post_recv) ||
778+
!compensate_qp_poll_success(buff)) {
779+
process_recv_buffer(buff, NULL);
808780
}
809-
else { //udp/ip traffic we just put in the cq's rx queue
810-
m_rx_queue.push_back(buff);
811-
mem_buf_desc_t* buff_cur = m_rx_queue.get_and_pop_front();
812-
if ((++m_qp_rec.debt < (int)m_n_sysvar_rx_num_wr_to_post_recv) ||
813-
!compensate_qp_poll_success(buff_cur)) {
814-
m_rx_queue.push_front(buff_cur);
815-
}
781+
} else { //udp/ip traffic we just put in the cq's rx queue
782+
m_rx_queue.push_back(buff);
783+
mem_buf_desc_t* buff_cur = m_rx_queue.get_and_pop_front();
784+
if ((++m_qp_rec.debt < (int)m_n_sysvar_rx_num_wr_to_post_recv) ||
785+
!compensate_qp_poll_success(buff_cur)) {
786+
m_rx_queue.push_front(buff_cur);
816787
}
817788
}
818789
}

src/vma/dev/cq_mgr.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,9 @@ class cq_mgr
184184
const uint32_t m_n_sysvar_cq_poll_batch_max;
185185
const uint32_t m_n_sysvar_progress_engine_wce_max;
186186
cq_stats_t* m_p_cq_stat;
187-
transport_type_t m_transport_type;
188187
mem_buf_desc_t* m_p_next_rx_desc_poll;
189188
const uint32_t m_n_sysvar_rx_prefetch_bytes_before_poll;
190189
const uint32_t m_n_sysvar_rx_prefetch_bytes;
191-
size_t m_sz_transport_header;
192190
ib_ctx_handler* m_p_ib_ctx_handler;
193191
const uint32_t m_n_sysvar_rx_num_wr_to_post_recv;
194192
private:

src/vma/dev/cq_mgr.inl

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,4 @@ inline bool is_eth_tcp_frame(mem_buf_desc_t* buff)
6262
return false;
6363
}
6464

65-
inline bool is_ib_tcp_frame(mem_buf_desc_t* buff)
66-
{
67-
struct ipoibhdr* p_ipoib_h = (struct ipoibhdr*)(buff->p_buffer + GRH_HDR_LEN);
68-
69-
// Validate IPoIB header
70-
if (unlikely(p_ipoib_h->ipoib_header != htonl(IPOIB_HEADER))) {
71-
return false;
72-
}
73-
74-
size_t transport_header_len = GRH_HDR_LEN + IPOIB_HDR_LEN;
75-
76-
struct iphdr * p_ip_h = (struct iphdr*)(buff->p_buffer + transport_header_len);
77-
if (likely(p_ip_h->protocol == IPPROTO_TCP)) {
78-
return true;
79-
}
80-
return false;
81-
}
82-
8365
#endif//CQ_MGR_INL_H

src/vma/dev/cq_mgr_mlx5.cpp

Lines changed: 25 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -294,29 +294,19 @@ int cq_mgr_mlx5::drain_and_proccess(uintptr_t* p_recycle_buffers_last_wr_id /*=N
294294
if (p_recycle_buffers_last_wr_id) {
295295
m_p_cq_stat->n_rx_pkt_drop++;
296296
reclaim_recv_buffer_helper(m_rx_hot_buffer);
297-
} else {
298-
bool procces_now = false;
299-
if (m_transport_type == VMA_TRANSPORT_ETH) {
300-
procces_now = is_eth_tcp_frame(m_rx_hot_buffer);
301-
}
302-
if (m_transport_type == VMA_TRANSPORT_IB) {
303-
procces_now = is_ib_tcp_frame(m_rx_hot_buffer);
304-
}
297+
} else if (is_eth_tcp_frame(m_rx_hot_buffer)) {
305298
// We process immediately all non udp/ip traffic..
306-
if (procces_now) {
307-
m_rx_hot_buffer->rx.is_vma_thr = true;
308-
if ((++m_qp_rec.debt < (int)m_n_sysvar_rx_num_wr_to_post_recv) ||
309-
!compensate_qp_poll_success(m_rx_hot_buffer)) {
310-
process_recv_buffer(m_rx_hot_buffer, NULL);
311-
}
299+
m_rx_hot_buffer->rx.is_vma_thr = true;
300+
if ((++m_qp_rec.debt < (int)m_n_sysvar_rx_num_wr_to_post_recv) ||
301+
!compensate_qp_poll_success(m_rx_hot_buffer)) {
302+
process_recv_buffer(m_rx_hot_buffer, NULL);
312303
}
313-
else { //udp/ip traffic we just put in the cq's rx queue
314-
m_rx_queue.push_back(m_rx_hot_buffer);
315-
mem_buf_desc_t* buff_cur = m_rx_queue.get_and_pop_front();
316-
if ((++m_qp_rec.debt < (int)m_n_sysvar_rx_num_wr_to_post_recv) ||
317-
!compensate_qp_poll_success(buff_cur)) {
318-
m_rx_queue.push_front(buff_cur);
319-
}
304+
} else { //udp/ip traffic we just put in the cq's rx queue
305+
m_rx_queue.push_back(m_rx_hot_buffer);
306+
mem_buf_desc_t* buff_cur = m_rx_queue.get_and_pop_front();
307+
if ((++m_qp_rec.debt < (int)m_n_sysvar_rx_num_wr_to_post_recv) ||
308+
!compensate_qp_poll_success(buff_cur)) {
309+
m_rx_queue.push_front(buff_cur);
320310
}
321311
}
322312
}
@@ -344,30 +334,20 @@ int cq_mgr_mlx5::drain_and_proccess(uintptr_t* p_recycle_buffers_last_wr_id /*=N
344334
if (p_recycle_buffers_last_wr_id) {
345335
m_p_cq_stat->n_rx_pkt_drop++;
346336
reclaim_recv_buffer_helper(buff);
347-
} else {
348-
bool procces_now = false;
349-
if (m_transport_type == VMA_TRANSPORT_ETH) {
350-
procces_now = is_eth_tcp_frame(buff);
351-
}
352-
if (m_transport_type == VMA_TRANSPORT_IB) {
353-
procces_now = is_ib_tcp_frame(buff);
354-
}
337+
} else if (is_eth_tcp_frame(buff)) {
355338
/* We process immediately all non udp/ip traffic.. */
356-
if (procces_now) {
357-
buff->rx.is_vma_thr = true;
358-
if ((++m_qp_rec.debt < (int)m_n_sysvar_rx_num_wr_to_post_recv) ||
359-
!compensate_qp_poll_success(buff)) {
360-
process_recv_buffer(buff, NULL);
361-
}
339+
buff->rx.is_vma_thr = true;
340+
if ((++m_qp_rec.debt < (int)m_n_sysvar_rx_num_wr_to_post_recv) ||
341+
!compensate_qp_poll_success(buff)) {
342+
process_recv_buffer(buff, NULL);
362343
}
363-
else { /* udp/ip traffic we just put in the cq's rx queue */
364-
m_rx_queue.push_back(buff);
365-
mem_buf_desc_t* buff_cur = m_rx_queue.front();
366-
m_rx_queue.pop_front();
367-
if ((++m_qp_rec.debt < (int)m_n_sysvar_rx_num_wr_to_post_recv) ||
368-
!compensate_qp_poll_success(buff_cur)) {
369-
m_rx_queue.push_front(buff_cur);
370-
}
344+
} else { /* udp/ip traffic we just put in the cq's rx queue */
345+
m_rx_queue.push_back(buff);
346+
mem_buf_desc_t* buff_cur = m_rx_queue.front();
347+
m_rx_queue.pop_front();
348+
if ((++m_qp_rec.debt < (int)m_n_sysvar_rx_num_wr_to_post_recv) ||
349+
!compensate_qp_poll_success(buff_cur)) {
350+
m_rx_queue.push_front(buff_cur);
371351
}
372352
}
373353
}
@@ -444,8 +424,8 @@ mem_buf_desc_t* cq_mgr_mlx5::process_cq_element_rx(mem_buf_desc_t* p_mem_buf_des
444424

445425
VALGRIND_MAKE_MEM_DEFINED(p_mem_buf_desc->p_buffer, p_mem_buf_desc->sz_data);
446426

447-
prefetch_range((uint8_t*)p_mem_buf_desc->p_buffer + m_sz_transport_header,
448-
std::min(p_mem_buf_desc->sz_data - m_sz_transport_header, (size_t)m_n_sysvar_rx_prefetch_bytes));
427+
prefetch_range((uint8_t*)p_mem_buf_desc->p_buffer + ETH_HDR_LEN,
428+
std::min(p_mem_buf_desc->sz_data - ETH_HDR_LEN, (size_t)m_n_sysvar_rx_prefetch_bytes));
449429

450430

451431
return p_mem_buf_desc;

src/vma/dev/net_device_table_mgr.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,6 @@ void net_device_table_mgr::update_tbl()
214214
case ARPHRD_ETHER:
215215
p_net_device_val = new net_device_val_eth(&desc);
216216
break;
217-
case ARPHRD_INFINIBAND:
218-
p_net_device_val = new net_device_val_ib(&desc);
219-
break;
220217
default:
221218
goto next;
222219
}

0 commit comments

Comments
 (0)