All of lore.kernel.org
 help / color / mirror / Atom feed
* tc: Using u32 filter
@ 2018-04-27 14:15 Jose Abreu
  2018-04-27 15:04 ` Jiri Pirko
  0 siblings, 1 reply; 3+ messages in thread
From: Jose Abreu @ 2018-04-27 14:15 UTC (permalink / raw)
  To: netdev; +Cc: Joao Pinto

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
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: tc: Using u32 filter
  2018-04-27 14:15 tc: Using u32 filter Jose Abreu
@ 2018-04-27 15:04 ` Jiri Pirko
  2018-04-27 15:56   ` Jose Abreu
  0 siblings, 1 reply; 3+ messages in thread
From: Jiri Pirko @ 2018-04-27 15:04 UTC (permalink / raw)
  To: Jose Abreu; +Cc: netdev, Joao Pinto

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?

>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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: tc: Using u32 filter
  2018-04-27 15:04 ` Jiri Pirko
@ 2018-04-27 15:56   ` Jose Abreu
  0 siblings, 0 replies; 3+ messages in thread
From: Jose Abreu @ 2018-04-27 15:56 UTC (permalink / raw)
  To: Jiri Pirko, Jose Abreu; +Cc: netdev, Joao Pinto

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-27 15:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-27 14:15 tc: Using u32 filter Jose Abreu
2018-04-27 15:04 ` Jiri Pirko
2018-04-27 15:56   ` Jose Abreu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.