[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANP3RGdj-vGz8Bx42T-m__2pi2_WsB4K=gamh-zxfaERmRARjw@mail.gmail.com>
Date: Mon, 7 Nov 2011 16:25:00 -0800
From: Maciej Żenczykowski <maze@...gle.com>
To: Maciej Żenczykowski <maze@...gle.com>
Cc: netdev@...r.kernel.org, Murali Raja <muralira@...gle.com>,
Stephen Hemminger <shemminger@...tta.com>,
Eric Dumazet <eric.dumazet@...il.com>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH] net-netlink: Add a new attribute to expose TCLASS values
via netlink
FYI, This obviously requires a follow up patch which will add TOS and
TCLASS info to appropriate dual-stack sockets (for example listening
tcp v6 non-ipv6only).
On Mon, Nov 7, 2011 at 4:23 PM, Maciej Żenczykowski
<zenczykowski@...il.com> wrote:
> From: Maciej Żenczykowski <maze@...gle.com>
>
> commit 3ceca749668a52bd795585e0f71c6f0b04814f7b added a TOS attribute.
>
> Unfortunately TOS and TCLASS are both present in a dual-stack v6 socket,
> furthermore they can have different values. As such one cannot in a
> sane way expose both through a single attribute.
>
> Signed-off-by: Maciej Żenczyowski <maze@...gle.com>
> CC: Murali Raja <muralira@...gle.com>
> CC: Stephen Hemminger <shemminger@...tta.com>
> CC: Eric Dumazet <eric.dumazet@...il.com>
> CC: David S. Miller <davem@...emloft.net>
> ---
> include/linux/inet_diag.h | 3 ++-
> net/ipv4/inet_diag.c | 4 ++--
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/inet_diag.h b/include/linux/inet_diag.h
> index 80b480c..abf5028 100644
> --- a/include/linux/inet_diag.h
> +++ b/include/linux/inet_diag.h
> @@ -98,9 +98,10 @@ enum {
> INET_DIAG_VEGASINFO,
> INET_DIAG_CONG,
> INET_DIAG_TOS,
> + INET_DIAG_TCLASS,
> };
>
> -#define INET_DIAG_MAX INET_DIAG_TOS
> +#define INET_DIAG_MAX INET_DIAG_TCLASS
>
>
> /* INET_DIAG_MEM */
> diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
> index f5e2bda..68e8ac5 100644
> --- a/net/ipv4/inet_diag.c
> +++ b/net/ipv4/inet_diag.c
> @@ -133,8 +133,8 @@ static int inet_csk_diag_fill(struct sock *sk,
> &np->rcv_saddr);
> ipv6_addr_copy((struct in6_addr *)r->id.idiag_dst,
> &np->daddr);
> - if (ext & (1 << (INET_DIAG_TOS - 1)))
> - RTA_PUT_U8(skb, INET_DIAG_TOS, np->tclass);
> + if (ext & (1 << (INET_DIAG_TCLASS - 1)))
> + RTA_PUT_U8(skb, INET_DIAG_TCLASS, np->tclass);
> }
> #endif
>
> --
> 1.7.3.1
>
>
--
Maciej A. Żenczykowski
Kernel Networking Developer @ Google
1600 Amphitheatre Parkway, Mountain View, CA 94043
tel: +1 (650) 253-0062
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists