Historic archive of defunct list bloat-devel@lists.bufferbloat.net
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Dave Taht <dave.taht@gmail.com>
Cc: bloat-devel <bloat-devel@lists.bufferbloat.net>, dropbear@ucc.asn.au
Subject: Re: [PATCH] Set TOS (TCLASS) bits under ipv6
Date: Wed, 28 Sep 2011 10:02:27 -0700	[thread overview]
Message-ID: <20110928100227.6fb9f435@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <CAA93jw7n2dwASNmK41WEshb3By013e-g7DLOFXhkh+MNpXORYA@mail.gmail.com>

On Wed, 28 Sep 2011 06:03:01 -0700
Dave Taht <dave.taht@gmail.com> wrote:

> > I agree flags for SCP would make sense, I'll take a look
> > where to do that.  
> 
> I think openssh does half the job (the scp side sets bulk),
> I haven't looked at it yet (mostly working on cerowrt
> right now)

If you look at latest openssh source (5.6p1) then you will see
that it has codt to DSCP bits the same for both IPv4 and IPv6.

	packet_set_tos(interactive ? qos_interactive : qos_bulk);

static void
packet_set_tos(int tos)
{
#ifndef IP_TOS_IS_BROKEN
	if (!packet_connection_is_on_socket())
		return;
	switch (packet_connection_af()) {
# ifdef IP_TOS
	case AF_INET:
		debug3("%s: set IP_TOS 0x%02x", __func__, tos);
		if (setsockopt(active_state->connection_in,
		    IPPROTO_IP, IP_TOS, &tos, sizeof(tos)) < 0)
			error("setsockopt IP_TOS %d: %.100s:",
			    tos, strerror(errno));
		break;
# endif /* IP_TOS */
# ifdef IPV6_TCLASS
	case AF_INET6:
		debug3("%s: set IPV6_TCLASS 0x%02x", __func__, tos);
		if (setsockopt(active_state->connection_in,
		    IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof(tos)) < 0)
			error("setsockopt IPV6_TCLASS %d: %.100s:",
			    tos, strerror(errno));
		break;
# endif /* IPV6_TCLASS */
	}
#endif /* IP_TOS_IS_BROKEN */
}

This version of openssh is in Debian testing (wheezy) and probably
other bleeding edge distros.


      reply	other threads:[~2011-09-28 17:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAA93jw62sm9QVF19WauwUn104KAqgVKjazmjY6ok8BKoxTEujg@mail.gmail.com>
     [not found] ` <20110928124750.GR1128@ucc.gu.uwa.edu.au>
2011-09-28 13:03   ` Dave Taht
2011-09-28 17:02     ` Stephen Hemminger [this message]

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=20110928100227.6fb9f435@nehalam.linuxnetplumber.net \
    --to=shemminger@vyatta.com \
    --cc=bloat-devel@lists.bufferbloat.net \
    --cc=dave.taht@gmail.com \
    --cc=dropbear@ucc.asn.au \
    /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