]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/core/skbuff.c
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6-omap-h63xx.git] / net / core / skbuff.c
index 7b7c6c44c2da28b5fe2e22ababff4dcd61e6e72e..32d5826b7177078eb51dd99bc1887b974516888f 100644 (file)
@@ -415,13 +415,6 @@ static struct sk_buff *__skb_clone(struct sk_buff *n, struct sk_buff *skb)
        n->hdr_len = skb->nohdr ? skb_headroom(skb) : skb->hdr_len;
        n->nohdr = 0;
        n->destructor = NULL;
-#ifdef CONFIG_NET_CLS_ACT
-       /* FIXME What is this and why don't we do it in copy_skb_header? */
-       n->tc_verd = SET_TC_VERD(n->tc_verd,0);
-       n->tc_verd = CLR_TC_OK2MUNGE(n->tc_verd);
-       n->tc_verd = CLR_TC_MUNGED(n->tc_verd);
-       C(iif);
-#endif
        C(truesize);
        atomic_set(&n->users, 1);
        C(head);
@@ -2035,8 +2028,8 @@ void __init skb_init(void)
  *     Fill the specified scatter-gather list with mappings/pointers into a
  *     region of the buffer space attached to a socket buffer.
  */
-int
-skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len)
+static int
+__skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len)
 {
        int start = skb_headlen(skb);
        int i, copy = start - offset;
@@ -2085,7 +2078,8 @@ skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len)
                        if ((copy = end - offset) > 0) {
                                if (copy > len)
                                        copy = len;
-                               elt += skb_to_sgvec(list, sg+elt, offset - start, copy);
+                               elt += __skb_to_sgvec(list, sg+elt, offset - start,
+                                                     copy);
                                if ((len -= copy) == 0)
                                        return elt;
                                offset += copy;
@@ -2097,6 +2091,15 @@ skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len)
        return elt;
 }
 
+int skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len)
+{
+       int nsg = __skb_to_sgvec(skb, sg, offset, len);
+
+       sg_mark_end(&sg[nsg - 1]);
+
+       return nsg;
+}
+
 /**
  *     skb_cow_data - Check that a socket buffer's data buffers are writable
  *     @skb: The socket buffer to check.