From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E39DBC47404 for ; Fri, 11 Oct 2019 20:11:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B5AC72248A for ; Fri, 11 Oct 2019 20:11:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729783AbfJKULR (ORCPT ); Fri, 11 Oct 2019 16:11:17 -0400 Received: from mga07.intel.com ([134.134.136.100]:14883 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729768AbfJKULO (ORCPT ); Fri, 11 Oct 2019 16:11:14 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Oct 2019 13:11:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,285,1566889200"; d="scan'208";a="395857361" Received: from vcostago-desk1.jf.intel.com (HELO vcostago-desk1) ([10.54.70.82]) by fmsmga006.fm.intel.com with ESMTP; 11 Oct 2019 13:11:12 -0700 From: Vinicius Costa Gomes To: Murali Karicheri , "netdev\@vger.kernel.org" Subject: Re: taprio testing - Any help? In-Reply-To: References: Date: Fri, 11 Oct 2019 13:12:08 -0700 Message-ID: <87v9sv3uuf.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Murali, Murali Karicheri writes: > Hi, > > I am testing the taprio (802.1Q Time Aware Shaper) as part of my > pre-work to implement taprio hw offload and test. > > I was able to configure tap prio on my board and looking to do > some traffic test and wondering how to play with the tc command > to direct traffic to a specfic queue. For example I have setup > taprio to create 5 traffic classes as shows below;- > > Now I plan to create iperf streams to pass through different > gates. Now how do I use tc filters to mark the packets to > go through these gates/queues? I heard about skbedit action > in tc filter to change the priority field of SKB to allow > the above mapping to happen. Any example that some one can > point me to? What I have been using for testing these kinds of use cases (like iperf) is to use an iptables rule to set the priority for some kinds of traffic. Something like this: sudo iptables -t mangle -A POSTROUTING -p udp --dport 7788 -j CLASSIFY --set-class 0:3 This will set the skb->priority of UDP packets matching that rule to 3. Another alternative is to create a net_prio cgroup, and the sockets created under that hierarchy would have have that priority. I don't have an example handy for this right now, sorry. Is this what you were looking for? Cheers, -- Vinicius