Re: OpenSSI status question

John Hughes <[email protected]> Fri, 13 Mar 2009 13:19:17 +0100
Newsgroups gmane.linux.cluster.ssic.devel
Message-ID <[email protected]>
Stan wrote:
> Roger | John,
>   I could use some assistance with the following.
> Linux-2.6.18, possibly before but not so far back as 2.6.10, struct sk_buff
> lost the 'list' member.
> Unfortunately cluster/ics/ics_tcp/ics_llsvr.c makes use of the 'list'
> member.
> Could one of you look into fixing cluster/ics/ics_tcp/ics_llsvr.c so it no
> longer has a dependency on the list member?
> From a quick scan of other 2.6.18 drivers, the sk_buff 'list' list_head was
> moved to driver local storage. The ICS channel block might be a place to
> consider moving the sk_buff list head to?
> This work could be prototyped and validated using R1.9.2/3 and then merged
> with 2.6.18?
>
> What do you think?  
>
> cluster/ics/ics_tcp/ics_llsvr.c: In function '__icssvr_llenqueue':
> cluster/ics/ics_tcp/ics_llsvr.c:229: error: 'struct sk_buff' has no member
> named 'list'
> cluster/ics/ics_tcp/ics_llsvr.c:231: error: 'struct sk_buff' has no member
> named 'list'
> cluster/ics/ics_tcp/ics_llsvr.c: In function 'icssvr_lldequeue':
> cluster/ics/ics_tcp/ics_llsvr.c:358: error: 'struct sk_buff' has no member
> named 'list'
> cluster/ics/ics_tcp/ics_llsvr.c:360: error: 'struct sk_buff' has no member
>   
Sorry for the tardy reply (I'm only really sending this message so I can 
find the answer in the archives) but the way to fix this is as done by 
Aneesh in his "ci-to-linus" git repository:

http://git.openssi.org/~kvaneesh/gitweb.cgi?h=a4d088e7e69a490a41d0db8ce621561e1afe70c7;f=cluster/ics/ics_tcp/ics_llsvr.c;hb=3c33b3716d51321e7837766d6cb321b77e34d2e3;p=ci-to-linus.git;a=blob

Use the "cb" field:

struct ics_llenqueue_cb {
	struct sk_buff *tskbp;  /* Tail of message */
	u_char *tdatap;         /* End of message in skb */

	struct sk_buff *nskbp;  /* Next message across a chain break */
	u_char *ndatap;         /* Start of next message in skb */
};


/* Some asci art is needed to understand this.
 *
 *				      ....[cb.tdatap]----------------------  ics_reass_buf will have
 *				      .					   | (rb_tdatap = rb_tskbp->tail
 *				      .					   V
 *  struct icsmsg_arrival             ....[cb.tskbp]-----------------------
 *   ___________________              .					   |
 *  |	   msglist_hskbp|-----	      .					   |
 *  |	  msglist_hdatap|-----|	      .					   |
 *  |			|     V       .					   V
 *  |			|     [sk_buf].next->[sk_buf].next->[sk_buf].next->[sk_buf]. {end of chain}
 *  |			|							   .
 *  |			|							   .
 *  |			|       [sk_buf].next->[sk_buf].next			   .
 *  |			|	^	       ^				   .
 *  |			|	|--------------|---------------	[cb.nskbp]..........
 *  |			|	---------------|---------------	[cb.ndatap].........
 *  |	   msglist_tskbp|----------------------|
 *  |	  msglist_tdatap|----------------------
 *  |			|
 *  |___________________|
 *
 *
 */
...
static inline void __icssvr_llenqueue(struct icsmsg_arrival *msgl_p,
				struct ics_reass_buf *rbufp, int chan)
{
	struct ics_llenqueue_cb *cbp;
...
	} else if (msgl_p->msglist_tskbp != rbufp->rb_hskbp) {
		/*
		 * When the message is not in the chain, that means
		 * when there is a chain break, pull the msglist tail sk_buff
		 * and update the control buffer in that to point to this
		 * sk_ buff
		 */

		cbp = (void *)msgl_p->msglist_tskbp->cb;
		cbp->nskbp = rbufp->rb_hskbp;
		cbp->ndatap = rbufp->rb_hdatap;
	}
...



------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com