All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
	nhorman@tuxdriver.com, jhs@mojatatu.com,
	xiyou.wangcong@gmail.com, idosch@mellanox.com,
	mlxsw@mellanox.com
Subject: Re: [patch net-next 10/10] selftests: netdevsim: Extend devlink trap test to include flow action cookie
Date: Wed, 26 Feb 2020 08:34:39 +0100	[thread overview]
Message-ID: <20200226073439.GA10533@nanopsycho> (raw)
In-Reply-To: <20200225095721.657095ec@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

Tue, Feb 25, 2020 at 06:57:21PM CET, kuba@kernel.org wrote:
>On Tue, 25 Feb 2020 08:46:03 +0100 Jiri Pirko wrote:
>> >>  		devlink_trap_metadata_test $trap_name "input_port"
>> >>  		check_err $? "Input port not reported as metadata of trap $trap_name"
>> >> +		if [ $trap_name == "ingress_flow_action_drop" ] ||
>> >> +		   [ $trap_name == "egress_flow_action_drop" ]; then
>> >> +			devlink_trap_metadata_test $trap_name "flow_action_cookie"
>> >> +			check_err $? "Flow action cookie not reported as metadata of trap $trap_name"
>> >> +		fi
>> >>  	done
>> >>  
>> >>  	log_test "Trap metadata"  
>> >
>> >Oh, this doesn't seem to check the contents of the trap at all, does it?  
>> 
>> No. This is not the test for the actual trapped packets. It is a test to
>> list devlink traps and supported metadata.
>> 
>> The packet trapping is done using dropmonitor which is currently
>> not implemented in selftests, even for the existing traps. Not even for
>> mlxsw. There is a plan to introduce these tests in the future, Ido is
>> working on a tool to catch those packets to pcap using dropmon. I think
>> he plans to send it to dropmon git soon. Then we can implement the
>> selftests using it.
>
>The extra 100 lines of code in netdevsim which is not used by selftests
>does make me a little sad.. but okay, looking forward to fuller tests.
>Those tests better make use of the variable cookie size, 'cause
>otherwise we could have just stored the cookie on a u64 and avoided the
>custom read/write functions all together ;)

Will do.


      reply	other threads:[~2020-02-26  7:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-24 21:07 [patch net-next 00/10] mlxsw: Implement ACL-dropped packets identification Jiri Pirko
2020-02-24 21:07 ` [patch net-next 01/10] flow_offload: pass action cookie through offload structures Jiri Pirko
2020-02-25  4:16   ` Jakub Kicinski
2020-02-24 21:07 ` [patch net-next 02/10] devlink: add trap metadata type for cookie Jiri Pirko
2020-02-25  4:19   ` Jakub Kicinski
2020-02-24 21:07 ` [patch net-next 03/10] drop_monitor: extend by passing cookie from driver Jiri Pirko
2020-02-25  4:19   ` Jakub Kicinski
2020-02-25  7:04     ` Jiri Pirko
2020-02-24 21:07 ` [patch net-next 04/10] devlink: extend devlink_trap_report() to accept cookie and pass Jiri Pirko
2020-02-25  4:20   ` Jakub Kicinski
2020-02-24 21:07 ` [patch net-next 05/10] mlxsw: core_acl_flex_actions: Add trap with userdef action Jiri Pirko
2020-02-24 21:07 ` [patch net-next 06/10] mlxsw: core_acl_flex_actions: Implement flow_offload action cookie offload Jiri Pirko
2020-02-24 21:07 ` [patch net-next 07/10] mlxsw: pci: Extract cookie index for ACL discard trap packets Jiri Pirko
2020-02-24 21:07 ` [patch net-next 08/10] mlxsw: spectrum_trap: Lookup and pass cookie down to devlink_trap_report() Jiri Pirko
2020-02-24 21:07 ` [patch net-next 09/10] netdevsim: add ACL trap reporting cookie as a metadata Jiri Pirko
2020-02-25  4:42   ` Jakub Kicinski
2020-02-25  7:40     ` Jiri Pirko
2020-02-25 17:53       ` Jakub Kicinski
2020-02-24 21:07 ` [patch net-next 10/10] selftests: netdevsim: Extend devlink trap test to include flow action cookie Jiri Pirko
2020-02-25  4:43   ` Jakub Kicinski
2020-02-25  7:46     ` Jiri Pirko
2020-02-25 17:57       ` Jakub Kicinski
2020-02-26  7:34         ` Jiri Pirko [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=20200226073439.GA10533@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=idosch@mellanox.com \
    --cc=jhs@mojatatu.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=xiyou.wangcong@gmail.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.