Lines Matching refs:idx
191 int idx = dccp_feat_index(feat_num); in dccp_feat_type() local
193 if (idx < 0) in dccp_feat_type()
195 return dccp_feat_table[idx].reconciliation; in dccp_feat_type()
200 int idx = dccp_feat_index(feat_num); in dccp_feat_default_value() local
205 DCCP_BUG_ON(idx < 0); in dccp_feat_default_value()
207 return idx < 0 ? 0 : dccp_feat_table[idx].default_value; in dccp_feat_default_value()
305 static int __dccp_feat_activate(struct sock *sk, const int idx, in __dccp_feat_activate() argument
311 if (idx < 0 || idx >= DCCP_FEAT_SUPPORTED_MAX) in __dccp_feat_activate()
313 if (dccp_feat_table[idx].activation_hdlr == NULL) in __dccp_feat_activate()
317 val = dccp_feat_table[idx].default_value; in __dccp_feat_activate()
318 } else if (dccp_feat_table[idx].reconciliation == FEAT_SP) { in __dccp_feat_activate()
325 DCCP_CRIT("Feature #%d undefined: using default", idx); in __dccp_feat_activate()
326 val = dccp_feat_table[idx].default_value; in __dccp_feat_activate()
335 rx = (is_local == (dccp_feat_table[idx].rxtx == FEAT_AT_RX)); in __dccp_feat_activate()
338 dccp_feat_fname(dccp_feat_table[idx].feat_num), in __dccp_feat_activate()
341 return dccp_feat_table[idx].activation_hdlr(sk, val, rx); in __dccp_feat_activate()
1514 int idx; in dccp_feat_activate_values() local
1528 idx = dccp_feat_index(cur->feat_num); in dccp_feat_activate_values()
1529 if (idx < 0) { in dccp_feat_activate_values()
1540 fvals[idx][cur->is_local] = &cur->val; in dccp_feat_activate_values()
1549 for (idx = DCCP_FEAT_SUPPORTED_MAX; --idx >= 0;) in dccp_feat_activate_values()
1550 if (__dccp_feat_activate(sk, idx, 0, fvals[idx][0]) || in dccp_feat_activate_values()
1551 __dccp_feat_activate(sk, idx, 1, fvals[idx][1])) { in dccp_feat_activate_values()
1552 DCCP_CRIT("Could not activate %d", idx); in dccp_feat_activate_values()