From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jose Abreu Subject: Re: tc: Using u32 filter Date: Fri, 27 Apr 2018 16:56:23 +0100 Message-ID: <5867d6f3-d4fc-0b04-2ea6-ee0a2f8afa8b@synopsys.com> References: <27482470-930e-916d-2ace-deedf3019369@synopsys.com> <20180427150431.GB5632@nanopsycho.orion> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Cc: "netdev@vger.kernel.org" , Joao Pinto To: Jiri Pirko , Jose Abreu Return-path: Received: from smtprelay6.synopsys.com ([198.182.37.59]:36920 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758472AbeD0P5G (ORCPT ); Fri, 27 Apr 2018 11:57:06 -0400 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 06DF71E04F9 for ; Fri, 27 Apr 2018 17:57:05 +0200 (CEST) In-Reply-To: <20180427150431.GB5632@nanopsycho.orion> Sender: netdev-owner@vger.kernel.org List-ID: On 27-04-2018 16:04, Jiri Pirko wrote: > Fri, Apr 27, 2018 at 04:15:46PM CEST, Jose.Abreu@synopsys.com wrote: >> Hi, >> >> I'm trying to use u32 filter to filter specific fields of packets >> by HW *only* but I'm having a hard time in trying to run tc to >> configure it. >> I implemented a dummy .ndo_setup_tc callback which always returns >> success and I set NETIF_F_HW_TC field in hw_features. Then I run > Did you register a block cb? Yeah, I was missing that. Its working now :D Thanks Jiri! Best Regards, Jose Miguel Abreu > >> tc, like this: >> >> # tc filter add dev eth0 u32 skip_sw sample u32 20 ffff at 0 >> >> At this stage I'm not really caring about the packet content (the >> "20 ffff at 0"), I just want to see the configuration reaching my >> driver but I'm getting a "RTNETLINK answers: Operation not >> supported" error. >> >> Can you tell me what I'm I doing wrong? >> >> Thanks and Best Regards, >> Jose Miguel Abreu