All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy King <acking@vmware.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: pv-drivers@vmware.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	gregkh@linuxfoundation.org, davem@davemloft.net
Subject: Re: [PATCH 1/1] VSOCK: Introduce VM Sockets
Date: Mon, 18 Feb 2013 09:07:31 -0800 (PST)	[thread overview]
Message-ID: <1398469748.2079082.1361207251021.JavaMail.root@vmware.com> (raw)
In-Reply-To: <511CC511.7080902@redhat.com>

Hi Gerd,

> > +		written = transport->stream_enqueue(
> > +				vsk, msg->msg_iov,
> > +				len - total_written);
> 
> Hmm, shouldn't we pass total_written to stream_enqueue here?
> 
> In case a blocking send(big-buffer) call gets splitted into multiple
> stream_enqueue calls the second (and further) stream_enqueue calls need
> to know at which msg offset they should continue sending the data, no?

On the client side, the iov tracks it internally; see memcpy_fromiovec().
On the socket side, VMCI uses a ring buffer, so it also knows its
position internally.  Or did I misunderstand the question?

Thanks!
- Andy

WARNING: multiple messages have this Message-ID (diff)
From: Andy King <acking@vmware.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	gregkh@linuxfoundation.org, davem@davemloft.net,
	pv-drivers@vmware.com
Subject: Re: [PATCH 1/1] VSOCK: Introduce VM Sockets
Date: Mon, 18 Feb 2013 09:07:31 -0800 (PST)	[thread overview]
Message-ID: <1398469748.2079082.1361207251021.JavaMail.root@vmware.com> (raw)
In-Reply-To: <511CC511.7080902@redhat.com>

Hi Gerd,

> > +		written = transport->stream_enqueue(
> > +				vsk, msg->msg_iov,
> > +				len - total_written);
> 
> Hmm, shouldn't we pass total_written to stream_enqueue here?
> 
> In case a blocking send(big-buffer) call gets splitted into multiple
> stream_enqueue calls the second (and further) stream_enqueue calls need
> to know at which msg offset they should continue sending the data, no?

On the client side, the iov tracks it internally; see memcpy_fromiovec().
On the socket side, VMCI uses a ring buffer, so it also knows its
position internally.  Or did I misunderstand the question?

Thanks!
- Andy

  reply	other threads:[~2013-02-18 17:07 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07  0:23 [PATCH 0/1] VM Sockets for Linux upstreaming Andy King
2013-02-07  0:23 ` [PATCH 1/1] VSOCK: Introduce VM Sockets Andy King
2013-02-07  0:23   ` Andy King
2013-02-11 14:22   ` Gerd Hoffmann
2013-02-11 14:22     ` Gerd Hoffmann
2013-02-12 15:21     ` Andy King
2013-02-12 15:21       ` Andy King
2013-02-13  3:21       ` [Pv-drivers] " Andy King
2013-02-13 11:06       ` Gerd Hoffmann
2013-02-13 11:06         ` Gerd Hoffmann
2013-02-14  3:20         ` Andy King
2013-02-14  3:20           ` Andy King
2013-02-14  9:28           ` Gerd Hoffmann
2013-02-14  9:28             ` Gerd Hoffmann
2013-02-12 10:58   ` Gerd Hoffmann
2013-02-12 10:58     ` Gerd Hoffmann
2013-02-13  3:23     ` Andy King
2013-02-13  3:23       ` Andy King
2013-02-13 12:44   ` Gerd Hoffmann
2013-02-13 12:44     ` Gerd Hoffmann
2013-02-14  3:07     ` Andy King
2013-02-14  3:07       ` Andy King
2013-02-18 16:56     ` Andy King
2013-02-18 16:56       ` Andy King
2013-02-14 11:05   ` Gerd Hoffmann
2013-02-14 11:05     ` Gerd Hoffmann
2013-02-18 17:07     ` Andy King [this message]
2013-02-18 17:07       ` Andy King
2013-02-19  8:45       ` Gerd Hoffmann
2013-02-19  8:45         ` Gerd Hoffmann
2013-02-14 20:18   ` Sasha Levin
2013-02-14 20:18     ` Sasha Levin
2013-02-18 17:09     ` Andy King
2013-02-18 17:09     ` Andy King
2013-02-15 10:32   ` Gerd Hoffmann
2013-02-15 10:32     ` Gerd Hoffmann
2013-02-09  1:20 ` [Pv-drivers] [PATCH 0/1] VM Sockets for Linux upstreaming Dmitry Torokhov
2013-02-09  1:20   ` Dmitry Torokhov
2013-02-09  2:59   ` David Miller
2013-02-09  2:59     ` David Miller
2013-02-11  1:10 ` David Miller
2013-02-11  1:10   ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2013-02-04 23:26 Andy King
2013-02-04 23:26 ` [PATCH 1/1] VSOCK: Introduce VM Sockets Andy King
2013-02-04 23:26   ` Andy King
2013-01-25 17:37 [PATCH 0/1] VM Sockets for Linux upstreaming acking
2013-01-25 17:37 ` [PATCH 1/1] VSOCK: Introduce VM Sockets acking
2013-01-25 17:37   ` acking
2013-01-25 23:59   ` Neil Horman
2013-01-25 23:59   ` Neil Horman
2013-01-28 12:25   ` Gerd Hoffmann
2013-01-31 22:06     ` Andy King
2013-01-31 22:06       ` Andy King
2013-02-01  8:12       ` Gerd Hoffmann
2013-02-01  8:12         ` Gerd Hoffmann
2013-02-01  8:12         ` Gerd Hoffmann
2013-02-04 23:41         ` Andy King
2013-02-04 23:41           ` Andy King
2013-01-28 12:25   ` Gerd Hoffmann

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=1398469748.2079082.1361207251021.JavaMail.root@vmware.com \
    --to=acking@vmware.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pv-drivers@vmware.com \
    --cc=virtualization@lists.linux-foundation.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.