/* Grand Unified Theory of connection life cycle: *Atanypointintime,theconnectioncanbeinoneofthesestates: *DOWN,CONNECTING,UP,DISCONNECTING,ERROR * *Thefollowingtransitionsarepossible: *ANY->ERROR *UP->DISCONNECTING *ERROR->DISCONNECTING *DISCONNECTING->DOWN *DOWN->CONNECTING *CONNECTING->UP * *TransitiontostateDISCONNECTING/DOWN: *-Insidetheshutdownworker;synchronizeswithxmitpath *throughRDS_IN_XMIT,andwithconnectionmanagementcallbacks *viac_cm_lock. * *Forreceivecallbacks,werelyontheunderlyingtransport *(TCP,IB/RDMA)toprovidethenecessarysynchronisation.
*/ struct workqueue_struct *rds_wq;
EXPORT_SYMBOL_GPL(rds_wq);
void rds_connect_path_complete(struct rds_conn_path *cp, int curr)
{ if (!rds_conn_path_transition(cp, curr, RDS_CONN_UP)) {
printk(KERN_WARNING "%s: Cannot transition to state UP, " "current state is %d\n",
__func__,
atomic_read(&cp->cp_state));
rds_conn_path_drop(cp, false); return;
}
rdsdebug("conn %p for %pI6c to %pI6c complete\n",
cp->cp_conn, &cp->cp_conn->c_laddr, &cp->cp_conn->c_faddr);
int rds_threads_init(void)
{
rds_wq = create_singlethread_workqueue("krdsd"); if (!rds_wq) return -ENOMEM;
return0;
}
/* Compare two IPv6 addresses. Return 0 if the two addresses are equal. *Return1ifthefirstisgreater.Return-1ifthesecondisgreater.
*/ int rds_addr_cmp(conststruct in6_addr *addr1, conststruct in6_addr *addr2)
{ #ifdefined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) && BITS_PER_LONG == 64 const __be64 *a1, *a2;
u64 x, y;
a1 = (__be64 *)addr1;
a2 = (__be64 *)addr2;
if (*a1 != *a2) { if (be64_to_cpu(*a1) < be64_to_cpu(*a2)) return -1; else return1;
} else {
x = be64_to_cpu(*++a1);
y = be64_to_cpu(*++a2); if (x < y) return -1; elseif (x > y) return1; else return0;
} #else
u32 a, b; int i;
for (i = 0; i < 4; i++) { if (addr1->s6_addr32[i] != addr2->s6_addr32[i]) {
a = ntohl(addr1->s6_addr32[i]);
b = ntohl(addr2->s6_addr32[i]); if (a < b) return -1; elseif (a > b) return1;
}
} return0; #endif
}
EXPORT_SYMBOL_GPL(rds_addr_cmp);
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-09-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.