From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-eopbgr690070.outbound.protection.outlook.com [40.107.69.70]) by dpdk.org (Postfix) with ESMTP id 90CA94D27 for ; Thu, 13 Sep 2018 15:48:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jfvpMtY3nX8TL5gZ2uC9+NWjXsT1+XIR9qm+ZOUsfLc=; b=eJdnygmsRCRJ7M7HNMiv7sPeBaEUtNn3gqDAYrv6Qkgsy6238A2BDpuQhF+9VYpbag2y/A/VABWB6I7ZJ6xt4feBJX2dXPo1xpczt+AsgMycqvYKpv9U2W4chF+YYjl1YeKRM1kvGiD+72yXDJYGQciFYfcAIs3FfMAtf59wyYw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin.8.8.4.4 (122.178.212.30) by BL0PR07MB4994.namprd07.prod.outlook.com (2603:10b6:208:49::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1122.15; Thu, 13 Sep 2018 13:47:57 +0000 From: Jerin Jacob To: Wenzhuo Lu , Jingjing Wu , Bernard Iremonger , John McNamara , Marko Kovacevic , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko Cc: dev@dpdk.org, Jerin Jacob Date: Thu, 13 Sep 2018 19:17:04 +0530 Message-Id: <20180913134707.23698-1-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [122.178.212.30] X-ClientProxiedBy: BMXPR01CA0021.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:d::31) To BL0PR07MB4994.namprd07.prod.outlook.com (2603:10b6:208:49::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3e4ca0d0-a228-455f-540d-08d6197f85a9 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BL0PR07MB4994; X-Microsoft-Exchange-Diagnostics: 1; BL0PR07MB4994; 3:T3jude1LutChiIHJMLgGu6HUYmDGszO+Ep3yte17sRVdUkj2vnwxSO3amy20+HHrW5wpzvAcdr5S4nESARBad7ZF/ufJueuJ5icztKVGpj94aWinBRe7iAHokui0/3VGm7yDxL2nFMRMCU/8Z2nSoy+PR3742Jau3tw6FYZ/sfHyrdwBhdjEfUesj3gUIyvcBiyL0DGpWoJchEGh2MTwkw3XH/Njo8c+ERcpAFsRHESKBHWsdeV2bq9q4NBJW2pM; 25:MzMs4GEo33rFhYLBo2hz/OUInoYcvg3DIN6j8+SadF5gEdIgx78DFKuB1gchJvS+OwHWhsPuQrM1ddKNOhPkXqlDGUSPgjbzdIqudzAQ/b5atk6RY4tzHvA0yQ6/YAuozsAVMzcVEYmaXkrBVmdR2oZ08Hk7jd0ehhxcb21JUmZUHXR5z5U4hfJ7zNOWlMxMe9awLKsR5kX9jnC0qJQRnKCGEj/aTnpIffF8XzZduDySVIEb8lScjLt3CKSKcQl8fFPnUVprkZ8hGb4lkJwTkrQmG78qXduNSujKFV+FPtCuBBOQy/hH3aM3fy9ItYSxv6QScB6iPOS/Z01Mkq0UmQ==; 31:BRUY/SYetcqlIL3w4kPMUdeHN6hkraQYqUjEDbRa6FrpIYoMwShB6YVptaVSXLNhYAY8oqj/AF8UE9rGLX3zjYk/amD2VNBc2ac4AbVRBwUT7MMPwW8+bvqO4z5xAOs0Ge476B7aMZVikVoSSWkX0Z3wQHeSbk2t0oegaCcxCHMU2zkH7OwW9oa7L8fUvvW7/W8ZzMEADlzEoBFKHToGyUaOUOo5ghqFz2yJWgzV9gI= X-MS-TrafficTypeDiagnostic: BL0PR07MB4994: X-Microsoft-Exchange-Diagnostics: 1; BL0PR07MB4994; 20:cFUGw9IhZZfaU3xLuTkwvauOEMtEPtFaJE8ahSq4WwfVtPvYtc35zF3wmz7vGxsRHfd3wyz+GMbcFgs3C0l/1/LA2drYXP/91I1l/0VC1r0PISScNab1ISEZqjYBDee5ZlO52Nu7xlWl2anUtwD/sxphvzuLQ1GpliymmneB6gwLWFQnfdtvIO2da4SPMO/VXw/m00cTr4/JhjlYhJ3//jSJ8E8ntsQJFVjtHzi4vepWAIc0DiLavVz+TNNBpEtXs/e/wvcBXTa4V4cZepp5N5QOwOtJ4X9SILf9uzCe+7LpGZXRJI5HSOgUegZ1Du+DBCxsjsaE5nukB7HaHcofM/UdFevPKiGzgSsxrDhAJFJR1EEXdhCTxDtyuA1aqq8dhGX0BjcOaJa70rtELZ58RwDVjH5Moc/ZNdQN1R1qMEOxLzhJFk9hceci+wzoIrr371HBrW9b54TnLYHl8wPF9cV9jZSLLeuIMTgJX7PBR4Nb1iDvUGh0nmOh9jRIIhyQpwoqh5C6xWRoDkGBsUr1W/ubsM/4GvV+IzuOiFHqMOtKJTTIujkS3AWp3ipXuCTZtQoWerfUBuPfwXcagNjPVeYOEbOA+9ndA7A0azvjf88=; 4:ED9WrthBho6M7nQGO14RZzNFgheXoJe1zbCRyxbodkLagHegTxLtfXXFuAbcfz6lAl21tdoyGzzotk1H1zIFiYn/+hV671VA8kLGMliU9fibjlBLaQZFKGfqOVZrMKTYY1vfbskn/RwBQHZMUFXlRzk04qirVnd69P/X2Q2oyow7lGd1XGQ8Nt2oiSZ0ujqnzEp9YU0FHTXi7ebINX3d7LFLzeYU+ATv+0J73br7w45iiiTTv5duLCxd5PFCImxUi0p5t0PJZLxWzmgKBksyBQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(3231311)(944501410)(52105095)(3002001)(10201501046)(149027)(150027)(6041310)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(201708071742011)(7699050); SRVR:BL0PR07MB4994; BCL:0; PCL:0; RULEID:; SRVR:BL0PR07MB4994; X-Forefront-PRVS: 07943272E1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(136003)(39860400002)(396003)(366004)(346002)(376002)(199004)(189003)(106356001)(81166006)(53936002)(8676002)(52116002)(110136005)(316002)(8936002)(68736007)(4326008)(2870700001)(2906002)(5660300001)(51416003)(50466002)(6666003)(97736004)(6486002)(81156014)(50226002)(105586002)(186003)(1857600001)(42882007)(25786009)(16526019)(48376002)(476003)(486006)(14444005)(44832011)(26005)(478600001)(36756003)(1076002)(305945005)(2616005)(3846002)(47776003)(386003)(6116002)(66066001)(72206003)(107886003)(956004)(7736002); DIR:OUT; SFP:1101; SCL:1; SRVR:BL0PR07MB4994; H:jerin.8.8.4.4; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BL0PR07MB4994; 23:PVOUJ9BCjHffvpBtbIfrARQAg+z8lzgjRU7Wxd9rL?= =?us-ascii?Q?7oMYm+kTtc/YsW6HN9SqOt/GZrtMJ2CAPqiyhdeF/CY6IJZeYAZslw294Jrg?= =?us-ascii?Q?l7v+YdI0EpP2pBbvDMwArl44uysrSIrv/rC06XKjyZpri72ioECIKdKvQx+1?= =?us-ascii?Q?yg7rWMbZwtpF7U5eHxJtBgvVnMvp2V9w5ElV4LIp+bc5tn3usjM7HBTVfkS0?= =?us-ascii?Q?ULOft5WL2RCJB5/ClC5X2nExoZZfrM7a+RPjjZwfh7w+7zfDNCYHBVybU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7xCSwBSQCiXmFniIos/EIX7Y+2A//zdeL3c6GW8h6vn8ZaR4ZhXVuKBmlK4j7siHrwu2JyEhdd750deCuB/DmsyKQ1XTWYByq0aZPneAmbp/3nnryGbJdSt5lHX4LY=; 7:DIdlFCl3RvJqVp9NOwWKHi0b3DzwWL4SmRRgPSh3hsd4IM4AyGlkrqUvYn6RNEybdShlVrU20tG7Q4shK+HgB8dGRiejx//Db7H2K58v5DyPX9k82hoO85Q+Hr2GFto20xOCj7FxmBqlAjoQdPkoIzXgeaV9TMG2gvE9MNomh1/zzkGKUZL2qXR4RZNJfwM2IKv3UqHp21hJbJX9SvwTDUMw1SrrQhPELI16/SVMmEce8wsLYWKew+Fvps9O/Y87 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2018 13:47:57.7573 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3e4ca0d0-a228-455f-540d-08d6197f85a9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR07MB4994 Subject: [dpdk-dev] [PATCH 1/4] ethdev: add SCTP Rx checksum offload support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2018 13:48:04 -0000 Signed-off-by: Jerin Jacob --- app/test-pmd/config.c | 9 +++++++++ doc/guides/nics/features.rst | 4 ++-- lib/librte_ethdev/rte_ethdev.c | 1 + lib/librte_ethdev/rte_ethdev.h | 1 + 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 14ccd6864..c4ed8d474 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -576,6 +576,15 @@ port_offload_cap_display(portid_t port_id) printf("off\n"); } + if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_SCTP_CKSUM) { + printf("RX SCTP checksum: "); + if (ports[port_id].dev_conf.rxmode.offloads & + DEV_RX_OFFLOAD_SCTP_CKSUM) + printf("on\n"); + else + printf("off\n"); + } + if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM) { printf("RX Outer IPv4 checksum: "); if (ports[port_id].dev_conf.rxmode.offloads & diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst index cddc877d4..a98356a16 100644 --- a/doc/guides/nics/features.rst +++ b/doc/guides/nics/features.rst @@ -575,7 +575,7 @@ L4 checksum offload Supports L4 checksum offload. -* **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_UDP_CKSUM,DEV_RX_OFFLOAD_TCP_CKSUM``. +* **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_UDP_CKSUM,DEV_RX_OFFLOAD_TCP_CKSUM,DEV_RX_OFFLOAD_SCTP_CKSUM``. * **[uses] rte_eth_txconf,rte_eth_txmode**: ``offloads:DEV_TX_OFFLOAD_UDP_CKSUM,DEV_TX_OFFLOAD_TCP_CKSUM,DEV_TX_OFFLOAD_SCTP_CKSUM``. * **[uses] mbuf**: ``mbuf.ol_flags:PKT_TX_IPV4`` | ``PKT_TX_IPV6``, ``mbuf.ol_flags:PKT_TX_L4_NO_CKSUM`` | ``PKT_TX_TCP_CKSUM`` | @@ -583,7 +583,7 @@ Supports L4 checksum offload. * **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_L4_CKSUM_UNKNOWN`` | ``PKT_RX_L4_CKSUM_BAD`` | ``PKT_RX_L4_CKSUM_GOOD`` | ``PKT_RX_L4_CKSUM_NONE``. -* **[provides] rte_eth_dev_info**: ``rx_offload_capa,rx_queue_offload_capa:DEV_RX_OFFLOAD_UDP_CKSUM,DEV_RX_OFFLOAD_TCP_CKSUM``, +* **[provides] rte_eth_dev_info**: ``rx_offload_capa,rx_queue_offload_capa:DEV_RX_OFFLOAD_UDP_CKSUM,DEV_RX_OFFLOAD_TCP_CKSUM,DEV_RX_OFFLOAD_SCTP_CKSUM``, ``tx_offload_capa,tx_queue_offload_capa:DEV_TX_OFFLOAD_UDP_CKSUM,DEV_TX_OFFLOAD_TCP_CKSUM,DEV_TX_OFFLOAD_SCTP_CKSUM``. .. _nic_features_hw_timestamp: diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 4c3202505..d91870e90 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -127,6 +127,7 @@ static const struct { RTE_RX_OFFLOAD_BIT2STR(TIMESTAMP), RTE_RX_OFFLOAD_BIT2STR(SECURITY), RTE_RX_OFFLOAD_BIT2STR(KEEP_CRC), + RTE_RX_OFFLOAD_BIT2STR(SCTP_CKSUM), }; #undef RTE_RX_OFFLOAD_BIT2STR diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index 7070e9ab4..adbe936a4 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -900,6 +900,7 @@ struct rte_eth_conf { * No DEV_RX_OFFLOAD_CRC_STRIP flag means keep CRC */ #define DEV_RX_OFFLOAD_KEEP_CRC 0x00010000 +#define DEV_RX_OFFLOAD_SCTP_CKSUM 0x00020000 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \ DEV_RX_OFFLOAD_UDP_CKSUM | \ DEV_RX_OFFLOAD_TCP_CKSUM) -- 2.19.0