From patchwork Sun Feb 5 07:58:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yotam Gigi X-Patchwork-Id: 724197 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3vGNGr1wh7z9s7m for ; Sun, 5 Feb 2017 18:56:52 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752199AbdBEH4q (ORCPT ); Sun, 5 Feb 2017 02:56:46 -0500 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:55265 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752142AbdBEH4p (ORCPT ); Sun, 5 Feb 2017 02:56:45 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yotamg@mellanox.com) with ESMTPS (AES256-SHA encrypted); 5 Feb 2017 09:56:34 +0200 Received: from dev-r-vrt-156.mtr.labs.mlnx (dev-r-vrt-156.mtr.labs.mlnx [10.212.156.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id v157uRqI012086; Sun, 5 Feb 2017 09:56:34 +0200 From: Yotam Gigi To: stephen@networkplumber.org, netdev@vger.kernel.org, jiri@mellanox.com, eladr@mellanox.com Cc: Yotam Gigi Subject: [PATCH iproute2/net-next 3/3] tc: man: matchall: Update examples to include sample Date: Sun, 5 Feb 2017 09:58:54 +0200 Message-Id: <1486281534-61663-4-git-send-email-yotamg@mellanox.com> X-Mailer: git-send-email 2.4.11 In-Reply-To: <1486281534-61663-1-git-send-email-yotamg@mellanox.com> References: <1486281534-61663-1-git-send-email-yotamg@mellanox.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add an example of packet sampling to the tc-matchall man page examples section. The example uses the matchall classifier and the sample action to create packet sampling on a port. Reviewed-by: Jiri Pirko Signed-off-by: Yotam Gigi --- man/man8/tc-matchall.8 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/man/man8/tc-matchall.8 b/man/man8/tc-matchall.8 index f920922..799350a 100644 --- a/man/man8/tc-matchall.8 +++ b/man/man8/tc-matchall.8 @@ -70,6 +70,16 @@ that replaces the root qdisc on device where the second command attaches a matchall filters on it that mirrors the packets to device eth2. +To sample one of every 100 packets flowing into interface eth0 to psample group +12: +.RS +.EX + +tc qdisc add dev eth0 handle ffff: ingress +tc filter add dev eth0 parent ffff: matchall \\ + action sample rate 100 group 12 +.EE +.RE .EE .SH SEE ALSO