From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D2FA842B3A; Thu, 18 May 2023 15:33:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6474940E25; Thu, 18 May 2023 15:33:20 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 8AED04014F for ; Thu, 18 May 2023 15:33:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684416798; x=1715952798; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=xNBaJDNQpVlwDuSeMTPHcy+KX3NZAqQiBKK976LZr8s=; b=F0kl7zDQI1yEAiS3Iw/PJgmyZhnvezb/LoYx2BDnxl3QU0d069bDOK/g ++5kpKJ/NjZa0q1TryOgVSbqA39WDpAOKdFXlVvPm+m/O5d93OvqyRer+ QI3pikj2Mqhq2VFp2FuLoqL3sWYUwjgUHk68zXVnZbc511l35uZsNwfga r6sNDFznT0ahcl5AGwInhYq9Wdp2nKabLqRu38lF6ir1YHA89koL7bThr n0sY3xb7Pm6q5pHNoCkwLVG7hYbfaczyBUN0KEe6hbswwDizj5HjSmMtB abNPQW3X+EqSnIj4OhInvHCszIBxg3nFsk17kmdKWz1pKx4hTALMP8xlW Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10714"; a="352081309" X-IronPort-AV: E=Sophos;i="5.99,285,1677571200"; d="scan'208";a="352081309" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2023 06:33:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10714"; a="876425316" X-IronPort-AV: E=Sophos;i="5.99,285,1677571200"; d="scan'208";a="876425316" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga005.jf.intel.com with ESMTP; 18 May 2023 06:33:17 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 18 May 2023 06:33:17 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Thu, 18 May 2023 06:33:17 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.108) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Thu, 18 May 2023 06:33:16 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hcqk9xj7fjcmM4MDKI2wsQXbE31gp8bOZ3GEdpPgGcDTEfhXuMo9s37bkSlMckS/npt/yXx0fGsRT2yM+GQU4+vn9ucyArP1RJuk2elq2cNCKXpfP2oziIcOnklVTt8Edl/Gvr1eZLlftovq3MQFogdtPayuTbYUWhRDW0CthXDpENES5KogF3YRI9RMYLV/6o/9qEMM8UkY7NnDXaTQ1JPU8C4fhLahCe4vhYMjvl5JAqb0KbpfXyoUPPrlNPwnUEsoc3RsHOmRcUKYyWyiJyXZF+QR1c6LU24wOTrx0b7WPbj3wa/wKXqmteQNRtY+yUB86e5FgQjl3EosfQ92sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HeNRHBFJYNbWRRCdqRhje7l40iV7Xg7X9txImp+cgwQ=; b=f20y5qK1MRtGVnjhFsp5AMhdvUuvXCqr5ZgcJjIeJuVvuq9Vki4RtG4oExfQdiuymHwfIss9iz6YHo4zQozMWdqPjrZDwZ1hhfIM+ILlxHY6ZcDSSQinye3qAr4Wn6s3Gkxjna7QJvSFq41S80epayrvV8G+qmOOntrwFub1BUPgLd4LvAQaHq7R4qJ0KGnsqYEYZP8XcKaSV8b42qMWhXIBgTUH5kbnMtuxQZv61A8UKbVA3g+Qg99XG/O4n5Hw8I6JnhdgsheLmrTliyDpRScYsEDgVbEMiQc40+76YJfLAJSuUzaNUN84A+7IhfmrYjfWVVFVXm3Z67UU+FqctQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DM4PR11MB6502.namprd11.prod.outlook.com (2603:10b6:8:89::7) by BN9PR11MB5401.namprd11.prod.outlook.com (2603:10b6:408:11a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.19; Thu, 18 May 2023 13:33:10 +0000 Received: from DM4PR11MB6502.namprd11.prod.outlook.com ([fe80::49c0:aa4c:e5b4:e718]) by DM4PR11MB6502.namprd11.prod.outlook.com ([fe80::49c0:aa4c:e5b4:e718%5]) with mapi id 15.20.6387.033; Thu, 18 May 2023 13:33:09 +0000 Message-ID: <85046b64-da3d-1fe5-ed57-bdcf241aa6b0@intel.com> Date: Thu, 18 May 2023 14:33:03 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.11.0 Subject: Re: [PATCH] usertools: add tool to generate balanced rss traffic flows Content-Language: en-US To: Robin Jarry , CC: Olivier Matz , Jean-Mickael Guerin References: <20230413203010.638406-1-rjarry@redhat.com> From: "Burakov, Anatoly" In-Reply-To: <20230413203010.638406-1-rjarry@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0206.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:318::18) To DM4PR11MB6502.namprd11.prod.outlook.com (2603:10b6:8:89::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB6502:EE_|BN9PR11MB5401:EE_ X-MS-Office365-Filtering-Correlation-Id: ea4b2aae-e6e2-48df-f137-08db57a46b4a X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UxtkWRH1/BZTLSW9DQTU98t1Q8UAGvhMwvECbNB+FxYk4uZy5qL4/YKct5OoKEI43W4ZhgQbeV2C176brfcSPbLVxyeq6iJ2ZT4wARy+WyDuuzBO6MkeXZ/sRRaeX2Epo9PZFHjg04mOGHeqiKSN7Oy2WZ4R1s0fDrcoPTFUd+ZKf7Rl1oh1uKR7tiPjt+tNo1jhEoYFyYzLRxf5LySXOaVhM+s11/zyclBj2OmuXOdsneb/9sBp3hZrSTderAtuU1/sN2fPh/LB1mloqLNLA5s+CFCSKfwxnbGsZ8YJiRrAQaf7XE0ShwCqzM3B5vnQZ9xokK/4EhkhoI3+NRkt34zVeqEH7KSAVciWEQmiRNa4IxwYJ8QLRBYxpIcH1MNflIdMfdzCDeThvyS0TX3u8PEDrlJ4Amm9u7thADZ+I/sTwGpqQTNu9S02k8eytvnbRj+0oaapob7h0DqOKdhxiLzZl969DGeerZmgolNe4qSYwHIh2NWIAaVMZBP8qyJdQDTjfrMuv8pn3nMYtmMTxTkM9IN1CfFfdbrsxjYNLsMPBEKlcAhfC8zE7Uyfn7cl22fHOb5GpqrMXr1CuwLkpFW1e587fNBh+EctzGTjBeWxiCsDMzRZVLT76yAC8S7cwbQd6RFN2zQkjJKTn7DC41imOjBw5pao6XLIa7oNJLc= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB6502.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(366004)(376002)(346002)(39860400002)(136003)(396003)(451199021)(26005)(6506007)(6512007)(53546011)(36756003)(83380400001)(31696002)(86362001)(2616005)(38100700002)(82960400001)(186003)(6486002)(54906003)(478600001)(2906002)(316002)(31686004)(8936002)(4326008)(8676002)(41300700001)(5660300002)(66476007)(66556008)(66946007)(66899021)(6666004)(20673002)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TTJvYnhLMmdMT24zWjJmdFJsV1hjRzRpV3VyNjVveW03UE9yaUg2Y0NkcFhz?= =?utf-8?B?bnZ1S3AybFAvNEkvVEVDZjhieERseHJ0ZldZaXR4akNYQWkrWDF2MzRzZHcv?= =?utf-8?B?MU9ySlE2UFlWWXU0RGNPOVRPRzcxc1QrbXhZdlFOcEkrM2ROSW1jQmNteHJU?= =?utf-8?B?cVFoV0U5cUlsb0lOUmlLcGtKeFRqRnFOdHpMQWhuYXdVZnNram9ueDBUNFhx?= =?utf-8?B?SklXQ2xybnpwaWlyWkxnTmxzeVpvcmxqVEd6RUpDbFdUUlkyYWlLV1p6WFdI?= =?utf-8?B?MW1DeHJrQzFmVWhDbnJCT2lWY2haV0RzL1BUQ0piaFRibWJwcWpLQ2p6dElp?= =?utf-8?B?TzNTMDFsMlB3ZFRxeURhRTBXd2FRK2ZlTGNaQVAwd1Zxd3lyM0l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E9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: ea4b2aae-e6e2-48df-f137-08db57a46b4a X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB6502.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2023 13:33:09.1193 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: lVqSJhgav94xxhBBFAbV1F2usqXINCijuTVADL32ACdOiuY5rlTtD9n9rxPRLsD57eNzwRBcq0IJWF6IfuLBqkbHKLJanVe+eoWFLceXZUM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR11MB5401 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 4/13/2023 9:30 PM, Robin Jarry wrote: > From: 6WIND > > usage: dpdk-rss-flows.py [-h] [-s SPORT_RANGE] [-d DPORT_RANGE] [-r] > [-k RSS_KEY] [-t RETA_SIZE] [-j] > RX_QUEUES SRC DST > > Craft IP{v6}/{TCP/UDP} traffic flows that will evenly spread over a > given number of RX queues according to the RSS algorithm. > > positional arguments: > RX_QUEUES The number of RX queues to fill. > SRC The source IP network/address. > DST The destination IP network/address. > > options: > -h, --help show this help message and exit > -s SPORT_RANGE, --sport-range SPORT_RANGE > The layer 4 (TCP/UDP) source port range. Can > be a single fixed value or a range > -. > -d DPORT_RANGE, --dport-range DPORT_RANGE > The layer 4 (TCP/UDP) destination port range. > Can be a single fixed value or a range > -. > -r, --check-reverse-traffic > The reversed traffic (source <-> dest) should > also be evenly balanced in the queues. > -k RSS_KEY, --rss-key RSS_KEY > The random key byte-stream used to compute the > RSS hash. This option supports either a > supported driver name or the hex value of the > key (default: intel). > -t RETA_SIZE, --reta-size RETA_SIZE > Size of the redirection table or "RETA" > (default: 128). > -j, --json Output in parseable JSON format. > > Examples: > > ~$ dpdk-rss-flows.py 8 28.0.0.0/24 40.0.0.0/24 > SRC_IP DST_IP QUEUE > 28.0.0.1 40.0.0.1 5 > 28.0.0.1 40.0.0.2 4 > 28.0.0.1 40.0.0.3 2 > 28.0.0.1 40.0.0.6 3 > 28.0.0.1 40.0.0.8 0 > 28.0.0.1 40.0.0.9 6 > 28.0.0.1 40.0.0.10 7 > 28.0.0.1 40.0.0.11 1 > > ~$ dpdk-rss-flows.py 8 28.0.0.0/24 40.0.0.0/24 -r > SRC_IP DST_IP QUEUE QUEUE_REVERSE > 28.0.0.1 40.0.0.1 5 3 > 28.0.0.1 40.0.0.2 4 2 > 28.0.0.1 40.0.0.8 0 6 > 28.0.0.1 40.0.0.9 6 7 > 28.0.0.1 40.0.0.16 2 4 > 28.0.0.1 40.0.0.19 3 5 > 28.0.0.1 40.0.0.24 1 0 > 28.0.0.1 40.0.0.25 7 1 > > ~$ dpdk-rss-flows.py 8 28.0.0.0/24 40.0.0.0/24 -s 32000-64000 -d 53 > SRC_IP SPORT DST_IP DPORT QUEUE > 28.0.0.1 32000 40.0.0.1 53 0 > 28.0.0.1 32001 40.0.0.1 53 1 > 28.0.0.1 32004 40.0.0.1 53 4 > 28.0.0.1 32005 40.0.0.1 53 5 > 28.0.0.1 32008 40.0.0.1 53 2 > 28.0.0.1 32009 40.0.0.1 53 3 > 28.0.0.1 32012 40.0.0.1 53 6 > 28.0.0.1 32013 40.0.0.1 53 7 > > ~$ dpdk-rss-flows.py 4 2a01:cb00:f8b:9700::/64 2620:52:0:2592::/64 -rj > [ > { > "queue": 0, > "queue_reverse": 3, > "src_ip": "2a01:cb00:f8b:9700::1", > "dst_ip": "2620:52:0:2592::1", > "src_port": 0, > "dst_port": 0 > }, > { > "queue": 3, > "queue_reverse": 0, > "src_ip": "2a01:cb00:f8b:9700::1", > "dst_ip": "2620:52:0:2592::2", > "src_port": 0, > "dst_port": 0 > }, > { > "queue": 2, > "queue_reverse": 1, > "src_ip": "2a01:cb00:f8b:9700::1", > "dst_ip": "2620:52:0:2592::3", > "src_port": 0, > "dst_port": 0 > }, > { > "queue": 1, > "queue_reverse": 2, > "src_ip": "2a01:cb00:f8b:9700::1", > "dst_ip": "2620:52:0:2592::1a", > "src_port": 0, > "dst_port": 0 > } > ] > > Cc: Olivier Matz > Cc: Jean-Mickael Guerin > Signed-off-by: Robin Jarry > --- I won't comment on the merits of inclusion of this into DPDK, but as far as code itself, this script makes me feel insecure about my Python skills! Can't really offer any constructive criticism, also learned a few new tricks. So, for the code, Acked-by: Anatoly Burakov -- Thanks, Anatoly