Commit 7de8b357 authored by Shiraz Saleem's avatar Shiraz Saleem Committed by Jason Gunthorpe

i40iw: Improve CM node lookup time on connection setup

Currently all CM nodes involved in a connection are
maintained in a connected_node list per dev. During
connection setup, we need to search this every time
we receive a packet on the iWARP LAN Queue (ILQ) and
this can be pretty inefficient for large number of
connections.

Fix this by organizing the CM nodes in two lists -
accelerated list and non-accelerated list. The search
on ILQ receive would be limited to only non accelerated
nodes. When a node moves to RTS, it is added to the
accelerated list.

Benchmarking ucmatose 16k connections shows a 20%
improvement in test completion time.
Signed-off-by: default avatarShiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 6b0c549f
...@@ -564,7 +564,8 @@ struct i40iw_cm_node *i40iw_find_node(struct i40iw_cm_core *cm_core, ...@@ -564,7 +564,8 @@ struct i40iw_cm_node *i40iw_find_node(struct i40iw_cm_core *cm_core,
u32 *rem_addr, u32 *rem_addr,
u16 loc_port, u16 loc_port,
u32 *loc_addr, u32 *loc_addr,
bool add_refcnt); bool add_refcnt,
bool accelerated_list);
enum i40iw_status_code i40iw_hw_flush_wqes(struct i40iw_device *iwdev, enum i40iw_status_code i40iw_hw_flush_wqes(struct i40iw_device *iwdev,
struct i40iw_sc_qp *qp, struct i40iw_sc_qp *qp,
......
This diff is collapsed.
...@@ -341,7 +341,7 @@ struct i40iw_cm_node { ...@@ -341,7 +341,7 @@ struct i40iw_cm_node {
int accept_pend; int accept_pend;
struct list_head timer_entry; struct list_head timer_entry;
struct list_head reset_entry; struct list_head reset_entry;
struct list_head connected_entry; struct list_head teardown_entry;
atomic_t passive_state; atomic_t passive_state;
bool qhash_set; bool qhash_set;
u8 user_pri; u8 user_pri;
...@@ -403,7 +403,8 @@ struct i40iw_cm_core { ...@@ -403,7 +403,8 @@ struct i40iw_cm_core {
struct i40iw_sc_dev *dev; struct i40iw_sc_dev *dev;
struct list_head listen_nodes; struct list_head listen_nodes;
struct list_head connected_nodes; struct list_head accelerated_list;
struct list_head non_accelerated_list;
struct timer_list tcp_timer; struct timer_list tcp_timer;
......
...@@ -1407,7 +1407,7 @@ struct i40iw_sc_qp *i40iw_ieq_get_qp(struct i40iw_sc_dev *dev, ...@@ -1407,7 +1407,7 @@ struct i40iw_sc_qp *i40iw_ieq_get_qp(struct i40iw_sc_dev *dev,
rem_port = ntohs(tcph->source); rem_port = ntohs(tcph->source);
cm_node = i40iw_find_node(&iwdev->cm_core, rem_port, rem_addr, loc_port, cm_node = i40iw_find_node(&iwdev->cm_core, rem_port, rem_addr, loc_port,
loc_addr, false); loc_addr, false, true);
if (!cm_node) if (!cm_node)
return NULL; return NULL;
iwqp = cm_node->iwqp; iwqp = cm_node->iwqp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment