All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>,
	Jakub Kicinski <kuba@kernel.org>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"allan.nielsen@microchip.com" <allan.nielsen@microchip.com>,
	"joergen.andreasen@microchip.com"
	<joergen.andreasen@microchip.com>,
	"UNGLinuxDriver@microchip.com" <UNGLinuxDriver@microchip.com>,
	"vinicius.gomes@intel.com" <vinicius.gomes@intel.com>,
	"jiri@mellanox.com" <jiri@mellanox.com>,
	"idosch@mellanox.com" <idosch@mellanox.com>,
	"alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>,
	Po Liu <po.liu@nxp.com>, Leo Li <leoyang.li@nxp.com>,
	"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
	"andrew@lunn.ch" <andrew@lunn.ch>,
	"vivien.didelot@gmail.com" <vivien.didelot@gmail.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"horatiu.vultur@microchip.com" <horatiu.vultur@microchip.com>
Subject: RE: [PATCH v6 net-next 0/8] net: dsa: felix: psfp support on vsc9959
Date: Wed, 10 Nov 2021 10:32:32 +0000	[thread overview]
Message-ID: <DB8PR04MB5785560CD2387A9D4FF9E259F0939@DB8PR04MB5785.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20211006121214.q5lrg5tl4jkiqkt5@skbuf>

Hi Vladimir,

On Oct 06, 2021 at 20:12:27 +0300, Vladimir Oltean wrote:
> I'm very sorry for being late.
> I wrote this selftest for the ingress time gating portion of Xiaoliang's work:
> 
> cat tools/testing/selftests/drivers/net/ocelot/psfp.sh
> -----------------------------[ cut here ]----------------------------- #!/bin/bash #
> SPDX-License-Identifier: GPL-2.0 # Copyright 2021 NXP
> 
> WAIT_TIME=1
> NUM_NETIFS=4
> lib_dir=$(dirname $0)/../../../net/forwarding source $lib_dir/tc_common.sh
> source $lib_dir/lib.sh
...
Skip
...
> -----------------------------[ cut here ]-----------------------------
> 
> and both tests pass with OK, but here are some parts of my log:
> 
> 
> Expected filter to match on 0 packets but matched on 2 instead
>                                           ~~~~~~~~~~~~~~~~~~~~
>                                           I put "psfp_filter_check 0" at
> the end of "setup_prepare",
>                                           during a time where it is
> guaranteed that no test packet belonging
>                                           to the TSN stream has been
> sent, yet the hardware seems to
>                                           spuriously increment this
> counter. This makes it very difficult
>                                           to actually assess what's
> going on by looking at counters.
>                                           If you look at the comments,
> the SFID counters increment
>                                           spuriously even if I delete the
> MAC table entry.
> 
> Hardware filter reports 0 drops
> OK
> [  275.429138] mscc_felix 0000:00:00.5: vsc9959_psfp_stats_get: pkts 1000
> drops 0 sfid 0 match 1000 not_pass_gate 0 not_pass_sdu 0 red 0 Expected
> filter to match on 1000 packets but matched on 1002 instead Hardware filter
> reports 0 drops Accepted connection from 127.0.0.1 Accepted connection
> from 127.0.0.1 OK [  288.091715] mscc_felix 0000:00:00.5:
> vsc9959_psfp_stats_get: pkts 1000 drops 1000 sfid 0 match 1000
> not_pass_gate 1000 not_pass_sdu 0 red 0
The hardware count also increased in my test. This happens occasionally when
first plug in the internet cable.

> 
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> the driver sums these up and puts them
> 
> in stats->drops Expected filter to match on 2000 packets but matched on 2002
> instead Hardware filter reports 0 drops ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> however "tc -s filter show ..." shows 0 drops, so the information is lost
> somewhere along the way (the "packets" counter is correct though).
This is because stats.drops has not transmit to flow_stats_update() in ocelot_flower.c:
	flow_stats_update(&f->stats, 0x0, stats.pkts, 0, 0x0,
                          FLOW_ACTION_HW_STATS_IMMEDIATE);
I can update this though the stats.drops is not be used for other VCAPs rules.

