From: Tomasz Grobelny <tomasz@grobelny.oswiecenia.net>
To: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Cc: acme@redhat.com, dccp@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 1/1] [DCCP][QPOLICY]: Make information about qpolicies available to userspace
Date: Thu, 22 May 2008 02:35:41 +0200 [thread overview]
Message-ID: <200805220235.41441.tomasz@grobelny.oswiecenia.net> (raw)
In-Reply-To: <20080521120651.GA24590@gerrit.erg.abdn.ac.uk>
Dnia Wednesday 21 of May 2008, Gerrit Renker napisał:
> Hi Tomasz,
>
> | Since packets with invalid cmsg parameters can be rejected by kernel
> | there is a need to allow applications to access information on available
> | policies and their respective cmsg parameters at runtime. This patch
> | simplifies maintaining compatibility between userspace applications and
> | DCCP code.
>
> The difference to querying supported CCIDs is that
> * CCIDs are all defined per RFC documents, and that
Yes, but does that change anything?
> * different combinations of CCIDs are possible due to the Kconfig options.
>
Here we can have various kernel versions which is not much different. In both
cases we need runtime feature detection.
> As far as I understand your patch, querying here has a different role -
> ensuring compatibilities between kernel versions.
>
Yes.
> I think it might be too early for that:
> * it takes quite a long while until patches propagate through to
> mainline (more than half a year), so that there is the time to
> come up with a single, well-tested interface;
But when it gets into mainline people should be able to write applications
that will be forward and backward compatible (as far as possible) with
various kernel versions.
> * at this stage it would be better to have documentation (man pages,
> web pages, sample application code etc.) to allow people to use
> the interface - few will want to discover the interface by grepping
> through source code.
>
Sure it would be nice to have applications that use this interface. But in my
opinion the basic interface is not yet ready to be included in mainline
applications. It especially lacks features that will allow application
developers to maintain compatibility.
> DCCP is full of half-finished things.
That's why I'm trying to finish the qpolicy framework. Without providing
runtime information it will turn out that application developers will be
afraid to use new features just because the application won't be able to
check if given parameter is supported or not.
> I would much prefer to keep this
> as simple as at all possible, to have time/room to fix the missing parts
> (such as no ECN support) in DCCP.
>
I understand that there might be some missing features in DCCP that are more
important than yet another informational getsockopt. But these features are
IMO highly independent and can be developed in parallel.
> As a possible suggestion, I came up with a minimalistic variant of
> querying the interface - only 7 lines, including documentation.
>
> This is attached and it works by exploiting that
> * policy IDs are just numbers;
> * so that we could use the highest supported ID instead of an array;
I don't like the "highest supported ID" approach. But if you don't like arrays
a simple "bool getsockopt" would do, we could just ask the kernel if it
supports given qpolicy. Like (in pseudocode):
bool supports_prio=getsockopt(sk,DCCP_SOCKOPT_QPOLICY_AVAILABLE,QPOLICY_PRIO);
Would that be ok?
> * parameters are tied to the individual policy, so that a second
> query (about which parameters are supported) is not necessary.
>
Can you guarantee that nobody ever will add a parameter? In fact even today I
can think of two parameters that could be added: the previously discussed
timeout and my new concept - the identity or category parameter (which is a
subject for a separate thread).
BTW, the somewhat big code was meant to act as a framework for other features.
Like getting information about percent of dropped packets in prio qpolicy
queue.
--
Regards,
Tomasz Grobelny
next prev parent reply other threads:[~2008-05-22 0:36 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080517155916.34622BD22@poczta.oswiecenia.net>
2008-05-21 12:06 ` [PATCH 1/1] [DCCP][QPOLICY]: Make information about qpolicies available to userspace Gerrit Renker
2008-05-22 0:35 ` Tomasz Grobelny [this message]
2008-05-22 10:02 ` Gerrit Renker
2008-05-22 17:48 ` Tomasz Grobelny
2008-05-26 14:22 ` Gerrit Renker
2008-05-26 21:40 ` Tomasz Grobelny
2008-06-01 17:48 ` Tomasz Grobelny
2008-06-04 15:09 ` Gerrit Renker
2008-06-08 12:21 ` Tomasz Grobelny
2008-06-10 11:49 ` Gerrit Renker
2008-06-11 17:43 ` Tomasz Grobelny
2008-06-12 9:07 ` Gerrit Renker
2008-06-14 23:58 ` Tomasz Grobelny
2008-06-17 11:16 ` Gerrit Renker
2008-06-17 20:28 ` Tomasz Grobelny
2008-06-17 20:47 ` Randy.Dunlap
2008-06-18 9:40 ` Gerrit Renker
2008-06-18 20:46 ` Tomasz Grobelny
2008-06-19 7:05 ` Gerrit Renker
2008-06-20 21:03 ` Tomasz Grobelny
2008-06-23 16:58 ` Gerrit Renker
2008-06-24 8:02 ` Tomasz Grobelny
2008-06-25 18:05 ` Gerrit Renker
2008-06-25 20:15 ` Tomasz Grobelny
2008-06-30 12:39 ` Gerrit Renker
2008-07-01 12:38 ` Tomasz Grobelny
2008-06-02 10:21 ` Gerrit Renker
2008-06-02 21:56 ` Tomasz Grobelny
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=200805220235.41441.tomasz@grobelny.oswiecenia.net \
--to=tomasz@grobelny.oswiecenia.net \
--cc=acme@redhat.com \
--cc=dccp@vger.kernel.org \
--cc=gerrit@erg.abdn.ac.uk \
--cc=netdev@vger.kernel.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 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).