From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org
Subject: Re: [PATCH 2/2] Change net c/r to use exported page I/O functions
Date: Tue, 17 Nov 2009 22:17:07 -0600 [thread overview]
Message-ID: <20091118041707.GA19841@us.ibm.com> (raw)
In-Reply-To: <1258489484-28227-3-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Quoting Dan Smith (danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org):
> +static int __sock_write_skb_frag(struct ckpt_ctx *ctx,
> + skb_frag_t *frag)
> +{
> + struct ckpt_hdr_socket_buffer_frag *h;
> + int ret;
> +
> + h = ckpt_hdr_get_type(ctx, sizeof(*h), CKPT_HDR_SOCKET_FRAG);
> + if (!h)
> + return -ENOMEM;
> +
> + h->size = frag->size;
> + h->offset = frag->page_offset;
> +
> + ret = ckpt_write_obj(ctx, (struct ckpt_hdr *)h);
> + ckpt_hdr_put(ctx, h);
> + if (ret < 0)
> + goto out;
> +
> + ret = checkpoint_dump_page(ctx, frag->page);
> + ckpt_debug("writing frag page: %i\n", ret);
> + if (ret < 0)
> + goto out;
> +
> + out:
> + ckpt_hdr_put(ctx, h);
I assume you meant to get rid of this second ckpt_hdr_put()?
> +
> + return ret;
> +}
> +
> static int __sock_write_skb(struct ckpt_ctx *ctx,
> struct sk_buff *skb,
> int dst_objref)
> @@ -316,16 +348,12 @@ static int __sock_write_skb(struct ckpt_ctx *ctx,
>
> for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
> skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
> - u8 *vaddr = kmap(frag->page);
> -
> + ret = __sock_write_skb_frag(ctx, frag);
> ckpt_debug("writing buffer fragment %i/%i (%i)\n",
> - i + 1, h->nr_frags, frag->size);
> - ret = ckpt_write_obj_type(ctx, vaddr + frag->page_offset,
> - frag->size, CKPT_HDR_BUFFER);
> - kunmap(frag->page);
> - h->frg_len -= frag->size;
> + i + 1, h->nr_frags, ret);
> if (ret < 0)
> goto out;
> + h->frg_len -= frag->size;
> }
>
> WARN_ON(h->frg_len != 0);
> --
> 1.6.2.5
>
> _______________________________________________
> Containers mailing list
> Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
> https://lists.linux-foundation.org/mailman/listinfo/containers
next prev parent reply other threads:[~2009-11-18 4:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-17 20:24 Change net c/r to use stock page I/O functions Dan Smith
[not found] ` <1258489484-28227-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-11-17 20:24 ` [PATCH 1/2] Expose page read/write functions Dan Smith
2009-11-17 20:24 ` [PATCH 2/2] Change net c/r to use exported page I/O functions Dan Smith
[not found] ` <1258489484-28227-3-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-11-18 4:17 ` Serge E. Hallyn [this message]
[not found] ` <20091118041707.GA19841-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-11-18 15:33 ` Dan Smith
2009-11-25 18:53 ` Change net c/r to use stock " Oren Laadan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091118041707.GA19841@us.ibm.com \
--to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.