From: Andy Furniss Date: Tue, 28 Mar 2017 22:07:56 +0000 Subject: Re: Problem using tc-sfq with tc-flow for arbitrary hashing Message-Id: List-Id: References: <18AC8370-6B1E-4A01-B5E4-BA637BA485C0@gmail.com> In-Reply-To: <18AC8370-6B1E-4A01-B5E4-BA637BA485C0@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: lartc@vger.kernel.org Carmelo Cascone wrote: > Hi all, > > I have a problem in configuring tc-sfq along with tc-flow. I would like to hash packets not using the UDP/TCP 5-tuple (default beahvior of tc-sfq), but simply the pair . I’m having hard time using tc-flow and finding help on the web, as such I decided to drop an email to this list. > > The commands and error I get are: > > $ tc qdisc add dev eth6 root handle 1: sfq > $ tc filter add dev eth6 parent 1:0 protocol ip prio 1 flow hash keys src,dst perturb 30 divisor 1024 > RTNETLINK answers: Invalid argument > We have an error talking to the kernel > > I’m issuing these commands on a Debian 9 with a kernel v4.9.16 > Please note that the tc filter command is the same used in the tc-sfq documentation. > > What am I doing wrong? What is the invalid argument? Looking through many years old Qos folder I found a file with an example. I don't know why it's not documented, but but adding handle 1 to the filter command makes your example work for me, in the sense that it's not rejected - didn't test further. Historically I would have said putting sfq on root of an eth wouldn't do much, but with BQLs maybe things have changed.