From patchwork Wed Jul 12 19:31:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ke Xu X-Patchwork-Id: 129507 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DF48742E57; Wed, 12 Jul 2023 21:33:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DB8C3406BA; Wed, 12 Jul 2023 21:33:20 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 6310C400D5 for ; Wed, 12 Jul 2023 21:33:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689190399; x=1720726399; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=vYpTUFnBXLYunFDs7A6UXoPGKUEGTnC8r9F0ldew5oM=; b=jcUS6pKiBILC4KZLlHSAzW+1eldk+doQZ4thjR5/FGfgR+jQsAw2748g dGE9MfApCNvyhYV16vYuYebkZvfZtqbaBl86rq6gMTeuVEw0HprtcQUGf mQe95IDJZX+Yxx/NGKSG7nI506uPG8Y8Gn9vpZ70+kZaewxXxz1skAbFL RrjW+LEz0IKqiXpp4bDlojzYAsTYGKzBpkVukPM3Cimbv/PfnNQVYtGGG 16VaSu4/sfI85vAZ9XBnHLa/RATR46p6pApQ0C96bzdXAaiPeNziNeow0 olQzIJeRBPx2Fb8TexlZJOBpvGAAE8oOzD/ykzHJV7/eWiEML8zvyml6u w==; X-IronPort-AV: E=McAfee;i="6600,9927,10769"; a="428728884" X-IronPort-AV: E=Sophos;i="6.01,200,1684825200"; d="scan'208";a="428728884" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2023 12:33:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10769"; a="791740093" X-IronPort-AV: E=Sophos;i="6.01,200,1684825200"; d="scan'208";a="791740093" Received: from dpdk-xuke-host.sh.intel.com ([10.67.114.220]) by fmsmga004.fm.intel.com with ESMTP; 12 Jul 2023 12:33:17 -0700 From: Ke Xu To: dts@dpdk.org Cc: ke1.xu@intel.com, tarcadia@qq.com Subject: [DTS][Patch V1 0/4] Updating packet module and introducing a new common module. Date: Wed, 12 Jul 2023 19:31:22 +0000 Message-Id: <20230712193126.1994361-1-ke1.xu@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org This patch is updating packet module for new util functions and packet types and introducing a new common module for util functions and common executions for offload cases. This patch also added a new decorator to test_case module. Packet module is designed to support packet organizing, analyzing and processing of different packet types. This patch introduced several new functions and supported new packet types in this module. Added support for GTPU and GENEVE packet. Packet module only supports limited tunneling layers like VxLAN, GRE. New packet types are required in recent DPDK releases and GTPU and GENEVE are required to be added. Added new util functions. Packet module introduced several util functions for writing packets into files, getting and increasing IP addresses, getting ether types and so on. As more packet types are introduced, some other util functions are required. This patch implemented a set of packet layer indexing, packet payload, segment and checksum checking. This patch also fixed some bad doc strings. New Offload Common module is designed to support common checksum offload, TSO and related cases that requires varied packet types and massive packet-type traversal. This new module provides prepared packets, packet modification methods, packet and verbose analyzing methods and common execution steps. New decorator `skip_unsupported` is designed to mark not supported cases. It provides two inputs for labeling a case unsupported in condition and labeling cases not supported with a reason. Ke Xu (4): framework/packet: Add GTPU and GENEVE support for packet module. framework/packet: Update packet module for new methods. framework/test_case: Add skip_unsupported decorator. tests/offload_common: Add offload_common module. framework/packet.py | 866 ++++++++++++++++++++++++++++++++++++- framework/test_case.py | 21 + tests/offload_common.py | 926 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1809 insertions(+), 4 deletions(-) create mode 100644 tests/offload_common.py