From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ido Schimmel Subject: Re: [patch net-next 4/4] mlxsw: spectrum: Add packet sample offloading support Date: Sun, 22 Jan 2017 14:04:56 +0200 Message-ID: <20170122120456.GA20356@splinter.mtl.com> References: <1485085487-2652-1-git-send-email-jiri@resnulli.us> <1485085487-2652-5-git-send-email-jiri@resnulli.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, davem@davemloft.net, yotamg@mellanox.com, idosch@mellanox.com, eladr@mellanox.com, nogahf@mellanox.com, ogerlitz@mellanox.com, jhs@mojatatu.com, geert+renesas@glider.be, stephen@networkplumber.org, xiyou.wangcong@gmail.com, linux@roeck-us.net, roopa@cumulusnetworks.com, john.fastabend@gmail.com, simon.horman@netronome.com, mrv@mojatatu.com To: Jiri Pirko Return-path: Received: from out1-smtp.messagingengine.com ([66.111.4.25]:60366 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750735AbdAVMFl (ORCPT ); Sun, 22 Jan 2017 07:05:41 -0500 Content-Disposition: inline In-Reply-To: <1485085487-2652-5-git-send-email-jiri@resnulli.us> Sender: netdev-owner@vger.kernel.org List-ID: On Sun, Jan 22, 2017 at 12:44:47PM +0100, Jiri Pirko wrote: > From: Yotam Gigi > > Using the MPSC register, add the functions that configure port-based > packet sampling in hardware and the necessary datatypes in the > mlxsw_sp_port struct. In addition, add the necessary trap for sampled > packets and integrate with matchall offloading to allow offloading of the > sample tc action. > > The current offload support is for the tc command: > > tc filter add dev parent ffff: \ > matchall skip_sw \ > action sample rate group [trunc ] > > Where only ingress qdiscs are supported, and only a combination of > matchall classifier and sample action will lead to activating hardware > packet sampling. > > Signed-off-by: Yotam Gigi > Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel