You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
(56) |
May
(46) |
Jun
(44) |
Jul
(7) |
Aug
(2) |
Sep
|
Oct
|
Nov
(13) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Yinghan Y. <yin...@gm...> - 2005-06-29 09:26:49
|
Hi TIPC community, Does anyone know where I can find some reference on the adaptation of ethernet for TIPC ? Thanks in advance. Regards, Yinghan |
|
From: <ben...@id...> - 2004-05-22 13:06:47
|
Dear Open Source developer I am doing a research project on "Fun and Software Development" in which I kindly invite you to participate. You will find the online survey under http://fasd.ethz.ch/qsf/. The questionnaire consists of 53 questions and you will need about 15 minutes to complete it. With the FASD project (Fun and Software Development) we want to define the motivational significance of fun when software developers decide to engage in Open Source projects. What is special about our research project is that a similar survey is planned with software developers in commercial firms. This procedure allows the immediate comparison between the involved individuals and the conditions of production of these two development models. Thus we hope to obtain substantial new insights to the phenomenon of Open Source Development. With many thanks for your participation, Benno Luthiger PS: The results of the survey will be published under http://www.isu.unizh.ch/fuehrung/blprojects/FASD/. We have set up the mailing list fa...@we... for this study. Please see http://fasd.ethz.ch/qsf/mailinglist_en.html for registration to this mailing list. _______________________________________________________________________ Benno Luthiger Swiss Federal Institute of Technology Zurich 8092 Zurich Mail: benno.luthiger(at)id.ethz.ch _______________________________________________________________________ |
|
From: Jon M. <jon...@er...> - 2003-11-28 14:50:26
|
Great! Thank you. /Jon Ling, Xiaofeng wrote: >some tools are put at >http://cvs.sourceforge.net/viewcvs.py/tipc/source/tools/ >These tools can be used to test and debug tipc stack. > >tipcdump >Dump tipc packet from ethernet interface, print the content of it. support two message heads including data messaeg and internal message > >tipcnc >tools to communicate between different nodes by connect or connectionless tipc. > >tipcconfig >tools to config tipc. > > |
|
From: Ling, X. <xia...@in...> - 2003-11-28 09:18:06
|
some tools are put at http://cvs.sourceforge.net/viewcvs.py/tipc/source/tools/ These tools can be used to test and debug tipc stack. tipcdump Dump tipc packet from ethernet interface, print the content of it. = support two message heads including data messaeg and internal message tipcnc tools to communicate between different nodes by connect or = connectionless tipc. tipcconfig tools to config tipc. |
|
From: Ling, X. <xia...@in...> - 2003-11-21 08:50:46
|
On 2.6.0-test5:
kfree_skbmem+0x18/0x20
__kfree_skb+0xec/0x100
packet_rcv_spkt+0xab/0x1a0
deliver_to_old_ones+0x49/0x80
netif_receive_skb+0x22f/0x280
...
Code:8b 03 89 04 24 89 4c 24 08 89 74 24 0c 89 6c 24 04 8d 7c 24
<0> Kernel panic: Fatal exeption in interrupt
In interrupt handler - not syncing
-----Original Message-----
From: Guo, Min=20
Sent: 2003?11?21? 16:06
To: Jon Maloy
Cc: TIPC mailing list; Ling, Xiaofeng
Subject: Inegrated tipc patch against tipc stable_ericsson version
Hi, Jon=20
Below is the multicast patch against tipc stable_ericsson version.
But, we encountered a critical bug in kernel 2.6.0-test9, when we =
insmod=20
the stable_ericssion version tipc.ko, the system will crash and hang =
there.Here, the bug
exists in the tipc stable_ericssion version without our patch or with =
our patch applied.
the strip outputs are=20
kfree_skb + 0x50/0xc0
packet_rcv_spkt+ 0xc5/0x270
netif_receive_skb + 0x163/0x1a0
process_backlog + 0x6d/0x100=20
net_rx_action + 0x74/0x110
...............................
In the patch , I also integrated Xiaofeng's proc patch, which can =
record the link and=20
port information in proc file system.
Any comments are welcome!
Thanks
Guo Min
=20
----------------------------------------------TIPC multicast and =
proc patch -----------------------------------------------
Index: TIPC_SCC/src/Link.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/tipc/source/stable_ericsson/TIPC_SCC/src/Link.c,v
retrieving revision 1.1
diff -c -u -r1.1 Link.c
--- TIPC_SCC/src/Link.c 4 Nov 2003 18:23:37 -0000 1.1
+++ TIPC_SCC/src/Link.c 21 Nov 2003 07:49:00 -0000
@@ -133,6 +133,7 @@
#include "Bearer.h"
#include "Memory.h"
#include "NameTable.h"
+#include "Multicast.h"
=20
/* Limits for send queue: */
=20
@@ -1537,9 +1538,39 @@
}=20
else if (dproc =3D=3D tipc_ownAddress)=20
{ =20
- Port* port =3D port_deref(msg_destport(msg));
- if (!port) port_rejectMsg(buf,tipc_no_remote_port);
- else {port_dispatch(port,buf);}
+ Port *port; =20
+ int find =3D false;
+ if (msg_user(msg) =3D=3D MULTICAST_PROTOCOL){
+ struct mc_identity *phead=3DNULL, *p_list =3D NULL; =20
+ TipcBuffer* copybuf;
+ =
nametbl_mc_translate(msg_Nameseqtype(msg),msg_lower(msg),msg_upper(msg), =
&phead);
+ p_list =3D phead;=20
+ while(p_list !=3D NULL)
+ {
+ if(p_list->processor =3D=3D tipc_ownAddress)
+ {
+ port =3D port_deref(p_list ->port);
+ copybuf =3D buf_clone(buf, NULL);
+ msg_setuser(buf_msg(copybuf), 0);
+ msg_setDestport(buf_msg(copybuf), p_list ->port);
+ if (port)
+ {
+ find =3D true;
+ port_dispatch(port, copybuf); =20
+ }
+ }
+ p_list =3D p_list->next; =20
+ }=20
+ buf_discard(buf);
+ free_mclist(phead);
+ =20
+ if (find =3D=3D false)
+ port_rejectMsg(buf,tipc_no_remote_port);
+ } else { =20
+ Port* port =3D port_deref(msg_destport(msg));
+ if (!port) port_rejectMsg(buf,tipc_no_remote_port);
+ else {port_dispatch(port,buf);}
+ }
}=20
else /* No subnet local link. Extend lookup scope: */
{=20
@@ -2232,6 +2263,29 @@
this->checkpoint =3D NOT_A_SEQNO;
link_protocolDataInd(this,buf);
continue;=20
+ }
+ else if (msg_user(msg) =3D=3D MULTICAST_PROTOCOL)
+ {
+ struct mc_identity *phead=3DNULL, *p_list =3D NULL; =20
+ TipcBuffer* copybuf;
+ =
nametbl_mc_translate(msg_Nameseqtype(msg),msg_lower(msg),msg_upper(msg), =
&phead);
+ p_list =3D phead;=20
+ while(p_list !=3D NULL)
+ {
+ if(p_list->processor =3D=3D tipc_ownAddress)
+ {
+ Port* port =3D port_deref(p_list ->port);
+ copybuf =3D buf_clone(buf, NULL);
+ msg_setuser(buf_msg(copybuf), 0)
+ msg_setDestport(buf_msg(copybuf), p_list ->port);
+ if (port)
+ port_dispatch(port, copybuf); =20
+ }
+ p_list =3D p_list->next;
+ =20
+ }=20
+ buf_discard(buf);
+ free_mclist(phead);
}
else=20
{
Index: TIPC_SCC/src/NameTable.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: =
/cvsroot/tipc/source/stable_ericsson/TIPC_SCC/src/NameTable.c,v
retrieving revision 1.1
diff -c -u -r1.1 NameTable.c
--- TIPC_SCC/src/NameTable.c 4 Nov 2003 18:23:38 -0000 1.1
+++ TIPC_SCC/src/NameTable.c 21 Nov 2003 07:49:01 -0000
@@ -108,6 +108,7 @@
#include "NameSubscription.h"
#include "Port.h"
#include "Memory.h"
+#include "Multicast.h"
=20
/* ////////////////// Private: //////////////////////////////// */
void nametbl_dump(void);
@@ -782,6 +783,57 @@
return publ->port; =20
}
=20
+//////////////////////////////////////////////////////////////////
+boolean nametbl_mc_translate(uint type,
+ uint lower,uint upper,mc_identity** =
mc_idenitity_list)
+{
+ NameSequence* seq;=20
+ int i =3D 0;=20
+ Publication* publ;
+ SubSequence* sseqs;
+ int low_seq, high_seq;
+ uint destport;
+ tipc_address_t destprocessor;
+ =20
+ nametbl_findNameSequence(type,seq);=20
+ if (!seq) return false;
+ =20
+ sseqs =3D subseq_get(seq->subseqPool,seq->subseqIndex);
+ if(!sseqs) return false;
+ =20
+ nameseq_findSubsequence(seq,sseqs,lower,low_seq); =20
+ if (low_seq < 0)
+ low_seq =3D low_seq < 0 ? ~low_seq : low_seq;
+
+ nameseq_findSubsequence(seq,sseqs,upper,high_seq);=20
+ if (high_seq < 0)
+ high_seq =3D high_seq < 0 ? ((~high_seq) -1): high_seq;
+ =20
+ if (high_seq < low_seq)
+ return false;
+ =20
+ i =3D low_seq;
+ =20
+ for (i =3D low_seq ; i <=3D high_seq; i++)
+ {
+ publ =3D sseqs[i].preferred;=20
+ if (!publ) =20
+ { =20
+ publ =3D sseqs[i].loadshared;=20
+ sseqs[i].loadshared =3D publ->next;=20
+ }=20
+ assert(publ);=20
+ destprocessor =3D publ->processor;=20
+ destport =3D publ->port;
+ if (destport){
+ if ( false =3D=3D =
add_to_mc_indenity_list(mc_idenitity_list,destport,destprocessor))
+ return false; =20
+ } =20
+ }=20
+ return true;
+}
+
+
/* ////////////////////////////////////////////////// */
=20
Publication* nametbl_publish(uint type,
@@ -1100,3 +1152,71 @@
{
nametbl_list(C,0,0);
}
+
+int tipc_get_info(char *buffer, char **start, off_t offset, int length)
+{
+ int len =3D 0;
+ uint i, j;
+ NameSequence* seq;=20
+ SubSequence* sseqs;
+ Publication* publ;
+ =20
+ len +=3D sprintf(buffer + len, "type low-upper scope:address:port =
[scope:address:port]\n"); =20
+ for(i =3D 0;i < TABLE_SIZE; i++)
+ {
+ seq =3D table.types[i];
+ while ((seq))
+ {
+
+ sseqs =3D subseq_get(seq->subseqPool,seq->subseqIndex);
+ if(!sseqs)=20
+ break;
+ for(j =3D 0; j < (seq->firstFree); j++)
+ {
+ len +=3D sprintf(buffer + len, "%d %d-%d", seq->type, =
sseqs[j].lower, sseqs[j].upper);
+ publ =3D sseqs[j].preferred;=20
+ if (publ !=3D 0)
+ {
+ len +=3D sprintf(buffer + len, " %d:%d.%d.%d:%X", PROCESSOR_SCOPE, =
addr_zone(publ->processor),
+ addr_subnet(publ->processor),
+ addr_proc(publ->processor),
+ publ->port);=20
+
+ }
+ publ =3D sseqs[j].loadshared;
+ if (publ !=3D 0)
+ {
+ do
+ {
+ len +=3D sprintf(buffer + len, " %d:%d.%d.%d:%X", ZONE_SCOPE, =
addr_zone(publ->processor),
+ addr_subnet(publ->processor),
+ addr_proc(publ->processor),
+ publ->port);=20
+ =20
+ publ =3D publ->next;
+ }
+ while (publ !=3D sseqs[j].loadshared);
+ }
+ len +=3D sprintf(buffer + len, "\n");
+ }
+ seq =3D seq->next;
+ }
+ =20
+ }
+=20
+ if (offset >=3D len)
+ {
+ *start =3D buffer;
+ return 0;
+ }
+ *start =3D buffer + offset;
+ len -=3D offset;
+ if (len > length)
+ len =3D length;
+ if (len < 0)
+ len =3D 0;
+ return len;
+
+}
+
+
Index: TIPC_SCC/src/Network.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/tipc/source/stable_ericsson/TIPC_SCC/src/Network.c,v
retrieving revision 1.1
diff -c -u -r1.1 Network.c
--- TIPC_SCC/src/Network.c 4 Nov 2003 18:23:38 -0000 1.1
+++ TIPC_SCC/src/Network.c 21 Nov 2003 07:49:01 -0000
@@ -82,6 +82,7 @@
#include "Message.h"
#include "Port.h"
#include "Memory.h"
+#include "Multicast.h"
=20
Network network;
=20
@@ -293,7 +294,7 @@
=20
if ((inScope(destproc,tipc_ownAddress)) || msg_short(msg))
{
- if (msg_isdata(msg))
+ if (msg_isdata(msg)||(msg_user(msg) =3D=3D MULTICAST_PROTOCOL))
{
if (msg_destport(msg))
{
Index: TIPC_SCC/src/Reference.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: =
/cvsroot/tipc/source/stable_ericsson/TIPC_SCC/src/Reference.c,v
retrieving revision 1.1
diff -c -u -r1.1 Reference.c
--- TIPC_SCC/src/Reference.c 4 Nov 2003 18:23:38 -0000 1.1
+++ TIPC_SCC/src/Reference.c 21 Nov 2003 07:49:01 -0000
@@ -66,6 +66,7 @@
#include "Reference.h"
#include "Memory.h"
#include "Debug.h"
+#include <Port.h>
=20
ReferenceTable refTable;
=20
@@ -141,3 +142,53 @@
/* if (!refcnt--%100) printf("Disc ref count =3D %u\n",refcnt);
*/
}
+
+
+#define TIPC_ADDRPRINT(proc) =
addr_zone(proc),addr_subnet(proc),addr_proc(proc)
+
+int ref_get_info(char *buffer, char **start, off_t offset, int length)
+{
+ int len =3D 0;
+ uint i;
+ Reference *entry;
+ Port *port;
+ TipcPort *tp;
+ //TipcMessage *phdr;
+ =20
+ len +=3D sprintf(buffer + len, "seq laddr lport faddr fport connected =
published\n"); =20
+ for(i =3D 0;i < refTable.indexMask; i++)
+// for(i =3D 1;i < 4; i++)
+ {
+ entry =3D &(refTable.entries[i]);
+ port =3D entry->object;
+ if (port)
+ {
+ tp =3D (TipcPort*)port;
+ len +=3D sprintf(buffer + len, "%d %d.%d.%d %X %d.%d.%d %X %d %d\n",
+ i,=20
+ TIPC_ADDRPRINT(port_ownproc(tp)),
+ entry->data.reference,
+ TIPC_ADDRPRINT(port_peerproc(tp)),
+ port_peerport(tp),
+ tp->connected,=20
+ tp->published
+ ); =20
+ }
+ =20
+ }
+=20
+ if (offset >=3D len)
+ {
+ *start =3D buffer;
+ return 0;
+ }
+ *start =3D buffer + offset;
+ len -=3D offset;
+ if (len > length)
+ len =3D length;
+ if (len < 0)
+ len =3D 0;
+ return len;
+
+}
+
Index: TipcLinuxModAdaptation_SCC/src/socket_adaptation.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: =
/cvsroot/tipc/source/stable_ericsson/TipcLinuxModAdaptation_SCC/src/socke=
t_adaptation.c,v
retrieving revision 1.1
diff -c -u -r1.1 socket_adaptation.c
--- TipcLinuxModAdaptation_SCC/src/socket_adaptation.c 4 Nov 2003 =
18:21:34 -0000 1.1
+++ TipcLinuxModAdaptation_SCC/src/socket_adaptation.c 21 Nov 2003 =
07:49:02 -0000
@@ -97,6 +97,7 @@
#include <tipc_adaptation.h>
#include <tipc.h>
#include "tipc_adaptation_locks.h"
+#include "../../TIPC_SCC/src/Multicast.h"
=20
uint tipc_inqueueSize =3D 0;
extern int disable_overload_protection;
@@ -559,6 +560,9 @@
if (destaddr->addrtype =3D=3D TIPC_ADDR_NAME)
{
res =3D tipc_sendBuf_named(argv);
+ } else if (destaddr->addrtype =3D=3D TIPC_ADDR_MCAST)
+ {
+ res =3D tipc_sendBuf_mcast(argv);
}
else if (destaddr->addrtype =3D=3D TIPC_ADDR_ID)
{
Index: TipcLinuxModAdaptation_SCC/src/tipc_start.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: =
/cvsroot/tipc/source/stable_ericsson/TipcLinuxModAdaptation_SCC/src/tipc_=
start.c,v
retrieving revision 1.1
diff -c -u -r1.1 tipc_start.c
--- TipcLinuxModAdaptation_SCC/src/tipc_start.c 4 Nov 2003 18:21:34 =
-0000 1.1
+++ TipcLinuxModAdaptation_SCC/src/tipc_start.c 21 Nov 2003 07:49:02 =
-0000
@@ -161,13 +161,13 @@
#endif
user_grab_lock();
=
tipc_managercalls.start(addr_create(zone,subnetwork,processor),max_ports,=
htonl(tsc), management);
- ethernetAdaptationStart(eth);
- socketAdaptationStart();
+ ethernetAdaptationStart(eth);=20
// printf3("calling procFileSystemStart ...\n");
- // procFileSystemStart();
printf3("calling udpAdaptationStart ...\n");
udpAdaptationStart(udp);
- user_release_lock();
+ user_release_lock(); =20
+ procFileSystemStart();
+ socketAdaptationStart();
return 0;
}
=20
@@ -183,7 +183,7 @@
{
socketAdaptationStop();
// ethernetAdaptationStop();
- // procFileSystemStop();
+ procFileSystemStop();
{
char bearers[256];
char* tail =3D bearers;
|
|
From: Guo, M. <mi...@in...> - 2003-11-21 08:06:42
|
Hi, Jon=20
Below is the multicast patch against tipc stable_ericsson version.
But, we encountered a critical bug in kernel 2.6.0-test9, when we =
insmod=20
the stable_ericssion version tipc.ko, the system will crash and hang =
there.Here, the bug
exists in the tipc stable_ericssion version without our patch or with =
our patch applied.
the strip outputs are=20
kfree_skb + 0x50/0xc0
packet_rcv_spkt+ 0xc5/0x270
netif_receive_skb + 0x163/0x1a0
process_backlog + 0x6d/0x100=20
net_rx_action + 0x74/0x110
...............................
In the patch , I also integrated Xiaofeng's proc patch, which can =
record the link and=20
port information in proc file system.
Any comments are welcome!
Thanks
Guo Min
=20
----------------------------------------------TIPC multicast and =
proc patch -----------------------------------------------
Index: TIPC_SCC/src/Link.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/tipc/source/stable_ericsson/TIPC_SCC/src/Link.c,v
retrieving revision 1.1
diff -c -u -r1.1 Link.c
--- TIPC_SCC/src/Link.c 4 Nov 2003 18:23:37 -0000 1.1
+++ TIPC_SCC/src/Link.c 21 Nov 2003 07:49:00 -0000
@@ -133,6 +133,7 @@
#include "Bearer.h"
#include "Memory.h"
#include "NameTable.h"
+#include "Multicast.h"
=20
/* Limits for send queue: */
=20
@@ -1537,9 +1538,39 @@
}=20
else if (dproc =3D=3D tipc_ownAddress)=20
{ =20
- Port* port =3D port_deref(msg_destport(msg));
- if (!port) port_rejectMsg(buf,tipc_no_remote_port);
- else {port_dispatch(port,buf);}
+ Port *port; =20
+ int find =3D false;
+ if (msg_user(msg) =3D=3D MULTICAST_PROTOCOL){
+ struct mc_identity *phead=3DNULL, *p_list =3D NULL; =20
+ TipcBuffer* copybuf;
+ =
nametbl_mc_translate(msg_Nameseqtype(msg),msg_lower(msg),msg_upper(msg), =
&phead);
+ p_list =3D phead;=20
+ while(p_list !=3D NULL)
+ {
+ if(p_list->processor =3D=3D tipc_ownAddress)
+ {
+ port =3D port_deref(p_list ->port);
+ copybuf =3D buf_clone(buf, NULL);
+ msg_setuser(buf_msg(copybuf), 0);
+ msg_setDestport(buf_msg(copybuf), p_list ->port);
+ if (port)
+ {
+ find =3D true;
+ port_dispatch(port, copybuf); =20
+ }
+ }
+ p_list =3D p_list->next; =20
+ }=20
+ buf_discard(buf);
+ free_mclist(phead);
+ =20
+ if (find =3D=3D false)
+ port_rejectMsg(buf,tipc_no_remote_port);
+ } else { =20
+ Port* port =3D port_deref(msg_destport(msg));
+ if (!port) port_rejectMsg(buf,tipc_no_remote_port);
+ else {port_dispatch(port,buf);}
+ }
}=20
else /* No subnet local link. Extend lookup scope: */
{=20
@@ -2232,6 +2263,29 @@
this->checkpoint =3D NOT_A_SEQNO;
link_protocolDataInd(this,buf);
continue;=20
+ }
+ else if (msg_user(msg) =3D=3D MULTICAST_PROTOCOL)
+ {
+ struct mc_identity *phead=3DNULL, *p_list =3D NULL; =20
+ TipcBuffer* copybuf;
+ =
nametbl_mc_translate(msg_Nameseqtype(msg),msg_lower(msg),msg_upper(msg), =
&phead);
+ p_list =3D phead;=20
+ while(p_list !=3D NULL)
+ {
+ if(p_list->processor =3D=3D tipc_ownAddress)
+ {
+ Port* port =3D port_deref(p_list ->port);
+ copybuf =3D buf_clone(buf, NULL);
+ msg_setuser(buf_msg(copybuf), 0)
+ msg_setDestport(buf_msg(copybuf), p_list ->port);
+ if (port)
+ port_dispatch(port, copybuf); =20
+ }
+ p_list =3D p_list->next;
+ =20
+ }=20
+ buf_discard(buf);
+ free_mclist(phead);
}
else=20
{
Index: TIPC_SCC/src/NameTable.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: =
/cvsroot/tipc/source/stable_ericsson/TIPC_SCC/src/NameTable.c,v
retrieving revision 1.1
diff -c -u -r1.1 NameTable.c
--- TIPC_SCC/src/NameTable.c 4 Nov 2003 18:23:38 -0000 1.1
+++ TIPC_SCC/src/NameTable.c 21 Nov 2003 07:49:01 -0000
@@ -108,6 +108,7 @@
#include "NameSubscription.h"
#include "Port.h"
#include "Memory.h"
+#include "Multicast.h"
=20
/* ////////////////// Private: //////////////////////////////// */
void nametbl_dump(void);
@@ -782,6 +783,57 @@
return publ->port; =20
}
=20
+//////////////////////////////////////////////////////////////////
+boolean nametbl_mc_translate(uint type,
+ uint lower,uint upper,mc_identity** =
mc_idenitity_list)
+{
+ NameSequence* seq;=20
+ int i =3D 0;=20
+ Publication* publ;
+ SubSequence* sseqs;
+ int low_seq, high_seq;
+ uint destport;
+ tipc_address_t destprocessor;
+ =20
+ nametbl_findNameSequence(type,seq);=20
+ if (!seq) return false;
+ =20
+ sseqs =3D subseq_get(seq->subseqPool,seq->subseqIndex);
+ if(!sseqs) return false;
+ =20
+ nameseq_findSubsequence(seq,sseqs,lower,low_seq); =20
+ if (low_seq < 0)
+ low_seq =3D low_seq < 0 ? ~low_seq : low_seq;
+
+ nameseq_findSubsequence(seq,sseqs,upper,high_seq);=20
+ if (high_seq < 0)
+ high_seq =3D high_seq < 0 ? ((~high_seq) -1): high_seq;
+ =20
+ if (high_seq < low_seq)
+ return false;
+ =20
+ i =3D low_seq;
+ =20
+ for (i =3D low_seq ; i <=3D high_seq; i++)
+ {
+ publ =3D sseqs[i].preferred;=20
+ if (!publ) =20
+ { =20
+ publ =3D sseqs[i].loadshared;=20
+ sseqs[i].loadshared =3D publ->next;=20
+ }=20
+ assert(publ);=20
+ destprocessor =3D publ->processor;=20
+ destport =3D publ->port;
+ if (destport){
+ if ( false =3D=3D =
add_to_mc_indenity_list(mc_idenitity_list,destport,destprocessor))
+ return false; =20
+ } =20
+ }=20
+ return true;
+}
+
+
/* ////////////////////////////////////////////////// */
=20
Publication* nametbl_publish(uint type,
@@ -1100,3 +1152,71 @@
{
nametbl_list(C,0,0);
}
+
+int tipc_get_info(char *buffer, char **start, off_t offset, int length)
+{
+ int len =3D 0;
+ uint i, j;
+ NameSequence* seq;=20
+ SubSequence* sseqs;
+ Publication* publ;
+ =20
+ len +=3D sprintf(buffer + len, "type low-upper scope:address:port =
[scope:address:port]\n"); =20
+ for(i =3D 0;i < TABLE_SIZE; i++)
+ {
+ seq =3D table.types[i];
+ while ((seq))
+ {
+
+ sseqs =3D subseq_get(seq->subseqPool,seq->subseqIndex);
+ if(!sseqs)=20
+ break;
+ for(j =3D 0; j < (seq->firstFree); j++)
+ {
+ len +=3D sprintf(buffer + len, "%d %d-%d", seq->type, =
sseqs[j].lower, sseqs[j].upper);
+ publ =3D sseqs[j].preferred;=20
+ if (publ !=3D 0)
+ {
+ len +=3D sprintf(buffer + len, " %d:%d.%d.%d:%X", PROCESSOR_SCOPE, =
addr_zone(publ->processor),
+ addr_subnet(publ->processor),
+ addr_proc(publ->processor),
+ publ->port);=20
+
+ }
+ publ =3D sseqs[j].loadshared;
+ if (publ !=3D 0)
+ {
+ do
+ {
+ len +=3D sprintf(buffer + len, " %d:%d.%d.%d:%X", ZONE_SCOPE, =
addr_zone(publ->processor),
+ addr_subnet(publ->processor),
+ addr_proc(publ->processor),
+ publ->port);=20
+ =20
+ publ =3D publ->next;
+ }
+ while (publ !=3D sseqs[j].loadshared);
+ }
+ len +=3D sprintf(buffer + len, "\n");
+ }
+ seq =3D seq->next;
+ }
+ =20
+ }
+=20
+ if (offset >=3D len)
+ {
+ *start =3D buffer;
+ return 0;
+ }
+ *start =3D buffer + offset;
+ len -=3D offset;
+ if (len > length)
+ len =3D length;
+ if (len < 0)
+ len =3D 0;
+ return len;
+
+}
+
+
Index: TIPC_SCC/src/Network.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/tipc/source/stable_ericsson/TIPC_SCC/src/Network.c,v
retrieving revision 1.1
diff -c -u -r1.1 Network.c
--- TIPC_SCC/src/Network.c 4 Nov 2003 18:23:38 -0000 1.1
+++ TIPC_SCC/src/Network.c 21 Nov 2003 07:49:01 -0000
@@ -82,6 +82,7 @@
#include "Message.h"
#include "Port.h"
#include "Memory.h"
+#include "Multicast.h"
=20
Network network;
=20
@@ -293,7 +294,7 @@
=20
if ((inScope(destproc,tipc_ownAddress)) || msg_short(msg))
{
- if (msg_isdata(msg))
+ if (msg_isdata(msg)||(msg_user(msg) =3D=3D MULTICAST_PROTOCOL))
{
if (msg_destport(msg))
{
Index: TIPC_SCC/src/Reference.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: =
/cvsroot/tipc/source/stable_ericsson/TIPC_SCC/src/Reference.c,v
retrieving revision 1.1
diff -c -u -r1.1 Reference.c
--- TIPC_SCC/src/Reference.c 4 Nov 2003 18:23:38 -0000 1.1
+++ TIPC_SCC/src/Reference.c 21 Nov 2003 07:49:01 -0000
@@ -66,6 +66,7 @@
#include "Reference.h"
#include "Memory.h"
#include "Debug.h"
+#include <Port.h>
=20
ReferenceTable refTable;
=20
@@ -141,3 +142,53 @@
/* if (!refcnt--%100) printf("Disc ref count =3D %u\n",refcnt);
*/
}
+
+
+#define TIPC_ADDRPRINT(proc) =
addr_zone(proc),addr_subnet(proc),addr_proc(proc)
+
+int ref_get_info(char *buffer, char **start, off_t offset, int length)
+{
+ int len =3D 0;
+ uint i;
+ Reference *entry;
+ Port *port;
+ TipcPort *tp;
+ //TipcMessage *phdr;
+ =20
+ len +=3D sprintf(buffer + len, "seq laddr lport faddr fport connected =
published\n"); =20
+ for(i =3D 0;i < refTable.indexMask; i++)
+// for(i =3D 1;i < 4; i++)
+ {
+ entry =3D &(refTable.entries[i]);
+ port =3D entry->object;
+ if (port)
+ {
+ tp =3D (TipcPort*)port;
+ len +=3D sprintf(buffer + len, "%d %d.%d.%d %X %d.%d.%d %X %d %d\n",
+ i,=20
+ TIPC_ADDRPRINT(port_ownproc(tp)),
+ entry->data.reference,
+ TIPC_ADDRPRINT(port_peerproc(tp)),
+ port_peerport(tp),
+ tp->connected,=20
+ tp->published
+ ); =20
+ }
+ =20
+ }
+=20
+ if (offset >=3D len)
+ {
+ *start =3D buffer;
+ return 0;
+ }
+ *start =3D buffer + offset;
+ len -=3D offset;
+ if (len > length)
+ len =3D length;
+ if (len < 0)
+ len =3D 0;
+ return len;
+
+}
+
Index: TipcLinuxModAdaptation_SCC/src/socket_adaptation.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: =
/cvsroot/tipc/source/stable_ericsson/TipcLinuxModAdaptation_SCC/src/socke=
t_adaptation.c,v
retrieving revision 1.1
diff -c -u -r1.1 socket_adaptation.c
--- TipcLinuxModAdaptation_SCC/src/socket_adaptation.c 4 Nov 2003 =
18:21:34 -0000 1.1
+++ TipcLinuxModAdaptation_SCC/src/socket_adaptation.c 21 Nov 2003 =
07:49:02 -0000
@@ -97,6 +97,7 @@
#include <tipc_adaptation.h>
#include <tipc.h>
#include "tipc_adaptation_locks.h"
+#include "../../TIPC_SCC/src/Multicast.h"
=20
uint tipc_inqueueSize =3D 0;
extern int disable_overload_protection;
@@ -559,6 +560,9 @@
if (destaddr->addrtype =3D=3D TIPC_ADDR_NAME)
{
res =3D tipc_sendBuf_named(argv);
+ } else if (destaddr->addrtype =3D=3D TIPC_ADDR_MCAST)
+ {
+ res =3D tipc_sendBuf_mcast(argv);
}
else if (destaddr->addrtype =3D=3D TIPC_ADDR_ID)
{
Index: TipcLinuxModAdaptation_SCC/src/tipc_start.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: =
/cvsroot/tipc/source/stable_ericsson/TipcLinuxModAdaptation_SCC/src/tipc_=
start.c,v
retrieving revision 1.1
diff -c -u -r1.1 tipc_start.c
--- TipcLinuxModAdaptation_SCC/src/tipc_start.c 4 Nov 2003 18:21:34 =
-0000 1.1
+++ TipcLinuxModAdaptation_SCC/src/tipc_start.c 21 Nov 2003 07:49:02 =
-0000
@@ -161,13 +161,13 @@
#endif
user_grab_lock();
=
tipc_managercalls.start(addr_create(zone,subnetwork,processor),max_ports,=
htonl(tsc), management);
- ethernetAdaptationStart(eth);
- socketAdaptationStart();
+ ethernetAdaptationStart(eth);=20
// printf3("calling procFileSystemStart ...\n");
- // procFileSystemStart();
printf3("calling udpAdaptationStart ...\n");
udpAdaptationStart(udp);
- user_release_lock();
+ user_release_lock(); =20
+ procFileSystemStart();
+ socketAdaptationStart();
return 0;
}
=20
@@ -183,7 +183,7 @@
{
socketAdaptationStop();
// ethernetAdaptationStop();
- // procFileSystemStop();
+ procFileSystemStop();
{
char bearers[256];
char* tail =3D bearers;
|
|
From: Mark H. <ma...@os...> - 2003-11-20 15:23:58
|
On Wed, 2003-11-19 at 18:39, Guo, Min wrote:
> +#ifdef TIPC_LINUX_2_4
> MOD_INC_USE_COUNT;
> +#else
> + try_module_get(THIS_MODULE);
> +#endif
> sk = sk_alloc_comp(PF_UNIX, GFP_KERNEL, 1); /* a hack to avoid patching the kernel */
> if (!sk) {
> + #ifdef TIPC_LINUX_2_4
> MOD_DEC_USE_COUNT;
> + #else
> + module_put(THIS_MODULE);
> + #endif
....
> + #ifdef TIPC_LINUX_2_4
> + MOD_DEC_USE_COUNT;
> + #else
> + module_put(THIS_MODULE);
>
If you are fixing the 2.5+ module ref counting, you need to get rid of
the try_module_get and module_put calls. Set the owner field in the
proto_ops and net_proto_family to THIS_MODULE and let the networking
code take care of ref counting.
Mark.
--
Mark Haverkamp <ma...@os...>
|
|
From: Guo, M. <mi...@in...> - 2003-11-20 02:41:04
|
RCS file: =
/home/cvs/develop/tipc/TipcLinuxModAdaptation_SCC/src/socket_adaptation.c=
,v
retrieving revision 1.5
diff -u -r1.5 socket_adaptation.c
--- src/socket_adaptation.c 18 Nov 2003 07:49:50 -0000 1.5
+++ src/socket_adaptation.c 20 Nov 2003 02:40:56 -0000
@@ -247,11 +247,19 @@
user_release_lock();
if (tipcsk) {
sock->state =3D SS_UNCONNECTED;
- sock->ops =3D &tipc_sk_packet_ops;
+ sock->ops =3D &tipc_sk_packet_ops;
+#ifdef TIPC_LINUX_2_4
MOD_INC_USE_COUNT;
+#else
+ try_module_get(THIS_MODULE);
+#endif
sk =3D sk_alloc_comp(PF_UNIX, GFP_KERNEL, 1); /* a hack to avoid =
patching the kernel */
if (!sk) {
+ #ifdef TIPC_LINUX_2_4
MOD_DEC_USE_COUNT;
+ #else
+ module_put(THIS_MODULE);
+ #endif
return -ENOMEM;
}
sock_init_data(sock,sk);
@@ -330,7 +338,11 @@
user_release_lock();
sk_free(sk);
tipc_release_sock_lock(tipcsk);
- MOD_DEC_USE_COUNT;
+ #ifdef TIPC_LINUX_2_4
+ MOD_DEC_USE_COUNT;
+ #else
+ module_put(THIS_MODULE);
|
|
From: Ling, X. <xia...@in...> - 2003-11-19 10:30:30
|
The patch add an interface "/proc/net/tipc_nametable" eg: #cat /proc/net/tipc_nametable type low-upper scope:address:port [scope:address:port] 0 16781323-16781323 2:1.1.11:9AB4C001 0 16781331-16781331 0:1.1.19:EDD52001 1 300-306 2:1.1.11:9AB4C001 0:1.1.19:EDD52001 1000 0-99 0:1.1.19:EDD5200C 17772 0-99 0:1.1.11:9AB4C00D 17772 200-300 0:1.1.11:9AB4C00C 17772 400-500 0:1.1.11:9AB4C00E |
|
From: Ling, X. <xia...@in...> - 2003-11-19 01:23:50
|
Yes, currently, the sending errors are ignored, one destine failure does = not affect others and also is not reported. Error handlering still needs to be enhanced. -----Original Message----- From: osd...@li... = [mailto:osd...@li...] On Behalf Of Mark = Haverkamp Sent: 2003?11?19? 1:01 To: Guo, Min Cc: tipc mailing list; Jon Maloy Subject: Re: [Osdlcluster-tipc] tipc multicast support patch = againsttipc-1.01 It looks like this does multicast by copying the message and sending it to all the destinations. What kind of testing have you done? If one of the machines being sent to fails, do the other machines still receive the messages? Mark. --=20 Mark Haverkamp <ma...@os...> ------------------------------------------------------- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=3Dmm/g22lp.tmp= l _______________________________________________ Osdlcluster-tipc mailing list Osd...@li... https://lists.sourceforge.net/lists/listinfo/osdlcluster-tipc |
|
From: Guo, M. <mi...@in...> - 2003-11-19 01:11:38
|
//see some idea got from Jon.
Example 1: A TIPC_NAME_SEQ with e.g. (type=3DX,lower=3DY,upper=3DY)=20
would end up in all ports having published a =
sequence covering=20
<X,Y>.
Example 2: A TIPC_NAME_SEQ with e.g. =
(type=3DX,lower=3D0,upper=3D0xffffffff)=20
should end up in all ports having published anything =
of type X, i.e. it
covers all possible ranges.
Example 3: A TIPC_NAME_SEQ with e.g. (type=3DX,lower=3D17,upper=3D200)=20
should end up in all ports having published a =
sequence fully or partially
covering this range, e.g. <X,0,18> , =
<X,55,78>,<X,190,300>, but not
any port bound to e.g. <X,301,500>
This means that joining a multicast group is no different from binding a =
port
to a name sequence as we do it now. The only difference is the policy=20
determined by the sender:
Instead of sending to one port covering the requested <type,instance>, =
he may now
decide to send his message to all ports totally or partially covering =
the <type,lower,upper>
range he decides.
-------------------------------------------------------------------------=
-------------------------------------------------------------------------=
------------------
Yes, currently ,the start point is send each copy of buf to the =
processors in our mc_identity list(the list includes the=20
tipc processors and ports that belongs to the multicast group).In the =
each *RECV* part, the *RECV* machine node=20
will replicate the buf to their own different ports that belong to the =
multicast group.
BUT, for the multi-cast message ,the user type has been changed to =
MULTICAST_PROTOCOL, and the TIPC header has=20
been changed, More see the function tipc_build_mcast_header.
The next step, we can map the TIPC_MULTICAST address to Ethernet =
broadcast address, so we can use the broadcast scheme to=20
complete the multicast in the same local network.
your comments are appreciated!
-------------------------------------------------------------------------=
-------------------------------------------------------------------------=
----------------------------
We have tested it using our local network.It works correctly for us.
Three machines
1. PC(kgdb +2.4.20)
2. PC(2.5.73)
3. PC(2.6.0-test9)=20
the following nctipc.c is our test program,=20
For the client ,you can run it as
./nctipc -o 100 -h 1000 -m
For the server,you can run it as
./nctipc -o 100 -h 120 -lu
Here, the server can be run in different machines including local host, =
make sure the port is different.=20
> -----Original Message-----
> From: Mark Haverkamp [mailto:ma...@os...]
> Sent: Wednesday, November 19, 2003 1:01 AM
> To: Guo, Min
> Cc: tipc mailing list; Jon Maloy
> Subject: Re: [Osdlcluster-tipc] tipc multicast support patch=20
> againsttipc-1.01
>=20
>=20
> It looks like this does multicast by copying the message and=20
> sending it
> to all the destinations. What kind of testing have you done?=20
> If one of
> the machines being sent to fails, do the other machines still receive
> the messages?
>=20
> Mark.
>=20
> --=20
> Mark Haverkamp <ma...@os...>
>=20
>=20
|
|
From: Mark H. <ma...@os...> - 2003-11-18 17:01:10
|
It looks like this does multicast by copying the message and sending it to all the destinations. What kind of testing have you done? If one of the machines being sent to fails, do the other machines still receive the messages? Mark. -- Mark Haverkamp <ma...@os...> |
|
From: Guo, M. <mi...@in...> - 2003-11-18 08:58:39
|
diff -Naur tipc-1.01/TipcLinuxModAdaptation_SCC/src/socket_adaptation.c =
tipc/TipcLinuxModAdaptation_SCC/src/socket_adaptation.c
--- tipc-1.01/TipcLinuxModAdaptation_SCC/src/socket_adaptation.c =
2003-09-25 21:10:02.000000000 +0800
+++ tipc/TipcLinuxModAdaptation_SCC/src/socket_adaptation.c 2003-11-18 =
16:47:34.228290616 +0800
@@ -89,6 +98,7 @@
#include <tipc_adaptation.h>
#include <tipc.h>
#include "tipc_adaptation_locks.h"
+#include "../../TIPC_SCC/src/Multicast.h"
=20
uint tipc_inqueueSize =3D 0;
=20
@@ -550,6 +561,9 @@
if (destaddr->addrtype =3D=3D TIPC_ADDR_NAME)
{
res =3D tipc_sendBuf_named(argv);
+ }else if (destaddr->addrtype =3D=3D TIPC_ADDR_MCAST)
+ {
+ res =3D tipc_sendBuf_mcast(argv);
}
else if (destaddr->addrtype =3D=3D TIPC_ADDR_ID)
{
diff -Naur tipc-1.01/TIPC_SCC/src/Link.c tipc/TIPC_SCC/src/Link.c
--- tipc-1.01/TIPC_SCC/src/Link.c 2003-09-25 05:56:06.000000000 +0800
+++ tipc/TIPC_SCC/src/Link.c 2003-11-18 15:19:47.000000000 +0800
@@ -119,8 +146,10 @@
#include "Bearer.h"
#include "Memory.h"
#include "NameTable.h"
+#include "Multicast.h"
=20
/* Limits for send queue: */
=20
#define ROUTED_LIMIT 500u
#define QUEUE_LIMIT (ROUTED_LIMIT*6)
@@ -1477,7 +1505,7 @@
TipcBuffer* buf =3D argv->buf;
TipcMessage* msg =3D buf_msg(buf);=20
uint dproc =3D argv->dest.id.proc;
- msg_setsize(msg,argv->datasize);=20
+ msg_setsize(msg,argv->datasize); =20
link_selectLocalLink(dproc, argv->origport,this);
check_conditions: =20
if (this)=20
@@ -1513,12 +1541,43 @@
}=20
else if (dproc =3D=3D tipc_ownAddress)=20
{ =20
- Port* port =3D port_deref(msg_destport(msg));
- if (!port) port_rejectMsg(buf,tipc_no_remote_port);
- else {port_dispatch(port,buf);}
+ Port *port; =09
+ int find =3D false;
+ if (msg_user(msg) =3D=3D MULTICAST_PROTOCOL){
+ struct mc_identity *phead=3DNULL, *p_list =3D NULL; =20
+ TipcBuffer* copybuf;
+ =
nametbl_mc_translate(msg_Nameseqtype(msg),msg_lower(msg),msg_upper(msg), =
&phead);
+ p_list =3D phead;=09
+ while(p_list !=3D NULL)
+ {
+ if(p_list->processor =3D=3D tipc_ownAddress)
+ {
+ port =3D port_deref(p_list ->port);
+ copybuf =3D buf_clone(buf, NULL);
+ msg_setuser(buf_msg(copybuf), 0);
+ msg_setDestport(buf_msg(copybuf), p_list ->port);
+ if (port)
+ {
+ find =3D true;
+ port_dispatch(port, copybuf); =09
+ }
+ }
+ p_list =3D p_list->next; =20
+ }=20
+ buf_discard(buf);
+ free_mclist(phead);
+ =09
+ if (find =3D=3D false)
+ port_rejectMsg(buf,tipc_no_remote_port);
+ }else{
+ port =3D port_deref(msg_destport(msg));
+ if (!port) port_rejectMsg(buf,tipc_no_remote_port);
+ else {port_dispatch(port,buf);}
+ } =09
+ =20
}=20
else /* No subnet local link. Extend lookup scope: */
- {=20
+ { =09
this =3D link_select(dproc, argv->origport);
if (this)=20
goto check_conditions;
@@ -2087,6 +2146,7 @@
{
Link* this;
TipcBuffer* head =3D mediaRef->inQueue;
+
if (head) mediaRef->inQueue =3D 0; /* Close this queue */
while (head)
{
@@ -2100,6 +2160,8 @@
uint ack;
uint released =3D 0;
uint exp;
+=09
+ =09
head =3D buf_next(head);
=20
/* First confirm that message has right version : */
@@ -2113,13 +2175,14 @@
ack =3D w1 >> 16;=20
=20
/* Find receiving link object, if any: */
-
- link_find(msg_prevproc(msg),((Bearer*)mediaRef)->identity,this);
- if (!this)=20
- {
- buf_discard(buf);
- continue;
- }
+=09
+ link_find(msg_prevproc(msg),((Bearer*)mediaRef)->identity,this);
+ if (!this)=20
+ {
+ buf_discard(buf);
+ continue;
+ }
+=09
=20
/* Release acked messages, while avoiding unecessary memory =
accesses */
=20
@@ -2207,6 +2270,29 @@
link_protocolDataInd(this,buf);
continue;=20
}
+ else if (msg_user(msg) =3D=3D MULTICAST_PROTOCOL)
+ {
+ struct mc_identity *phead=3DNULL, *p_list =3D NULL; =20
+ TipcBuffer* copybuf;
+ =
nametbl_mc_translate(msg_Nameseqtype(msg),msg_lower(msg),msg_upper(msg), =
&phead);
+ p_list =3D phead;=09
+ while(p_list !=3D NULL)
+ {
+ if(p_list->processor =3D=3D tipc_ownAddress)
+ {
+ Port* port =3D port_deref(p_list ->port);
+ copybuf =3D buf_clone(buf, NULL);
+ msg_setuser(buf_msg(copybuf), 0)
+ msg_setDestport(buf_msg(copybuf), p_list ->port);
+ if (port)
+ port_dispatch(port, copybuf); =09
+ }
+ p_list =3D p_list->next;
+ =20
+ }=20
+ buf_discard(buf);
+ free_mclist(phead);
+ }
else=20
{
msg_print2(msg,"<<< SPEC: "); =20
@@ -2610,7 +2696,6 @@
link_changeoverDataInd(buf);
break;
}
-
default:
{
msg_print1(buf_msg(buf),"Throwing away unrecognizable =
message\n");
diff -Naur tipc-1.01/TIPC_SCC/src/Multicast.c =
tipc/TIPC_SCC/src/Multicast.c
--- tipc-1.01/TIPC_SCC/src/Multicast.c 1970-01-01 08:00:00.000000000 =
+0800
+++ tipc/TIPC_SCC/src/Multicast.c 2003-11-18 16:37:23.826085856 +0800
@@ -0,0 +1,209 @@
+#include <tipc_adaptation.h>
+#include "Debug.h"
+#include "NameTable.h"
+#include "NameDistributor.h"
+#include "Address.h"
+#include "NetworkSubscription.h"
+#include "NameSubscription.h"
+#include "Port.h"
+#include "Memory.h"
+#include "Multicast.h"
+#include "Bearer.h"
+
+
+/*=20
+ judge whether desport and destprocessor in the existed =
mc_identity_list
+*/
+boolean in_list(mc_identity* mc_idenitity_list,uint destport, =
tipc_address_t destprocessor)
+{
+ mc_identity* p_list;
+ p_list =3D mc_idenitity_list;
+ while(p_list !=3D NULL)
+ {
+ if((p_list ->port =3D=3D destport) && (p_list->processor =3D=3D =
destprocessor))
+ return true;
+ p_list =3D p_list->next;
+ }
+ if(p_list =3D=3D NULL)
+ return false;
+=09
+}
+/*=20
+ Add the desport and destprocessor to the existed mc_identity_list
+*/
+
+boolean add_to_mc_indenity_list(mc_identity** mc_idenitity_list,uint =
destport,tipc_address_t destprocessor)
+{
+ struct mc_identity *mc_list, *p, *prev;
+ int size =3D sizeof (struct mc_identity);
+
+ mc_list =3D (mc_identity*)mem_alloc(size);
+ if (mc_list =3D=3D NULL)
+ return false;
+=09
+ mc_list->port =3D destport;
+ mc_list->processor =3D destprocessor;=09
+ mc_list->next =3D NULL;
+
+ if (NULL =3D=3D *mc_idenitity_list)
+ *mc_idenitity_list =3D mc_list;=09
+ else {=09
+ p =3D *mc_idenitity_list;
+ prev =3D NULL;
+ while(p && (p->processor < destprocessor))
+ {
+ prev =3D p;
+ p=3D p->next;
+ }
+ mc_list->next =3D p;=09
+ if(prev)
+ prev->next=3Dmc_list;
+ else
+ *mc_idenitity_list =3D mc_list;
+ }
+ return true;
+}
+
+/*=20
+ Remove the desport and destprocessor from the existed mc_identity_list
+*/
+
+boolean remove_from_mc_idenity_list(mc_identity** =
mc_idenitity_list,uint destport,tipc_address_t destprocessor)
+{
+ struct mc_identity *p_list,*pre_list;
+
+ if (*mc_idenitity_list =3D=3D NULL)
+ return false;
+=09
+ p_list =3D *mc_idenitity_list;
+ pre_list =3D*mc_idenitity_list;
+ while(p_list !=3D NULL)
+ { =09
+ if((p_list ->port =3D=3D destport) && (p_list->processor =3D=3D =
destprocessor))
+ {
+ pre_list->next =3D p_list->next;
+ mem_free((char*)p_list);
+ return true;
+ } =09
+ pre_list =3D p_list;=09
+ p_list =3D p_list->next;
+ }=09
+ return false;
+}
+/*
+ free mc_identity list
+*/
+
+void free_mclist(mc_identity *mc_list)
+{
+ mc_identity *p=3DNULL,*del=3DNULL;
+
+ p =3D mc_list;
+ while(p !=3D NULL)
+ {=09
+ del=3Dp;
+ p =3D p->next; =09
+ mem_free((char*)del);
+ }
+}
+/*
+ Name: tipc_build_mcast_header
+ Function: Pre-builds direct header in Port's header=20
+ area.=20
+ Called internally by TIPC and by user.
+ Input: dest_addr - Direct address (processor=20
+ & Port Id) of destination port
+ orig_port - Originating port
+ Result: Returns size of header in octets.p_hdr=20
+ contains pointer to built header.
+*/
+
+uint tipc_build_mcast_header(const TipcSendAddr* dest_addr,=20
+ uint orig_port, uchar** =
p_hdr,mc_identity** mc_id)
+{
+ Port* op =3D port_deref(orig_port);
+ TipcMessage* phdr;
+ tipc_address_t dproc;
+
+=09
+ if (!op || port_connected(op)) return 0;
+ phdr =3D port_phdr(op);
+ dproc =3D dest_addr->name.translationNode;
+ if (dproc && (dproc < 512)) dproc<<=3D24; /* Undocumented feature */
+
+ msg_setNameseqtype (phdr, dest_addr->nameseq.type);
+ msg_setNameseqlower (phdr, dest_addr->nameseq.lower);
+ msg_setNamesequpper (phdr, dest_addr->nameseq.upper);
+ msg_sethsize (phdr, MCAST_H_SIZE);
+ msg_settype (phdr, TIPC_MCAST_MSG);
+ msg_setuser(phdr,MULTICAST_PROTOCOL);
+ nametbl_mc_translate(dest_addr->nameseq.type,
+ =
dest_addr->nameseq.lower,dest_addr->nameseq.upper,
+ mc_id); =20
+ msg_setDestproc(phdr, TIPC_BCAST_ADDR);
+ *p_hdr =3D (uchar*) phdr;=20
+ return MCAST_H_SIZE ;
+}
+
+/*
+ Name: tipc_sendBuf_mcast
+ Function: Sends named message to mcast group port.=09
+ Input: argv - Send arguments include destination port name=20
+ address, originating port reference,buffer.
+ Result: Returns tipc_congestion if sending queue is full,=20
+ otherwise returns tipc_ok.
+*/
+
+tipc_return_value tipc_sendBuf_mcast(TipcSendBufArgv* argv)
+{
+ TipcMessage* phdr;
+ tipc_address_t prevdestproc;
+ struct mc_identity *s_list =3D NULL,*p_list=3DNULL;=20
+=09
+ uint hdr_sz =3D tipc_build_mcast_header (&argv->dest,=20
+ argv->origport,
+ (uchar**)&phdr,
+ &s_list);
+ buf_cprepend(argv->buf,(uchar*)phdr,hdr_sz);
+ if (s_list =3D=3D NULL)
+ {
+ port_rejectMsg(argv->buf,tipc_no_portname);
+ return tipc_ok;
+ }
+
+ if (!hdr_sz || (argv->datasize > TIPC_MAX_DATA_SIZE))
+ return tipc_userError(tipc_invalid_args);=20
+
+ argv->datasize+=3Dhdr_sz;
+ {
+ p_list =3D s_list;
+ prevdestproc =3D 0;
+ TipcSendBufArgv tempargv;
+ TipcBuffer* copybuf;
+ =09
+ tempargv =3D *argv; =09
+ while( p_list !=3D NULL)
+ {
+ if(prevdestproc !=3D p_list->processor)
+ {
+ prevdestproc =3D p_list->processor;
+ tempargv.dest.id.proc =3D prevdestproc;
+ =09
+ user_grab_lock();
+ copybuf =3D buf_acquire(argv->datasize);
+ user_release_lock(); =09
+ memcpy(buf_data(copybuf), buf_data(argv->buf), argv->datasize); =09
+ tempargv.buf =3D copybuf;
+ tipc_sendBuf(&tempargv);
+ }
+ p_list=3Dp_list->next;
+ }
+ buf_discard(argv->buf);
+ free_mclist(s_list);
+ }
+ return tipc_ok;
+
+}
+
+
+
diff -Naur tipc-1.01/TIPC_SCC/src/Multicast.h =
tipc/TIPC_SCC/src/Multicast.h
--- tipc-1.01/TIPC_SCC/src/Multicast.h 1970-01-01 08:00:00.000000000 =
+0800
+++ tipc/TIPC_SCC/src/Multicast.h 2003-11-18 15:19:47.000000000 +0800
@@ -0,0 +1,46 @@
+#ifndef Mcast__h
+#define Mcast__h
+#include <tipc_adaptation.h>
+#include "Address.h"
+#include "Debug.h"
+#include "Message.h"
+
+#define TRUE 0
+#define FALSE 1
+
+#define TIPC_BCAST_ADDR 0
+#define TIPC_MCAST_PORT 0
+#define MCAST_H_SIZE 40u
+
+#define TIPC_ADDR_MCAST TIPC_ADDR_NAMESEQ
+#define TIPC_MCAST_MSG (2u<<28)
+#define MULTICAST_PROTOCOL (12u << 25)
+
+#define msg_setNameseqtype(M,N) {msg_setw((M),4,(N));}
+#define msg_setNameseqlower(M,N) {msg_setw((M),8,(N));}
+#define msg_setNamesequpper(M,N) {msg_setw((M),9,(N));}
+
+#define msg_Nameseqtype(M) (msg_w((M),4))
+#define msg_lower(M) (msg_w((M),8))
+#define msg_upper(M) (msg_w((M),9))
+
+
+typedef struct mc_identity
+{
+ uint port;
+ tipc_address_t processor;
+ struct mc_identity *next;=09
+}mc_identity;
+
+typedef struct port_list{
+ uint port;
+ struct port_list *next;
+}port_list;
+
+tipc_return_value tipc_sendBuf_mcast(TipcSendBufArgv* argv);
+boolean nametbl_mc_translate(uint type,uint lower,uint =
upper,mc_identity** mc_idenitity_list);
+boolean build_port_list(mc_identity* mc_idenitity_list,port_list =
*p_list);
+boolean add_to_mc_indenity_list(mc_identity** mc_idenitity_list,uint =
destport,tipc_address_t destprocessor);
+void free_mclist(mc_identity *mc_list);
+#endif
+
diff -Naur tipc-1.01/TIPC_SCC/src/NameTable.c =
tipc/TIPC_SCC/src/NameTable.c
--- tipc-1.01/TIPC_SCC/src/NameTable.c 2003-09-25 05:56:06.000000000 =
+0800
+++ tipc/TIPC_SCC/src/NameTable.c 2003-11-18 15:19:47.000000000 +0800
@@ -97,6 +103,7 @@
#include "NameSubscription.h"
#include "Port.h"
#include "Memory.h"
+#include "Multicast.h"
=20
/* ////////////////// Private: //////////////////////////////// */
void nametbl_dump(void);
@@ -771,6 +778,56 @@
return publ->port; =20
}
=20
+//////////////////////////////////////////////////////////////////
+boolean nametbl_mc_translate(uint type,
+ uint lower,uint upper,mc_identity** =
mc_idenitity_list)
+{
+ NameSequence* seq;=20
+ int i =3D 0;=20
+ Publication* publ;
+ SubSequence* sseqs;
+ int low_seq, high_seq;
+ uint destport;
+ tipc_address_t destprocessor;
+ =20
+ nametbl_findNameSequence(type,seq);=20
+ if (!seq) return false;
+ =20
+ sseqs =3D subseq_get(seq->subseqPool,seq->subseqIndex);
+ if(!sseqs) return false;
+ =20
+ nameseq_findSubsequence(seq,sseqs,lower,low_seq); =20
+ if (low_seq < 0)
+ low_seq =3D low_seq < 0 ? ~low_seq : low_seq;
+
+ nameseq_findSubsequence(seq,sseqs,upper,high_seq);=20
+ if (high_seq < 0)
+ high_seq =3D high_seq < 0 ? ((~high_seq) -1): high_seq;
+ =20
+ if (high_seq < low_seq)
+ return false;
+ =20
+ i =3D low_seq;
+ =20
+ for (i =3D low_seq ; i <=3D high_seq; i++)
+ {
+ publ =3D sseqs[i].preferred;=20
+ if (!publ) =20
+ { =20
+ publ =3D sseqs[i].loadshared;=20
+ sseqs[i].loadshared =3D publ->next;=20
+ }=20
+ assert(publ);=20
+ destprocessor =3D publ->processor;=20
+ destport =3D publ->port;
+ if (destport){
+ if ( false =3D=3D =
add_to_mc_indenity_list(mc_idenitity_list,destport,destprocessor))
+ return false; =09
+ } =09
+ }=09
+ return true;
+}
+
/* ////////////////////////////////////////////////// */
=20
Publication* nametbl_publish(uint type,
diff -Naur tipc-1.01/TIPC_SCC/src/Network.c tipc/TIPC_SCC/src/Network.c
--- tipc-1.01/TIPC_SCC/src/Network.c 2003-09-25 05:56:06.000000000 +0800
+++ tipc/TIPC_SCC/src/Network.c 2003-11-12 16:23:30.000000000 +0800
@@ -74,6 +86,7 @@
#include "Message.h"
#include "Port.h"
#include "Memory.h"
+#include "Multicast.h"
=20
Network network;
=20
@@ -280,12 +293,13 @@
msg_print2(msg,"Routing: ");
if (!msg_short(msg))msg_incrRerouteCount(msg); =20
destproc =3D msg_short(msg)?tipc_ownAddress:msg_destproc(msg);
+ =20
=20
/* Is the message for this processor ? */
=20
if ((inScope(destproc,tipc_ownAddress)) || msg_short(msg))
{
- if (msg_isdata(msg))
+ if (msg_isdata(msg)||(msg_user(msg) =3D=3D MULTICAST_PROTOCOL))
{
if (msg_destport(msg))
{
@@ -301,12 +315,13 @@
{
port_abortSelf(port,tipc_no_remote_port); =
=20
port_rejectMsg(buf,tipc_no_remote_port);
- }
- else {
+ }
+ else
+ {
msg_print1(msg,"Netw: dropping routed msg:\n");=20
buf_discard(buf);
- }
- return;
+ }
+ return;
}
else
{
@@ -374,7 +389,7 @@
printf2("CONN MANAGER\n"); =20
port_protocolDataInd(buf);
return;
- }
+ } =20
else
{
msg_print1(msg,"netw_route:discarding: "); =20
Thanks
Guo Min=20
The content of this email message solely contains my own personal views,
and not those of my employer.
|
|
From: Ling, X. <xia...@in...> - 2003-11-18 08:44:27
|
Index: TipcLinuxModAdaptation_SCC/src/ethernet_adaptation.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: =
/home/cvs/develop/tipc/TipcLinuxModAdaptation_SCC/src/ethernet_adaptation=
.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 ethernet_adaptation.c
--- TipcLinuxModAdaptation_SCC/src/ethernet_adaptation.c 16 Oct 2003 =
08:54:00 -0000 1.1.1.1
+++ TipcLinuxModAdaptation_SCC/src/ethernet_adaptation.c 18 Nov 2003 =
08:44:09 -0000
@@ -124,8 +124,10 @@
struct packet_type config_packet_type;
uint bearerNameNo; /* Remove later */
} eth_bearers[MAX_BEARERS];
- =20
=20
+#if ifndef TIPC_LINUX_2_6_0-test9
+#define af_packet_priv data=20
+#endif
=20
/* /////////////////////////////////////////////////////////////// */
/* Data phase: */
@@ -152,7 +154,7 @@
struct packet_type* pt)
{
TipcBuffer* buf =3D (TipcBuffer*) skb;
- struct EthBearer* b =3D (struct EthBearer*)pt->data;
+ struct EthBearer* b =3D (struct EthBearer*)pt->af_packet_priv;
os_grab_lock();
UD(buf)->pool =3D 0;
UD(buf)->data =3D skb->data;
@@ -202,7 +204,7 @@
struct packet_type* pt)
{
ConfigMsg* msg =3D (ConfigMsg*)skb->data;
- struct EthBearer* b =3D (struct EthBearer*)pt->data;
+ struct EthBearer* b =3D (struct EthBearer*)pt->af_packet_priv;
tipc_bearer_addr* bearer_addr =3D =
(tipc_bearer_addr*)&skb->mac.ethernet->h_source;
tipc_address_t orig =3D =
addr_create(ntohl(msg->zone),ntohl(msg->subnet),
ntohl(msg->processor));
@@ -243,7 +245,7 @@
b->tipc_packet_type.type =3D __constant_htons(TIPC_PROTOCOL);
b->tipc_packet_type.dev =3D dev;
b->tipc_packet_type.func =3D dataInd;
- b->tipc_packet_type.data =3D b;
+ b->tipc_packet_type.af_packet_priv =3D b;
#ifndef TIPC_LINUX_2_4
INIT_LIST_HEAD(&(b->tipc_packet_type.list));
#else
@@ -254,7 +256,7 @@
b->config_packet_type.type =3D __constant_htons(TIPC_CFG_PROTOCOL);
b->config_packet_type.dev =3D dev;
b->config_packet_type.func =3D configDataInd;
- b->config_packet_type.data =3D b;
+ b->config_packet_type.af_packet_priv =3D b;
#ifndef TIPC_LINUX_2_4
INIT_LIST_HEAD(&(b->config_packet_type.list));
#else
|
|
From: Ling, X. <xia...@in...> - 2003-11-06 08:46:23
|
struct packet_type has changed its member name. |
|
From: Mark H. <ma...@os...> - 2003-08-14 16:51:54
|
Jon,
This patch enabled compiling and running on 2.6.0-test3
Mark.
diff -Nru tipc-0.98/TipcLinuxModAdaptation_SCC/src/ethernet_adaptation.c tipc-0.98.new/TipcLinuxModAdaptation_SCC/src/ethernet_adaptation.c
--- tipc-0.98/TipcLinuxModAdaptation_SCC/src/ethernet_adaptation.c 2003-07-16 01:30:14.000000000 -0700
+++ tipc-0.98.new/TipcLinuxModAdaptation_SCC/src/ethernet_adaptation.c 2003-08-14 08:05:40.000000000 -0700
@@ -238,7 +238,7 @@
b->tipc_packet_type.dev = dev;
b->tipc_packet_type.func = dataInd;
b->tipc_packet_type.data = b;
-#ifdef TIPC_LINUX_2_5
+#ifndef TIPC_LINUX_2_4
INIT_LIST_HEAD(&(b->tipc_packet_type.list));
#else
b->tipc_packet_type.next = NULL;
@@ -249,7 +249,7 @@
b->config_packet_type.dev = dev;
b->config_packet_type.func = configDataInd;
b->config_packet_type.data = b;
-#ifdef TIPC_LINUX_2_5
+#ifndef TIPC_LINUX_2_4
INIT_LIST_HEAD(&(b->config_packet_type.list));
#else
b->config_packet_type.next = NULL;
diff -Nru tipc-0.98/TipcLinuxModAdaptation_SCC/src/socket_adaptation.c tipc-0.98.new/TipcLinuxModAdaptation_SCC/src/socket_adaptation.c
--- tipc-0.98/TipcLinuxModAdaptation_SCC/src/socket_adaptation.c 2003-07-16 01:57:16.000000000 -0700
+++ tipc-0.98.new/TipcLinuxModAdaptation_SCC/src/socket_adaptation.c 2003-08-14 08:12:59.000000000 -0700
@@ -194,7 +194,7 @@
/* /////////////////////// Create a TIPC port: //////////////////// */
-#ifndef TIPC_LINUX_2_5
+#ifdef TIPC_LINUX_2_4
#define get_tipc_sock(sock) ((sock)->sk ? (tipc_sock *)(sock)->sk->protinfo.af_unix.other:0)
#define put_tipc_sock(sk, tipcsk) do { (sk)->protinfo.af_unix.other=(struct sock*)(tipcsk); } while(0)
#define sk_alloc_comp(family, priority, size) sk_alloc(family, priority, size)
@@ -239,7 +239,7 @@
return -ENOMEM;
}
sock_init_data(sock,sk);
-#ifndef TIPC_LINUX_2_5
+#ifdef TIPC_LINUX_2_4
sk->family = AF_TIPC;
#else
sk->sk_family = AF_TIPC;
@@ -482,7 +482,7 @@
}
/* ////////////////////// Send message: ////////////////////// */
-#ifndef TIPC_LINUX_2_5
+#ifdef TIPC_LINUX_2_4
static int tipc_sk_sendmsg(struct socket *sock, struct msghdr *m,
int total_len,struct scm_cookie *scm)
#else
@@ -676,7 +676,7 @@
}
/* ////////////////////// Read message to user space: //////////////////// */
-#ifndef TIPC_LINUX_2_5
+#ifdef TIPC_LINUX_2_4
static int tipc_sk_recvmsg(struct socket *sock, struct msghdr *m,
int total_len, int flags,struct scm_cookie *scm)
#else
diff -Nru tipc-0.98/TipcLinuxModAdaptation_SCC/src/tipc_start.c tipc-0.98.new/TipcLinuxModAdaptation_SCC/src/tipc_start.c
--- tipc-0.98/TipcLinuxModAdaptation_SCC/src/tipc_start.c 2003-07-15 08:27:17.000000000 -0700
+++ tipc-0.98.new/TipcLinuxModAdaptation_SCC/src/tipc_start.c 2003-08-14 08:13:48.000000000 -0700
@@ -67,7 +67,7 @@
#include <tipc_adaptation_locks.h>
#include <linux/random.h>
-#ifndef TIPC_LINUX_2_5
+#ifdef TIPC_LINUX_2_4
EXPORT_NO_SYMBOLS;
#endif
diff -Nru tipc-0.98/TipcLinuxModAdaptation_SCC/src/udp_adaptation.c tipc-0.98.new/TipcLinuxModAdaptation_SCC/src/udp_adaptation.c
--- tipc-0.98/TipcLinuxModAdaptation_SCC/src/udp_adaptation.c 2003-07-16 02:11:04.000000000 -0700
+++ tipc-0.98.new/TipcLinuxModAdaptation_SCC/src/udp_adaptation.c 2003-08-14 08:14:05.000000000 -0700
@@ -316,7 +316,7 @@
os_grab_lock();
return false;
}
-#ifndef TIPC_LINUX_2_5
+#ifdef TIPC_LINUX_2_4
bearer.trafficSock->sk->data_ready = dataInd;
bearer.trafficSock->sk->allocation = GFP_ATOMIC;
#else
@@ -343,7 +343,7 @@
return false;
}
sk = bearer.listenerSock->sk;
-#ifndef TIPC_LINUX_2_5
+#ifdef TIPC_LINUX_2_4
sk->data_ready = dataInd;
sk->allocation = GFP_ATOMIC;
#else
--
Mark Haverkamp <ma...@os...>
|
|
From: Mark H. <ma...@os...> - 2003-08-14 16:39:42
|
Available at bk://bitkeeper.osdl.org/tipc/stable -- Mark Haverkamp <ma...@os...> |
|
From: Randy M. <mac...@no...> - 2003-07-11 20:29:42
|
Hi, Thanks for the congestion details. Blocking on congestion is usually the right thing to do. It looks like you haven't implemented NON_BLOCKing send()s. Is that right? Is this a planned feature that I could implement? I suppose one could use the poll interface to avoid blocking. How much of the socket interface makes sense to implement for Tipc? Has anyone run Tipc on PPC linux? I only noticed one x86 asm instruction to get a random port so I don't expect that it's a problem. I'm not considering a mixed clusters. When you think of a device processor - what are the minimum resources it would have? Say > 100 MHz CPU, 16 MB Ram running a stripped down linux os? Or something even smaller? In the excellent Tipc documentation, you might consider putting simpler kernel module insert commands like: Most of the time: /sbin/insmod tipc.o will be sufficient to work on a single desktop. Then add the ethernet binding: /sbin/insmod tipc.o eth0=1 processor=X (BTW, someone told me that zone=0 crashes the system ;-) ) Jon, I may have some more questions... when is your vacation? Thanks, // Randy > > Message: 1 > From: "Jon Maloy (QB/LMC)" <jon...@er...> > To: Paul Jardetzky <pw...@fa...> > Cc: "Jon Maloy (QB/LMC)" <jon...@er...>, > TIPC mailing list > <osd...@li...> > Date: Thu, 10 Jul 2003 12:47:25 -0400 > Subject: [Osdlcluster-tipc] Re: More debugging news > > Hi, > I will try to update my document with this information after my vacatation, > which starts soon. > > About link congestion the story is very simple: I never throw away any > messages. If the link queue limit is hit (it is configurable, but by default > set to 48 packets for messages of importance "low"), the sending > process/thread > is put transparently to sleep until the window opens up again, which > normally > happens after a few microseconds. This gives the impression that a > sending "never" fails. > > All messsges are given an importance priority in the range 0-3, set in > the sending > port/socket. Default value is 0 (low). > Messages of priority "low" are subject to the "base queue limit", which > is the same as > the window limit, as configured, or 48. > Messages of priority "medium" (1) are subject to queue limit = (base > queue limit*4/3) . > If the send queue is beyond window limit, but below the calculated > queue limit, > the message is queued, but not sent until the window opens up again. The > process > is not blocked in this case. If queue size is beyond calculated queue > limit the process > is temporarily put to sleep, just as with importance zero messages. > Messages of priority "high" (2) and "non_rejectable" (3) are treated the > same way, but are subject > to the queue limits (base queue limit*5/3) and (base queue limit*6/3) > respectively. > > For TIPC internal (e.g. name table update) messages, or routed messages, > these limits > are far more generous, in order to not let TIPC have to compete with its > users. > > When it comes to processor overload, incoming messages are also handled > according > to importance priority. Each message is matched against two values before > they are put into the read-queue of a socket. > > The basic value is the "global queue limit", which keeps track of the > number of > queued incoming, but not yet read messages on the whole processor. The > limits here > are 1000 for low importance, 2000 for medium importance, and 10000 for > high and non-rejectable importance. > If an incoming message is connection oriented these thresholds are > multiplied > by four, under the assumption that it has more consequences to tear down a > transaction in progress than to reject it in the setup-phase, which is where > non-connection oriented messages are typically used. > If the upper limit is hit for a message, the message is not thrown > away, but > sent back (i.e. the first 1024 bytes) to the sender along with an error > code. > The importance for the rejected message is raised one step, to reduce the > risk that the rejected message will hit the limit at the return (which > is often at > the same processor). If, despite all this, the rejected message hits the > global limit > for its importance level, the the message is thrown away. > **This is the only situation where a message is thrown away silently, and as > you see it takes a really bad overload situation to en up there.*** > The consequence is also that a "connection abortion" message, which is > both > connection oriented, contains an error code, and has a raised importance > level, > is virtually never thrown away. > > To protect the processor from locally misbehaving applications there is > also a > "local queue limit", keeping track of the number of un-read messages > queued in > each socket. Based on empirical experience the values are here set to > 1/2 of the > global threshold, that is 500, 1000 and 5000 messages respectively. > Otherwise > the algorithm for rejecting and throwing away messages is the same as > described above. > > I hope this gives you the information you need. > > Regards /Jon > > > > Paul Jardetzky wrote: > > >>Ok. I've read and understood your mail. When I get the time, >>I'll make the appropriate changes. They are not hard and don't >>require modifying anything outside the adaptation layer. That >>said, if you decide to make the change for a future release, >>just let me know. >> >>Mostly, I needed to fix this quickly even though we are not >>going to use multiple zones. It is more about the perception >>of TIPC's stability with the other engineers here. They see >>machines crashing (their own desktops unfortunately) and they >>immediately become concerned about building our product on top >>this code. Fast bug fixes and some reassurance is needed to >>develop the required confidence. You know the story ... :). >> >>We have a few solid networking types that need to know TIPCs >>behavior under transient congestion ... e.g. when messages are >>dropped and under what circumstances, window sizes, etc... If >>you have information outside what is already in your document >>(or the code), it will help with convincing folk that it has >>what we need |
|
From: Jon M. (QB/LMC) <jon...@er...> - 2003-07-10 16:52:28
|
Hi, I will try to update my document with this information after my vacatation, which starts soon. About link congestion the story is very simple: I never throw away any messages. If the link queue limit is hit (it is configurable, but by default set to 48 packets for messages of importance "low"), the sending process/thread is put transparently to sleep until the window opens up again, which normally happens after a few microseconds. This gives the impression that a sending "never" fails. All messsges are given an importance priority in the range 0-3, set in the sending port/socket. Default value is 0 (low). Messages of priority "low" are subject to the "base queue limit", which is the same as the window limit, as configured, or 48. Messages of priority "medium" (1) are subject to queue limit = (base queue limit*4/3) . If the send queue is beyond window limit, but below the calculated queue limit, the message is queued, but not sent until the window opens up again. The process is not blocked in this case. If queue size is beyond calculated queue limit the process is temporarily put to sleep, just as with importance zero messages. Messages of priority "high" (2) and "non_rejectable" (3) are treated the same way, but are subject to the queue limits (base queue limit*5/3) and (base queue limit*6/3) respectively. For TIPC internal (e.g. name table update) messages, or routed messages, these limits are far more generous, in order to not let TIPC have to compete with its users. When it comes to processor overload, incoming messages are also handled according to importance priority. Each message is matched against two values before they are put into the read-queue of a socket. The basic value is the "global queue limit", which keeps track of the number of queued incoming, but not yet read messages on the whole processor. The limits here are 1000 for low importance, 2000 for medium importance, and 10000 for high and non-rejectable importance. If an incoming message is connection oriented these thresholds are multiplied by four, under the assumption that it has more consequences to tear down a transaction in progress than to reject it in the setup-phase, which is where non-connection oriented messages are typically used. If the upper limit is hit for a message, the message is not thrown away, but sent back (i.e. the first 1024 bytes) to the sender along with an error code. The importance for the rejected message is raised one step, to reduce the risk that the rejected message will hit the limit at the return (which is often at the same processor). If, despite all this, the rejected message hits the global limit for its importance level, the the message is thrown away. **This is the only situation where a message is thrown away silently, and as you see it takes a really bad overload situation to en up there.*** The consequence is also that a "connection abortion" message, which is both connection oriented, contains an error code, and has a raised importance level, is virtually never thrown away. To protect the processor from locally misbehaving applications there is also a "local queue limit", keeping track of the number of un-read messages queued in each socket. Based on empirical experience the values are here set to 1/2 of the global threshold, that is 500, 1000 and 5000 messages respectively. Otherwise the algorithm for rejecting and throwing away messages is the same as described above. I hope this gives you the information you need. Regards /Jon Paul Jardetzky wrote: > > Ok. I've read and understood your mail. When I get the time, > I'll make the appropriate changes. They are not hard and don't > require modifying anything outside the adaptation layer. That > said, if you decide to make the change for a future release, > just let me know. > > Mostly, I needed to fix this quickly even though we are not > going to use multiple zones. It is more about the perception > of TIPC's stability with the other engineers here. They see > machines crashing (their own desktops unfortunately) and they > immediately become concerned about building our product on top > this code. Fast bug fixes and some reassurance is needed to > develop the required confidence. You know the story ... :). > > We have a few solid networking types that need to know TIPCs > behavior under transient congestion ... e.g. when messages are > dropped and under what circumstances, window sizes, etc... If > you have information outside what is already in your document > (or the code), it will help with convincing folk that it has > what we need for our cluster. > > Thanks. I've been working with this code for a while now and > like it's functionality. > > -- Paul > > ---------------------------------------------------------- > Fabric7 Systems, Inc. Phone: +1 (650) 210-0117 > 1300 Crittenden Lane, Suite 302 Mobile: +1 (650) 619-9141 > Mountain View, CA 94043 http://www.fabric7.com |
|
From: Jon M. (QB/LMC) <jon...@er...> - 2003-07-10 15:43:55
|
Thank you, that is great. I will add this along with another patch asap.
(But not necessarily today, I have a lot to do right now.)
/Jon
Guo, Min wrote:
>The following patch can fix the bug on the linux which version higher than2.5.73.
>------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>diff -Naru /home/bobi/tipc-0.97/TipcLinuxModAdaptation_SCC/src/socket_adaptation.c ./tipc-0.97-new/TipcLinuxModAdaptation_SCC/src/socket_adaptation.c
>--- /home/bobi/tipc-0.97/TipcLinuxModAdaptation_SCC/src/socket_adaptation.c 2003-07-03 06:20:16.000000000 +0800
>+++ ./tipc-0.97-new/TipcLinuxModAdaptation_SCC/src/socket_adaptation.c 2003-07-10 22:09:22.000000000 +0800
>@@ -70,12 +70,12 @@
> #include <linux/module.h>
> #include <linux/types.h>
> #include <linux/net.h>
>+#include <net/sock.h>
> #include <linux/socket.h>
> #include <linux/errno.h>
> #include <linux/mm.h>
> #include <linux/slab.h>
> #include <linux/poll.h>
>-#include <net/sock.h>
> #include <linux/version.h>
> #include <asm/semaphore.h>
> #include <asm/string.h>
>@@ -199,11 +199,11 @@
> #define put_tipc_sock(sk, tipcsk) do { (sk)->protinfo.af_unix.other=(struct sock*)(tipcsk); } while(0)
> #define sk_alloc_comp(family, priority, size) sk_alloc(family, priority, size)
> #define reset_protinfo(sk)
>-#else
>-#define get_tipc_sock(sock) ((sock)->sk ? (tipc_sock *)(sock)->sk->protinfo:0)
>-#define put_tipc_sock(sk, tipcsk) do { (sk)->protinfo=(tipcsk); } while(0)
>+#else
>+#define get_tipc_sock(sock) ((sock)->sk ? (tipc_sock *)(sock)->sk->sk_protinfo:0)
>+#define put_tipc_sock(sk, tipcsk) do { (sk)->sk_protinfo=(tipcsk); } while(0)
> #define sk_alloc_comp(family, priority, size) sk_alloc(family, priority, 1, NULL)
>-#define reset_protinfo(sk) do { (sk)->protinfo = NULL; } while(0)
>+#define reset_protinfo(sk) do { (sk)->sk_protinfo = NULL; } while(0)
> #undef MOD_INC_USE_COUNT /* it's use is depreciated for 2.5.x kernels */
> #define MOD_INC_USE_COUNT do { } while(0)
> #undef MOD_DEC_USE_COUNT /* it's use is depreciated for 2.5.x kernels */
>@@ -239,7 +239,7 @@
> return -ENOMEM;
> }
> sock_init_data(sock,sk);
>- sk->family = AF_TIPC;
>+ sk->sk_family = AF_TIPC;
> put_tipc_sock(sk, tipcsk);
> tipcsk->userdata.sendargv.origport = port_ref(tipcsk);
> init_waitqueue_head(&tipcsk->userdata.waitqueue);
>diff -Naru /home/bobi/tipc-0.97/TipcLinuxModAdaptation_SCC/src/udp_adaptation.c ./tipc-0.97-new/TipcLinuxModAdaptation_SCC/src/udp_adaptation.c
>--- /home/bobi/tipc-0.97/TipcLinuxModAdaptation_SCC/src/udp_adaptation.c 2003-05-17 04:45:42.000000000 +0800
>+++ ./tipc-0.97-new/TipcLinuxModAdaptation_SCC/src/udp_adaptation.c 2003-07-10 22:10:41.000000000 +0800
>@@ -316,8 +316,13 @@
> os_grab_lock();
> return false;
> }
>+#ifndef TIPC_LINUX_2_5
> bearer.trafficSock->sk->data_ready = dataInd;
> bearer.trafficSock->sk->allocation = GFP_ATOMIC;
>+#else
>+ bearer.trafficSock->sk->sk_data_ready = dataInd;
>+ bearer.trafficSock->sk->sk_allocation = GFP_ATOMIC;
>+#endif
> }
>
> /* Set up listener socket: */
>@@ -338,8 +343,13 @@
> return false;
> }
> sk = bearer.listenerSock->sk;
>+#ifndef TIPC_LINUX_2_5
> sk->data_ready = dataInd;
> sk->allocation = GFP_ATOMIC;
>+#else
>+ sk->sk_data_ready = dataInd;
>+ sk->sk_allocation = GFP_ATOMIC;
>+#endif
> err = sock_setsockopt(bearer.listenerSock,
> SOL_SOCKET,SO_REUSEADDR, (char*)&one,sizeof(one));
> if (err < 0)
>-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>-----Original Message-----
>From: Guo, Min
>Sent: Thursday, July 10, 2003 3:34 PM
>To: Jon Maloy
>Cc: TIPC mailing list
>Subject: [Osdlcluster-tipc] RE: [cgl_discussion] tipc 0.97 + new tipc-benchmark
>
>
> Hi, here I compile it in Linux 2.5.73 and an error happened
>
>-->Make KINCLUDE=/usr/src/linux-2.5.73
>gcc -c -O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -DTIPC_LINUX_2_5 -I/usr/src/linux/include -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -DKBUILD_MODNAME=tipc -DKBUILD_BASENAME=ethernet_adaptation -I../EnvAdaptation_SWI/incl -I../TIPC_SWI/incl -I../TipcAdaptation_SWI/incl -I../TipcDriverPort_SWI/incl -I/usr/src/linux-2.5.73/include -I./src -I/usr/src/linux-2.5.73/include/asm/mach-default src/ethernet_adaptation.c -o obj.linuxm/ethernet_adaptation.o
>gcc -c -O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -DTIPC_LINUX_2_5 -I/usr/src/linux/include -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -DKBUILD_MODNAME=tipc -DKBUILD_BASENAME=os_adaptation -I../EnvAdaptation_SWI/incl -I../TIPC_SWI/incl -I../TipcAdaptation_SWI/incl -I../TipcDriverPort_SWI/incl -I/usr/src/linux-2.5.73/include -I./src -I/usr/src/linux-2.5.73/include/asm/mach-default src/os_adaptation.c -o obj.linuxm/os_adaptation.o
>gcc -c -O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -DTIPC_LINUX_2_5 -I/usr/src/linux/include -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -DKBUILD_MODNAME=tipc -DKBUILD_BASENAME=socket_adaptation -I../EnvAdaptation_SWI/incl -I../TIPC_SWI/incl -I../TipcAdaptation_SWI/incl -I../TipcDriverPort_SWI/incl -I/usr/src/linux-2.5.73/include -I./src -I/usr/src/linux-2.5.73/include/asm/mach-default src/socket_adaptation.c -o obj.linuxm/socket_adaptation.o
>src/socket_adaptation.c: In function `tipc_socket':
>src/socket_adaptation.c:241: structure has no member named `family'
>src/socket_adaptation.c:242: structure has no member named `protinfo'
>src/socket_adaptation.c: In function `tipc_sk_release':
>src/socket_adaptation.c:257: structure has no member named `protinfo'
>src/socket_adaptation.c:307: structure has no member named `protinfo'
>src/socket_adaptation.c: In function `tipc_sk_bind':
>src/socket_adaptation.c:323: structure has no member named `protinfo'
>src/socket_adaptation.c: In function `tipc_sk_connect':
>src/socket_adaptation.c:346: structure has no member named `protinfo'
>src/socket_adaptation.c: In function `tipc_sk_accept':
>src/socket_adaptation.c:389: structure has no member named `protinfo'
>src/socket_adaptation.c:400: structure has no member named `protinfo'
>src/socket_adaptation.c: In function `tipc_sk_getname':
>src/socket_adaptation.c:438: structure has no member named `protinfo'
>src/socket_adaptation.c: In function `tipc_sk_shutdown':
>src/socket_adaptation.c:467: structure has no member named `protinfo'
>src/socket_adaptation.c: In function `tipc_sk_sendmsg':
>src/socket_adaptation.c:489: structure has no member named `protinfo'
>src/socket_adaptation.c:490: warning: initialization from incompatible pointer type
>src/socket_adaptation.c: In function `tipc_sk_poll':
>src/socket_adaptation.c:648: structure has no member named `protinfo'
>src/socket_adaptation.c: In function `tipc_sk_recvmsg':
>src/socket_adaptation.c:682: structure has no member named `protinfo'
>src/socket_adaptation.c: In function `tipc_sk_setsockopt':
>src/socket_adaptation.c:846: structure has no member named `protinfo'
>src/socket_adaptation.c: In function `tipc_sk_ioctl':
>src/socket_adaptation.c:989: structure has no member named `protinfo'
>src/socket_adaptation.c:1008: structure has no member named `protinfo'
>src/socket_adaptation.c:1047: structure has no member named `protinfo'
>src/socket_adaptation.c:1086: structure has no member named `protinfo'
>src/socket_adaptation.c:1129: structure has no member named `protinfo'
>src/socket_adaptation.c:1173: structure has no member named `protinfo'
>src/socket_adaptation.c:1196: structure has no member named `protinfo'
>make[3]: *** [obj.linuxm/socket_adaptation.o] Error 1
>make[2]: *** [/root/tipc-0.97/TipcLinuxModAdaptation_SCC/obj.linuxm/tipcadaptation.o] Error 2
>make[1]: *** [/root/tipc-0.97] Error 2
>make[1]: Leaving directory `/usr/src/linux-2.5.73'
>make: *** [mod_tipc] Error 2
>
>
>Thanks
>Guo Min
>-----Original Message-----
>From: Jon Maloy [mailto:jon...@er...]
>Sent: Thursday, July 03, 2003 8:22 AM
>To: cgl_discussion
>Subject: [cgl_discussion] tipc 0.97 + new tipc-benchmark
>
>
>A minor bug correction in tipc, plus a rewritten benchmark, now including
>a round-trip latency measurement.
>
>/Jon
>_______________________________________________
>cgl_discussion mailing list
>cgl...@li...
>http://lists.osdl.org/mailman/listinfo/cgl_discussion
>
>
>-------------------------------------------------------
>This SF.Net email sponsored by: Parasoft
>Error proof Web apps, automate testing & more.
>Download & eval WebKing and get a free book.
>www.parasoft.com/bulletproofapps
>_______________________________________________
>Osdlcluster-tipc mailing list
>Osd...@li...
>https://lists.sourceforge.net/lists/listinfo/osdlcluster-tipc
>
>
>-------------------------------------------------------
>This SF.Net email sponsored by: Parasoft
>Error proof Web apps, automate testing & more.
>Download & eval WebKing and get a free book.
>www.parasoft.com/bulletproofapps
>_______________________________________________
>Osdlcluster-tipc mailing list
>Osd...@li...
>https://lists.sourceforge.net/lists/listinfo/osdlcluster-tipc
>
>
>
|
|
From: Guo, M. <mi...@in...> - 2003-07-10 09:13:17
|
The following patch can fix the bug on the linux which version higher =
than2.5.73.
-------------------------------------------------------------------------=
-------------------------------------------------------------------------=
-------------------------------------------------------------------------=
---------
diff -Naru =
/home/bobi/tipc-0.97/TipcLinuxModAdaptation_SCC/src/socket_adaptation.c =
./tipc-0.97-new/TipcLinuxModAdaptation_SCC/src/socket_adaptation.c
--- =
/home/bobi/tipc-0.97/TipcLinuxModAdaptation_SCC/src/socket_adaptation.c =
2003-07-03 06:20:16.000000000 +0800
+++ ./tipc-0.97-new/TipcLinuxModAdaptation_SCC/src/socket_adaptation.c =
2003-07-10 22:09:22.000000000 +0800
@@ -70,12 +70,12 @@
#include <linux/module.h>
#include <linux/types.h>
#include <linux/net.h>
+#include <net/sock.h>
#include <linux/socket.h>
#include <linux/errno.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/poll.h>
-#include <net/sock.h>
#include <linux/version.h>
#include <asm/semaphore.h>
#include <asm/string.h>
@@ -199,11 +199,11 @@
#define put_tipc_sock(sk, tipcsk) do { =
(sk)->protinfo.af_unix.other=3D(struct sock*)(tipcsk); } while(0)
#define sk_alloc_comp(family, priority, size) sk_alloc(family, =
priority, size)
#define reset_protinfo(sk)
-#else=20
-#define get_tipc_sock(sock) ((sock)->sk ? (tipc_sock =
*)(sock)->sk->protinfo:0)
-#define put_tipc_sock(sk, tipcsk) do { (sk)->protinfo=3D(tipcsk); } =
while(0)
+#else
+#define get_tipc_sock(sock) ((sock)->sk ? (tipc_sock =
*)(sock)->sk->sk_protinfo:0)
+#define put_tipc_sock(sk, tipcsk) do { (sk)->sk_protinfo=3D(tipcsk); } =
while(0)
#define sk_alloc_comp(family, priority, size) sk_alloc(family, =
priority, 1, NULL)
-#define reset_protinfo(sk) do { (sk)->protinfo =3D NULL; } while(0)
+#define reset_protinfo(sk) do { (sk)->sk_protinfo =3D NULL; } while(0)
#undef MOD_INC_USE_COUNT /* it's use is depreciated for 2.5.x kernels =
*/
#define MOD_INC_USE_COUNT do { } while(0)
#undef MOD_DEC_USE_COUNT /* it's use is depreciated for 2.5.x kernels =
*/
@@ -239,7 +239,7 @@
return -ENOMEM;
}
sock_init_data(sock,sk);
- sk->family =3D AF_TIPC;
+ sk->sk_family =3D AF_TIPC;
put_tipc_sock(sk, tipcsk);
tipcsk->userdata.sendargv.origport =3D port_ref(tipcsk);
init_waitqueue_head(&tipcsk->userdata.waitqueue);
diff -Naru =
/home/bobi/tipc-0.97/TipcLinuxModAdaptation_SCC/src/udp_adaptation.c =
./tipc-0.97-new/TipcLinuxModAdaptation_SCC/src/udp_adaptation.c
--- /home/bobi/tipc-0.97/TipcLinuxModAdaptation_SCC/src/udp_adaptation.c =
2003-05-17 04:45:42.000000000 +0800
+++ ./tipc-0.97-new/TipcLinuxModAdaptation_SCC/src/udp_adaptation.c =
2003-07-10 22:10:41.000000000 +0800
@@ -316,8 +316,13 @@
os_grab_lock();
return false;
}
+#ifndef TIPC_LINUX_2_5
bearer.trafficSock->sk->data_ready =3D dataInd;
bearer.trafficSock->sk->allocation =3D GFP_ATOMIC;
+#else
+ bearer.trafficSock->sk->sk_data_ready =3D dataInd;
+ bearer.trafficSock->sk->sk_allocation =3D GFP_ATOMIC;
+#endif
}
=20
/* Set up listener socket: */
@@ -338,8 +343,13 @@
return false;
}
sk =3D bearer.listenerSock->sk;
+#ifndef TIPC_LINUX_2_5 =20
sk->data_ready =3D dataInd;
sk->allocation =3D GFP_ATOMIC;
+#else
+ sk->sk_data_ready =3D dataInd;
+ sk->sk_allocation =3D GFP_ATOMIC;
+#endif
err =3D sock_setsockopt(bearer.listenerSock, =20
SOL_SOCKET,SO_REUSEADDR, (char*)&one,sizeof(one));
if (err < 0)
-------------------------------------------------------------------------=
-------------------------------------------------------------------------=
---------------------------------------------------------
-----Original Message-----
From: Guo, Min=20
Sent: Thursday, July 10, 2003 3:34 PM
To: Jon Maloy
Cc: TIPC mailing list
Subject: [Osdlcluster-tipc] RE: [cgl_discussion] tipc 0.97 + new =
tipc-benchmark
Hi, here I compile it in Linux 2.5.73 and an error happened
-->Make KINCLUDE=3D/usr/src/linux-2.5.73
gcc -c -O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing =
-fno-common -DTIPC_LINUX_2_5 -I/usr/src/linux/include -D__KERNEL__ =
-DMODULE -DEXPORT_SYMTAB -DKBUILD_MODNAME=3Dtipc =
-DKBUILD_BASENAME=3Dethernet_adaptation -I../EnvAdaptation_SWI/incl =
-I../TIPC_SWI/incl -I../TipcAdaptation_SWI/incl =
-I../TipcDriverPort_SWI/incl -I/usr/src/linux-2.5.73/include -I./src =
-I/usr/src/linux-2.5.73/include/asm/mach-default =
src/ethernet_adaptation.c -o obj.linuxm/ethernet_adaptation.o
gcc -c -O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing =
-fno-common -DTIPC_LINUX_2_5 -I/usr/src/linux/include -D__KERNEL__ =
-DMODULE -DEXPORT_SYMTAB -DKBUILD_MODNAME=3Dtipc =
-DKBUILD_BASENAME=3Dos_adaptation -I../EnvAdaptation_SWI/incl =
-I../TIPC_SWI/incl -I../TipcAdaptation_SWI/incl =
-I../TipcDriverPort_SWI/incl -I/usr/src/linux-2.5.73/include -I./src =
-I/usr/src/linux-2.5.73/include/asm/mach-default src/os_adaptation.c -o =
obj.linuxm/os_adaptation.o
gcc -c -O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing =
-fno-common -DTIPC_LINUX_2_5 -I/usr/src/linux/include -D__KERNEL__ =
-DMODULE -DEXPORT_SYMTAB -DKBUILD_MODNAME=3Dtipc =
-DKBUILD_BASENAME=3Dsocket_adaptation -I../EnvAdaptation_SWI/incl =
-I../TIPC_SWI/incl -I../TipcAdaptation_SWI/incl =
-I../TipcDriverPort_SWI/incl -I/usr/src/linux-2.5.73/include -I./src =
-I/usr/src/linux-2.5.73/include/asm/mach-default src/socket_adaptation.c =
-o obj.linuxm/socket_adaptation.o
src/socket_adaptation.c: In function `tipc_socket':
src/socket_adaptation.c:241: structure has no member named `family'
src/socket_adaptation.c:242: structure has no member named `protinfo'
src/socket_adaptation.c: In function `tipc_sk_release':
src/socket_adaptation.c:257: structure has no member named `protinfo'
src/socket_adaptation.c:307: structure has no member named `protinfo'
src/socket_adaptation.c: In function `tipc_sk_bind':
src/socket_adaptation.c:323: structure has no member named `protinfo'
src/socket_adaptation.c: In function `tipc_sk_connect':
src/socket_adaptation.c:346: structure has no member named `protinfo'
src/socket_adaptation.c: In function `tipc_sk_accept':
src/socket_adaptation.c:389: structure has no member named `protinfo'
src/socket_adaptation.c:400: structure has no member named `protinfo'
src/socket_adaptation.c: In function `tipc_sk_getname':
src/socket_adaptation.c:438: structure has no member named `protinfo'
src/socket_adaptation.c: In function `tipc_sk_shutdown':
src/socket_adaptation.c:467: structure has no member named `protinfo'
src/socket_adaptation.c: In function `tipc_sk_sendmsg':
src/socket_adaptation.c:489: structure has no member named `protinfo'
src/socket_adaptation.c:490: warning: initialization from incompatible =
pointer type
src/socket_adaptation.c: In function `tipc_sk_poll':
src/socket_adaptation.c:648: structure has no member named `protinfo'
src/socket_adaptation.c: In function `tipc_sk_recvmsg':
src/socket_adaptation.c:682: structure has no member named `protinfo'
src/socket_adaptation.c: In function `tipc_sk_setsockopt':
src/socket_adaptation.c:846: structure has no member named `protinfo'
src/socket_adaptation.c: In function `tipc_sk_ioctl':
src/socket_adaptation.c:989: structure has no member named `protinfo'
src/socket_adaptation.c:1008: structure has no member named `protinfo'
src/socket_adaptation.c:1047: structure has no member named `protinfo'
src/socket_adaptation.c:1086: structure has no member named `protinfo'
src/socket_adaptation.c:1129: structure has no member named `protinfo'
src/socket_adaptation.c:1173: structure has no member named `protinfo'
src/socket_adaptation.c:1196: structure has no member named `protinfo'
make[3]: *** [obj.linuxm/socket_adaptation.o] Error 1
make[2]: *** =
[/root/tipc-0.97/TipcLinuxModAdaptation_SCC/obj.linuxm/tipcadaptation.o] =
Error 2
make[1]: *** [/root/tipc-0.97] Error 2
make[1]: Leaving directory `/usr/src/linux-2.5.73'
make: *** [mod_tipc] Error 2
Thanks
Guo Min
-----Original Message-----
From: Jon Maloy [mailto:jon...@er...]
Sent: Thursday, July 03, 2003 8:22 AM
To: cgl_discussion
Subject: [cgl_discussion] tipc 0.97 + new tipc-benchmark
A minor bug correction in tipc, plus a rewritten benchmark, now =
including
a round-trip latency measurement.
/Jon
_______________________________________________
cgl_discussion mailing list
cgl...@li...
http://lists.osdl.org/mailman/listinfo/cgl_discussion
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
_______________________________________________
Osdlcluster-tipc mailing list
Osd...@li...
https://lists.sourceforge.net/lists/listinfo/osdlcluster-tipc
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
_______________________________________________
Osdlcluster-tipc mailing list
Osd...@li...
https://lists.sourceforge.net/lists/listinfo/osdlcluster-tipc
|
|
From: Guo, M. <mi...@in...> - 2003-07-10 07:34:20
|
Hi, here I compile it in Linux 2.5.73 and an error happened -->Make KINCLUDE=3D/usr/src/linux-2.5.73 gcc -c -O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing = -fno-common -DTIPC_LINUX_2_5 -I/usr/src/linux/include -D__KERNEL__ = -DMODULE -DEXPORT_SYMTAB -DKBUILD_MODNAME=3Dtipc = -DKBUILD_BASENAME=3Dethernet_adaptation -I../EnvAdaptation_SWI/incl = -I../TIPC_SWI/incl -I../TipcAdaptation_SWI/incl = -I../TipcDriverPort_SWI/incl -I/usr/src/linux-2.5.73/include -I./src = -I/usr/src/linux-2.5.73/include/asm/mach-default = src/ethernet_adaptation.c -o obj.linuxm/ethernet_adaptation.o gcc -c -O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing = -fno-common -DTIPC_LINUX_2_5 -I/usr/src/linux/include -D__KERNEL__ = -DMODULE -DEXPORT_SYMTAB -DKBUILD_MODNAME=3Dtipc = -DKBUILD_BASENAME=3Dos_adaptation -I../EnvAdaptation_SWI/incl = -I../TIPC_SWI/incl -I../TipcAdaptation_SWI/incl = -I../TipcDriverPort_SWI/incl -I/usr/src/linux-2.5.73/include -I./src = -I/usr/src/linux-2.5.73/include/asm/mach-default src/os_adaptation.c -o = obj.linuxm/os_adaptation.o gcc -c -O2 -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing = -fno-common -DTIPC_LINUX_2_5 -I/usr/src/linux/include -D__KERNEL__ = -DMODULE -DEXPORT_SYMTAB -DKBUILD_MODNAME=3Dtipc = -DKBUILD_BASENAME=3Dsocket_adaptation -I../EnvAdaptation_SWI/incl = -I../TIPC_SWI/incl -I../TipcAdaptation_SWI/incl = -I../TipcDriverPort_SWI/incl -I/usr/src/linux-2.5.73/include -I./src = -I/usr/src/linux-2.5.73/include/asm/mach-default src/socket_adaptation.c = -o obj.linuxm/socket_adaptation.o src/socket_adaptation.c: In function `tipc_socket': src/socket_adaptation.c:241: structure has no member named `family' src/socket_adaptation.c:242: structure has no member named `protinfo' src/socket_adaptation.c: In function `tipc_sk_release': src/socket_adaptation.c:257: structure has no member named `protinfo' src/socket_adaptation.c:307: structure has no member named `protinfo' src/socket_adaptation.c: In function `tipc_sk_bind': src/socket_adaptation.c:323: structure has no member named `protinfo' src/socket_adaptation.c: In function `tipc_sk_connect': src/socket_adaptation.c:346: structure has no member named `protinfo' src/socket_adaptation.c: In function `tipc_sk_accept': src/socket_adaptation.c:389: structure has no member named `protinfo' src/socket_adaptation.c:400: structure has no member named `protinfo' src/socket_adaptation.c: In function `tipc_sk_getname': src/socket_adaptation.c:438: structure has no member named `protinfo' src/socket_adaptation.c: In function `tipc_sk_shutdown': src/socket_adaptation.c:467: structure has no member named `protinfo' src/socket_adaptation.c: In function `tipc_sk_sendmsg': src/socket_adaptation.c:489: structure has no member named `protinfo' src/socket_adaptation.c:490: warning: initialization from incompatible = pointer type src/socket_adaptation.c: In function `tipc_sk_poll': src/socket_adaptation.c:648: structure has no member named `protinfo' src/socket_adaptation.c: In function `tipc_sk_recvmsg': src/socket_adaptation.c:682: structure has no member named `protinfo' src/socket_adaptation.c: In function `tipc_sk_setsockopt': src/socket_adaptation.c:846: structure has no member named `protinfo' src/socket_adaptation.c: In function `tipc_sk_ioctl': src/socket_adaptation.c:989: structure has no member named `protinfo' src/socket_adaptation.c:1008: structure has no member named `protinfo' src/socket_adaptation.c:1047: structure has no member named `protinfo' src/socket_adaptation.c:1086: structure has no member named `protinfo' src/socket_adaptation.c:1129: structure has no member named `protinfo' src/socket_adaptation.c:1173: structure has no member named `protinfo' src/socket_adaptation.c:1196: structure has no member named `protinfo' make[3]: *** [obj.linuxm/socket_adaptation.o] Error 1 make[2]: *** = [/root/tipc-0.97/TipcLinuxModAdaptation_SCC/obj.linuxm/tipcadaptation.o] = Error 2 make[1]: *** [/root/tipc-0.97] Error 2 make[1]: Leaving directory `/usr/src/linux-2.5.73' make: *** [mod_tipc] Error 2 Thanks Guo Min -----Original Message----- From: Jon Maloy [mailto:jon...@er...] Sent: Thursday, July 03, 2003 8:22 AM To: cgl_discussion Subject: [cgl_discussion] tipc 0.97 + new tipc-benchmark A minor bug correction in tipc, plus a rewritten benchmark, now = including a round-trip latency measurement. /Jon _______________________________________________ cgl_discussion mailing list cgl...@li... http://lists.osdl.org/mailman/listinfo/cgl_discussion ------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps _______________________________________________ Osdlcluster-tipc mailing list Osd...@li... https://lists.sourceforge.net/lists/listinfo/osdlcluster-tipc |
|
From: Guo, M. <mi...@in...> - 2003-07-10 02:28:06
|
Hi, jon: Have you check your code into CVS? If not, could you please update CVS if you are ready to distribute the new version code. If you change the code, could you please write a file to describe=20 which parts have been changed? Thank you very much! Thanks Guo Min=20 The content of this email message solely contains my own personal views, and not those of my employer. -----Original Message----- From: Jon Maloy [mailto:jon...@er...] Sent: Thursday, July 03, 2003 8:22 AM To: cgl_discussion Subject: [cgl_discussion] tipc 0.97 + new tipc-benchmark A minor bug correction in tipc, plus a rewritten benchmark, now = including a round-trip latency measurement. /Jon _______________________________________________ cgl_discussion mailing list cgl...@li... http://lists.osdl.org/mailman/listinfo/cgl_discussion |
|
From: Jon M. (QB/LMC) <jon...@er...> - 2003-07-09 19:21:10
|
Hi Paul,
I think I need to explain how this is supposed to work, since I don't think
it is evident from the code, and not described in my document.
I know that you may not want to implement all what I suggest below,
but I write it down anyway, partially for myself, before I forget too much
about the algorithm and the ideas I had about its evolution.
If the only thing you want is zone separation without crash, read the last
paragraph.
/Jon
In reality the TIPC core code has no notion of broadcast or multicast for
link requests, it is the scope of the 'dest' field in the configuration
messages
that determines how to react on an incoming link request.
An incoming link request may indicate one of four such scopes (in
practice only
three now, since we don't use subnetworks):
Case 1) (dest == 0): => "I want a link to anybody, anywhere where this
request is received".
This scope is only used in one case now, that
is when an explicit (unicast) link request is sent between two
zones over UDP. The receiving processor reads the scope, deduces
that this is the first approach from some other zone, and decides
to establish a "pilot" link to the sender of the request. This
is done
by returning a link request specifically to the originator of
the pilot
request, i.e. if that processor is <2.1.4>, he will use
Case 2) (dest == 0x2001004): => "I want a link to processor <2.1.4>"
Any duplicate requests in either direction (there will often
be some,
because the sender will repeat its request with an
exponential back-off
interval until a link is established) will be ignored.
Once the pilot link is established the "all-to-two" link
setup procedure
is initiated. This means that all the processors in both
zones becomes
aware of the newly registered processor in the other zone,
(by network
subscription) and immediately send their own link requests
to this processor. This
message will use the scope of the target zone, e.g.
Case 3) (dest == 0x20000000); => "I want two links to any two processors
within zone 2"
(This is if the originator is not in zone 2. If it is in
the same zone the meaning is:
"I want a link to anybody within zone 2 who receives this
request" -the regular intra-zone
broadcast case)
The recipient processor already has the pilot link, so he
will only accept one
of these requests himself, and answer with a case 2
request. The rest he will
forward ("LinkProbe") to the next processor (i.e. the one
with the next higher
processor number) in the zone, which will in its turn
accept two requests and pass
on the rest, and so forth. After a link is established
the corresponding "parked"
link probe's link counter is incremented and if (counter <
2) the request is passed
on to the next processor for establishment of the the
second link for that request.
This algorithm implies a lot of complexity to be handled, like race
conditions, because both
zones will try to establish links simultaneously, the fact that zones
may have different
sizes, meaning that certain processors in the smaller zone may have to
accept three or more
links, that zone sizes may change, and we must adapt to that, that link
probes may
risk to roam around in a zone forever if no processor will accept it etc.
Anyway, I think all this is handled in a correct way, and we have highly
dynamic and
adaptive algorithm that ensures that any processor in each zone has at
least two links
to two different processors in the other zone, and that there is not a
single link more
than the exact minimum needed to fulfil this requirement. (My "minimum
link entropy"
criteria).
So, what is the conclusion in the case of inter-zone ethernet broadcast
link requests?
First, if you compare the ethernet config message structure and the udp
config message
structure you will notice that they are very different, the udp one
being the one
I prefer. The ethernet header does not really contain the adequate
fields to set up links according to the above description. I had to keep
the ethernet header
structure compatible with an older version of TIPC (at least that was
what I believed), and that
is why it looks so "weird" in comparison with the udp header. I figured
out that it contained
all necessary information, however, so I was still able to "re-create" a
correct
TipcRequestLinkArgs with valid contents in configDataInd().
Luckily, the restriction of backwards compatibility has disappeared, so
we may now
change the ethernet config header to be analogous to the udp one.
Something like this:
typedef struct ConfigMsg
{
tipc_address_t orig;
tipc_address_t dest;
uint systemId;
}ConfigMsg;
(I am not sure if we will ever need systemId, but we can let it stay and
set it to zero for now.)
Second, we should make the inter-zone link setup configurable, so that
some parameter
on the insmod line tells it whether we should accept interzone links
over ethernet or not.
If we allow it, the 'dest' field in the broadcasted config messages
should be set to zero,
otherwise it should be set to <own zone,0,0>.
Third, we must make the "all-to-two" algorithm solid enough to handle
the storm of
link requests that the ethernet broadcast option will result in. All by
sudden all
processors receiving the broadcast will create what they think is their
own "pilot" link,
and we have an all-to-all link situation, just as we have internally in
the zone now. If we
want this, we could even make this a configurable option, hence
omitting the link probe
forwarding and "minimum link entropy" algorithm in this case.
Otherwise, we will go
through the algorithm, set up the necessary new links and take down the
redundant
pilot links until we have the wanted "all-to-two" configuration.
If we only have the goal to start two zones in the same LAN while
ignoring each other
I think the simplest solution is this: Change the structure of the
ethernet ConfigMsg
to the one I suggest above, and set 'dest' to be <own zone,0,0> (eg
0x20000000) in the
broadcasts.
Any other zone than zone 2 would hence ignore these messages, and we
achieve
what we want. Today this is impossible, since the current ConfigMsg
structure does
not include any 'dest' field. Instead, it is re-created it at the
receiving endpoint by
assuming that the own zone is the requested target.
(When I think more about this, we can at least temporarily do an even
simpler and
cheatier patch in configDataInd() in ethernet_adaptation.c: simply
compare originating
zone to own zone, and if they differ, ignore the message.)
/j
Paul Jardetzky wrote:
>
> Hi Jon,
>
> I'm happily debugging the kernel and am making progress
> toward the kernel panic when another machine installs a
> tipc module in a different zone. Here is what happens:
>
> 1) Machine A installs tipc in zone 1. fine.
> 2) Machine B installs tipc in zone 2 and causes Machine
> A to kernel panic ... sometimes with a kernel BUG at
> src/tipc_port.c line 146 ... sometimes with a spinlock
> error in the scheduler.
>
> When tracing the messages I find a configDataInd arrives
> from the ethernet driver and gets passed on (through a
> couple of routines) to manage_handleLinkRequest which then
> calls manager_forwardLinkProbe ... on to __tipc_send2name
> and tipc_usercalls.sendNamedMsg.
>
> I then see another configDataInd with what looks like the
> same message, though I haven't gotten far enough yet to
> tell where the message was forwarded or what else came
> into the TIPC code.
>
> After the second message comes in the kernel panics ...
> Just thought I'd update you to see if you have a flash
> of insight. I'll keep at it...
>
> Cheers,
>
> -- Paul
>
> ----------------------------------------------------------
> Fabric7 Systems, Inc. Phone: +1 (650) 210-0117
> 1300 Crittenden Lane, Suite 302 Mobile: +1 (650) 619-9141
> Mountain View, CA 94043 http://www.fabric7.com
|
|
From: Mika K. <mi...@os...> - 2003-06-30 14:57:04
|
On Sun, 2003-06-29 at 18:56, Guo, Min wrote: > Hi, > > Could you please open the HTTP server for the developer tree or give > me a read only user and password for the tree, so that I can > check it out.such as the open the tree as original http tree > http://tipc-linux.bkbits.net:8080/unit_tests/. Unfortunately that seems to be a feature present only in the commercial BitKeeper server, so we will not have that available. So use the bk-syntax instead: bk://developer.osdl.org://var/bk/tipc/tools > For the tipc tools tree, could you please give me a user and password > for the tree or I give you my public key(RSA) to you, so that I can > update the test suites and tools? Unfortunately OSDL management has decided not to allow this functionality. So all patches have to go in through Mark or me. Or even better would be that you would have your own tree that we could pull into developer tree. > Another question is whether Jon agrees to join in the dev tree? I have no comment on that. --MiKu |