Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* tc filter by source port and destination port strange offset
@ 2020-08-19 21:30 Denis Gubin
  2020-08-20 16:32 ` David Ahern
  0 siblings, 1 reply; 2+ messages in thread
From: Denis Gubin @ 2020-08-19 21:30 UTC (permalink / raw)
  To: netdev

Dear colleagues,

There are filters.
Let's have a look on it.

Pretty mode showing:

tc -p filter show dev ens5 parent ffff:

filter protocol ip pref 49146 u32 chain 0
filter protocol ip pref 49146 u32 chain 0 fh 806: ht divisor 1
filter protocol ip pref 49146 u32 chain 0 fh 806::800 order 2048 key
ht 806 bkt 0 terminal flowid ??? not_in_hw
  match IP protocol 16
  match dport 8080

Normal  mode showing:

tc filter show dev ens5 parent ffff:


filter protocol ip pref 49146 u32 chain 0
filter protocol ip pref 49146 u32 chain 0 fh 806: ht divisor 1
filter protocol ip pref 49146 u32 chain 0 fh 806::800 order 2048 key
ht 806 bkt 0 terminal flowid ??? not_in_hw
  match 00100000/00ff0000 at 8
  match 00001f90/0000ffff at 20


The string  "match 00100000/00ff0000 at 8" looks like is correct since
offset up 8 byte from IP Header point is "ip protocol field"

But string "match 00001f90/0000ffff at 20" looks like strange, doens't it?
Since 20 bytes offset up is IP Header "options field ip".

Could somebody explain it to me?

-- 
Best regards,
Denis Gubin

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

* Re: tc filter by source port and destination port strange offset
  2020-08-19 21:30 tc filter by source port and destination port strange offset Denis Gubin
@ 2020-08-20 16:32 ` David Ahern
  0 siblings, 0 replies; 2+ messages in thread
From: David Ahern @ 2020-08-20 16:32 UTC (permalink / raw)
  To: Denis Gubin, netdev

On 8/19/20 3:30 PM, Denis Gubin wrote:
> tc -p filter show dev ens5 parent ffff:

pretty mode is for use with json (-j), and there are shortcomings to the
json support in tc.

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

end of thread, other threads:[~2020-08-20 16:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-19 21:30 tc filter by source port and destination port strange offset Denis Gubin
2020-08-20 16:32 ` David Ahern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).