From: Chris Friesen <cfriesen@nortelnetworks.com>
To: kuznet@ms2.inr.ac.ru
Cc: "David S. Miller" <davem@redhat.com>,
jmorris@redhat.com, hadi@znyx.com, netdev@oss.sgi.com
Subject: Re: Fw: issues with SO_PRIORITY and IP_TOS
Date: Tue, 04 Nov 2003 12:02:45 -0500 [thread overview]
Message-ID: <3FA7DBB5.1090500@nortelnetworks.com> (raw)
In-Reply-To: 200311041233.PAA15518@yakov.inr.ac.ru
kuznet@ms2.inr.ac.ru wrote:
>>Currently, for me to send a packet with IP precedence bits set to a
>>nonzero value *and* vlan priority set to the same value, I have to do
>>the following:
>>
>>int opt = PRIORITY << 5;
>>setsockopt(mysocks[i], SOL_IP, IP_TOS, &opt, sizeof(opt));
>>opt = PRIORITY;
>>setsockopt(mysocks[i], SOL_SOCKET, SO_PRIORITY, &opt, sizeof(opt));
> Hmm.. This is kinda nice. IP_TOS sets real TOS bits without any funny
> shifts and masks, but with some reasonable access control, SO_PRIORITY
> sets priority. TOS and PRIORITY are not related.
If that were the case, I'd be happy. However, when you set the TOS bits
(which really sets the whole 8-bit field, rather than just the 4 TOS
bits), the kernel also sets the socket priority but only uses the TOS
bits to do so. If we're going to set the whole 8-bit field, wouldn't it
make sense to use the priority bits to set the priority? Or even leave
the socket priority totally alone?
This is why I proposed the IP_DSCP option which would have sane handling
of the socket priority when setting the DSCP value.
> I do not even think that IP_DSCP makes sense in diffserv environment.
> Packets are marked according to DS rules, not according to desire
> of particular user.
If root wants to send out a packet with particular DSCP settings,
doesn't it make sense to make that option available? It's a field in
the IP packet header, we should be able to set it with an IP option.
Chris
--
Chris Friesen | MailStop: 043/33/F10
Nortel Networks | work: (613) 765-0557
3500 Carling Avenue | fax: (613) 765-2986
Nepean, ON K2H 8E9 Canada | email: cfriesen@nortelnetworks.com
next prev parent reply other threads:[~2003-11-04 17:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20031030120140.678b721b.davem@redhat.com>
2003-11-04 12:33 ` Fw: issues with SO_PRIORITY and IP_TOS kuznet
2003-11-04 16:04 ` Jamal Hadi Salim
2003-11-04 17:02 ` Chris Friesen [this message]
2003-11-05 14:54 ` Jamal Hadi Salim
2003-11-06 9:31 ` kuznet
2003-11-06 14:51 ` Chris Friesen
2003-11-13 11:08 ` kuznet
2003-11-13 17:48 ` Chris Friesen
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=3FA7DBB5.1090500@nortelnetworks.com \
--to=cfriesen@nortelnetworks.com \
--cc=davem@redhat.com \
--cc=hadi@znyx.com \
--cc=jmorris@redhat.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@oss.sgi.com \
/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).