linux-2.2.1-ac3 and egcs-19990131

Horst von Brand (vonbrand@sleipnir.valparaiso.cl)
Tue, 02 Feb 1999 23:38:13 -0400


This combination (and probably others) won't work, since the inlining
changed. The following snippet out of net/unix/af_unix.c (heavily hacked to
reduce its size) will inline skb_put() under egcs-1999012, but not under
19990131. I assume the kernel source isn't quite right, as it assumes that
functions declared "extern inline" will always be inlined with -O2
-fomit-frame-pointer, and no real function is being provided anywhere for
linking to. OTOH, it declares functions inline so they _will_ be inlined
for performance.

I've been away for some time, and can't take up the lists just now. So if
this has already been discussed to death, sorry.

struct iovec;

extern int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len);

struct sk_buff {
unsigned int len;
unsigned char *tail;
unsigned char *end;
};

extern __inline__ unsigned char *skb_put(struct sk_buff *skb, unsigned int len)
{
unsigned char *tmp=skb->tail;
skb->tail+=len;
skb->len+=len;
if(skb->tail>skb->end)
{
__label__ here;
skb_over_panic(skb, len, &&here);
here: ;
}
return tmp;
}
static int unix_dgram_sendmsg(struct iovec *msg_iov, int len)
{
struct sk_buff *skb;

memcpy_fromiovec(skb_put(skb,len), msg_iov, len);
}

-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viņa del Mar, Chile                               +56 32 672616

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/