File tree Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -339,22 +339,16 @@ static struct ib_ports_pkeys *get_new_pps(const struct ib_qp *qp,
339
339
if (!new_pps )
340
340
return NULL ;
341
341
342
- if (qp_attr_mask & (IB_QP_PKEY_INDEX | IB_QP_PORT )) {
343
- if (!qp_pps ) {
344
- new_pps -> main .port_num = qp_attr -> port_num ;
345
- new_pps -> main .pkey_index = qp_attr -> pkey_index ;
346
- } else {
347
- new_pps -> main .port_num = (qp_attr_mask & IB_QP_PORT ) ?
348
- qp_attr -> port_num :
349
- qp_pps -> main .port_num ;
350
-
351
- new_pps -> main .pkey_index =
352
- (qp_attr_mask & IB_QP_PKEY_INDEX ) ?
353
- qp_attr -> pkey_index :
354
- qp_pps -> main .pkey_index ;
355
- }
342
+ if (qp_attr_mask & IB_QP_PORT )
343
+ new_pps -> main .port_num =
344
+ (qp_pps ) ? qp_pps -> main .port_num : qp_attr -> port_num ;
345
+ if (qp_attr_mask & IB_QP_PKEY_INDEX )
346
+ new_pps -> main .pkey_index = (qp_pps ) ? qp_pps -> main .pkey_index :
347
+ qp_attr -> pkey_index ;
348
+ if ((qp_attr_mask & IB_QP_PKEY_INDEX ) && (qp_attr_mask & IB_QP_PORT ))
356
349
new_pps -> main .state = IB_PORT_PKEY_VALID ;
357
- } else if (qp_pps ) {
350
+
351
+ if (!(qp_attr_mask & (IB_QP_PKEY_INDEX || IB_QP_PORT )) && qp_pps ) {
358
352
new_pps -> main .port_num = qp_pps -> main .port_num ;
359
353
new_pps -> main .pkey_index = qp_pps -> main .pkey_index ;
360
354
if (qp_pps -> main .state != IB_PORT_PKEY_NOT_VALID )
You can’t perform that action at this time.
0 commit comments