netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* zero copy for relay server
@ 2011-03-28 16:27 Viral Mehta
  2011-03-28 16:52 ` Eric Dumazet
  0 siblings, 1 reply; 8+ messages in thread
From: Viral Mehta @ 2011-03-28 16:27 UTC (permalink / raw)
  To: netdev@vger.kernel.org

Hi,
I am implementing a particular application where
my application acts nothing but like Relay Server.

Relay server accepts connection from machine A.
It also accepts connection from Machine B.

Machine A and B are on different LAN/subnnets.
Now, there are two connections.
What server is supposed to do is RECV packets from machine A and SEND same
to machine B.

Pseudo Code is something like,
while(1)
{
recvagain:
   n =3D recv(incoming_fd, &buf, 8192, ...)
   if(n < 0)
        goto recvagain;
   send(outgoing_fd, &buf, n, ...);
}

Now the question is,
I want to avoid kernel-user copy for such application.
I found that a syscall like "sendfile"; I wanted to know if there is any
similar thing exists in-kernel which can take 2 socket descriptors....

If not, is it possible ? I would like to implement the same if someone
can suggest some pointers.

Thanks,
Viral

The contents of this e-mail and any attachment(s) may contain confidential or privileged information for the intended recipient(s). Unintended recipients are prohibited from taking action on the basis of information in this e-mail and  using or disseminating the information,  and must notify the sender and delete it from their system. L&T Infotech will not accept responsibility or liability for the accuracy or completeness of, or the presence of any virus or disabling code in this e-mail"

______________________________________________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-03-29 14:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-28 16:27 zero copy for relay server Viral Mehta
2011-03-28 16:52 ` Eric Dumazet
2011-03-28 18:18   ` Viral Mehta
2011-03-28 18:34     ` Eric Dumazet
2011-03-29  2:00       ` Changli Gao
2011-03-29  4:23         ` Eric Dumazet
2011-03-29 11:28           ` Changli Gao
2011-03-29 14:13             ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).