* setsockopt option struct with an address?
@ 2009-10-01 20:17 Andrew Grover
2009-10-01 20:30 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Grover @ 2009-10-01 20:17 UTC (permalink / raw)
To: netdev
Hi all, I'm looking for some advice on defining a new interface.
RDS has an existing interface to prepare a memory region for use in an
RDMA operation, called GET_MR. (see include/linux/rds.h). It basically
takes an address and length, and returns a handle that later commands
use to reference the region.
We need to add an additional sockopt that also passes in the remote
host's address, because the current method for defining memory regions
binds their use to a particular remote host only.
Here's the original sockopt's args:
struct rds_get_mr_args {
struct rds_iovec vec;
u_int64_t cookie_addr;
uint64_t flags;
};
Here is a swag at the new sockopt's args:
struct rds_get_mr_for_dest_args {
u_int32_t dest_addr; /* added this */
struct rds_iovec vec;
u_int64_t cookie_addr;
uint64_t flags;
};
Or should the added member be a struct sockaddr, or a sockaddr_in, or
a sockaddr_storage, or what? And should it be a pointer to that
struct, or embedded?
Much thanks -- Regards -- Andy
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: setsockopt option struct with an address?
2009-10-01 20:17 setsockopt option struct with an address? Andrew Grover
@ 2009-10-01 20:30 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-10-01 20:30 UTC (permalink / raw)
To: andy.grover; +Cc: netdev
From: Andrew Grover <andy.grover@gmail.com>
Date: Thu, 1 Oct 2009 13:17:03 -0700
> Or should the added member be a struct sockaddr, or a sockaddr_in, or
> a sockaddr_storage, or what? And should it be a pointer to that
> struct, or embedded?
You probably should use sockaddr_storage, I mean you will want to
support ipv6 at some point right? :-)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-01 20:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-01 20:17 setsockopt option struct with an address? Andrew Grover
2009-10-01 20:30 ` David Miller
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).