> 
> 
> It's very hard to have an opinion considering the fact that the hardware
> doesn't behave according to my understanding. One of us must be wrong :)

Thanks,
Xiaoliang

      reply	other threads:[~2021-11-10 10:32 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30  7:59 [PATCH v6 net-next 0/8] net: dsa: felix: psfp support on vsc9959 Xiaoliang Yang
2021-09-30  7:59 ` Xiaoliang Yang
2021-09-30  7:59 ` Xiaoliang Yang
2021-09-30  7:59 ` [PATCH v6 net-next 1/8] net: mscc: ocelot: serialize access to the MAC table Xiaoliang Yang
2021-09-30  7:59   ` Xiaoliang Yang
2021-09-30  7:59   ` Xiaoliang Yang
2021-09-30  7:59 ` [PATCH v6 net-next 2/8] net: mscc: ocelot: add MAC table stream learn and lookup operations Xiaoliang Yang
2021-09-30  7:59   ` Xiaoliang Yang
2021-09-30  7:59   ` Xiaoliang Yang
2021-09-30  7:59 ` [PATCH v6 net-next 3/8] net: mscc: ocelot: set vcap IS2 chain to goto PSFP chain Xiaoliang Yang
2021-09-30  7:59   ` Xiaoliang Yang
2021-09-30  7:59   ` Xiaoliang Yang
2021-09-30  7:59 ` [PATCH v6 net-next 4/8] net: mscc: ocelot: add gate and police action offload to PSFP Xiaoliang Yang
2021-09-30  7:59   ` Xiaoliang Yang
2021-09-30  7:59   ` Xiaoliang Yang
2021-09-30  7:59 ` [PATCH v6 net-next 5/8] net: dsa: felix: support psfp filter on vsc9959 Xiaoliang Yang
2021-09-30  7:59   ` Xiaoliang Yang
2021-09-30  7:59   ` Xiaoliang Yang
2021-10-06 13:13   ` Vladimir Oltean
2021-10-06 13:13     ` Vladimir Oltean
2021-10-06 13:13     ` Vladimir Oltean
2021-11-10 10:43     ` Xiaoliang Yang
2021-11-10 10:43       ` Xiaoliang Yang
2021-11-10 10:43       ` Xiaoliang Yang
2021-09-30  7:59 ` [PATCH v6 net-next 6/8] net: dsa: felix: add stream gate settings for psfp Xiaoliang Yang
2021-09-30  7:59   ` Xiaoliang Yang
2021-09-30  7:59   ` Xiaoliang Yang
2021-09-30  7:59 ` [PATCH v6 net-next 7/8] net: mscc: ocelot: use index to set vcap policer Xiaoliang Yang
2021-09-30  7:59   ` Xiaoliang Yang
2021-09-30  7:59   ` Xiaoliang Yang
2021-09-30  7:59 ` [PATCH v6 net-next 8/8] net: dsa: felix: use vcap policer to set flow meter for psfp Xiaoliang Yang
2021-09-30  7:59   ` Xiaoliang Yang
2021-09-30  7:59   ` Xiaoliang Yang
2021-10-01 22:11 ` [PATCH v6 net-next 0/8] net: dsa: felix: psfp support on vsc9959 Jakub Kicinski
2021-10-01 22:46   ` Vladimir Oltean
2021-10-01 22:59     ` Jakub Kicinski
2021-10-01 23:17       ` Vladimir Oltean
2021-10-06 12:12         ` Vladimir Oltean
2021-11-10 10:32           ` Xiaoliang Yang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB8PR04MB5785560CD2387A9D4FF9E259F0939@DB8PR04MB5785.eurprd04.prod.outlook.com \
    --to=xiaoliang.yang_1@nxp.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=allan.nielsen@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=idosch@mellanox.com \
    --cc=jiri@mellanox.com \
    --cc=joergen.andreasen@microchip.com \
    --cc=kuba@kernel.org \
    --cc=leoyang.li@nxp.com \
    --cc=matthias.bgg@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=po.liu@nxp.com \
    --cc=vinicius.gomes@intel.com \
    --cc=vivien.didelot@gmail.com \
    --cc=vladimir.oltean@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.