Skip to contentSkip to conversation

[Fwd: Re: Interdomain comms]

Fwd: Re: Interdomain comms Harry Butterworth 2 participants 2 messages May 6, 2005

lore
Share & tools
lore
#0 lore raw

oops, forgot to copy the list on this reply.

Quoted 4 lines · Mike Wray
Quoted 1 line · Harry Butterworth

What exactly were the issues with the socket-like proposal?

The main objection was from Keir, he thought it was 'overkill'.

Given that the ratio of IDC API clients to IDC API implementations is many to one I think it makes sense to invest in the IDC API implementation to save effort in the clients.

Also, having smaller clients and more common code will make it easier to introduce security features and implement performance optimisations.

Also, with a simpler API, there is less missing documentation ;-)

Seems like a no-brainer to me. Maybe Keir has more specific objections?

Quoted 8 lines

I agree with that. I've attached what I sent out as the socket proposal. Thinking about it though, I don't really see why the api can't use the standard linux kernel 'struct sock' for the endpoints and 'struct sk_buff' for the data. These are both very flexible structs and can hide a lot of stuff. You need some struct for the addressing.

The sk_buffs could be allocated out of the ring messages to avoid copying.

Ideally, I think the API should be self-contained, independent of Linux and not a derived work because equivalent function is going to be required for other paravirtualized operating systems and it would be good to be able to have a common code base.

The extra features in my API are all there for a reason: transactions with a request and response phase are convenient for the clients; the three states for the connection allow bracketing of changes in the availability of the resources that are of relevance to a specific client without global coordination; I specifically included the guarantees required to cope with stale communications; my sketch was expressed independent of the existing linux code and my API is sufficiently different from the well known sockets API that people won't get the two APIs confused.

Again, this is just a sketch. If I thought about it I might want to change it significantly.

I really must force myself to get back to the USB stuff now.

Harry.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 3 lines · Harry Butterworth
Quoted 3 lines

I agree with that. I've attached what I sent out as the socket proposal. Thinking about it though, I don't really see why the api can't use the standard linux kernel 'struct sock' for the endpoints and 'struct sk_buff'

struct sock is very, very, large - and we need to be much more memory-sensitive than mainline Linux. That does seem to me to be overkill.

Quoted 5 lines
Quoted 5 lines

for the data. These are both very flexible structs and can hide a lot of stuff. You need some struct for the addressing.

The sk_buffs could be allocated out of the ring messages to avoid copying.

You can do this with smaller subsets of that struct, certainly.

Quoted 4 lines

Ideally, I think the API should be self-contained, independent of Linux and not a derived work because equivalent function is going to be required for other paravirtualized operating systems and it would be good to be able to have a common code base.

Good point.

Quoted 9 lines

The extra features in my API are all there for a reason: transactions with a request and response phase are convenient for the clients; the three states for the connection allow bracketing of changes in the availability of the resources that are of relevance to a specific client without global coordination; I specifically included the guarantees required to cope with stale communications; my sketch was expressed independent of the existing linux code and my API is sufficiently different from the well known sockets API that people won't get the two APIs confused.

It will be cleaner to build an alternative virtual infrastructure underneath, too.

thanks,
Nivedita