[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1426104582.11398.61.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Wed, 11 Mar 2015 13:09:42 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Cong Wang <cwang@...pensource.com>
Cc: netdev <netdev@...r.kernel.org>,
Jamal Hadi Salim <jhs@...atatu.com>,
David Miller <davem@...emloft.net>
Subject: Re: Why do we prefer skb->priority to tc filters?
On Wed, 2015-03-11 at 12:18 -0700, Cong Wang wrote:
> This is exactly why I am asking, kernel respects user's choice so much
> that it could override even both cgroup prio and tc filters, I don't know
> what is the reason behind, but this means our tc filters can not work
> with an application which sets skb->priority. For example, our tc filters
> classify the packets from this socket into flow 1:1, but application
> sets 1:2 by itself...
Application cannot set whatever skb->priority, unless it really knows
better than kernel.
case SO_PRIORITY:
if ((val >= 0 && val <= 6) ||
ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN))
sk->sk_priority = val;
else
ret = -EPERM;
break;
--
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