From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0045.outbound.protection.outlook.com [104.47.34.45]) by dpdk.org (Postfix) with ESMTP id E580B2BFA for ; Tue, 2 Oct 2018 12:52:35 +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=I3lncQzJWnyPTMj/l/GGdr3zGZL1DcYnMd8EecsbkK0=; b=HcLnCVljE2QHO7M9rPmi+3H0143dw/3iCiK3hPOrCMiYK2+cFuUjfNImQpwOy38J14Unr8a1ON9gdIiESwNxtrJ584J5k0Y15+UImhjnu88vUTHSW6yVbsVWtjZ+ZYn/CDr4gP6Icu+L+P6LM0zRokEAIS1mOMCLAV3vTC62AQE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from localhost.localdomain (115.113.156.3) by DM6PR07MB5002.namprd07.prod.outlook.com (2603:10b6:5:25::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.25; Tue, 2 Oct 2018 10:52:28 +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: Tue, 2 Oct 2018 16:21:41 +0530 Message-Id: <20181002105142.24333-1-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913134707.23698-1-jerin.jacob@caviumnetworks.com> References: <20180913134707.23698-1-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [115.113.156.3] X-ClientProxiedBy: BM1PR0101CA0030.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1a::16) To DM6PR07MB5002.namprd07.prod.outlook.com (2603:10b6:5:25::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5c1cce73-d2fb-4562-8208-08d6285527e9 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:DM6PR07MB5002; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB5002; 3:ApV0qqEjeqk56+cXTtSCk8NDh6quusJj1jS1BMZeYVL2ikwUTxVUEKSAA5UzScpy3EZBUn6Nptgj5BflpyNIQ3s8FLu1Y7vgbrANWODJb27+zBn9ORKAtg42dAutCChZgKknjZ/EbJ1yYEO1qMfF1wEPXtL80t7fUlhzHpG9UgbCL6hJtwGzvZy0uGegefRXgJLRrbecSUD8KrAbM4qzJgRVUPrRS0khkIayEy3mzpf6USC5zaSTiDUfuh8auPHz; 25:5gkMmPRIBcgLggFCXB2BQgSbujbudLcRho8O8WeW85uoYLX2YsACokpjdB2UBswtkQ1rjtwoum8xZGCFl0fmKCxtwX4Vpt946skIHWWTF4TRWwVWJh9FEHfNR4/CAyVE2QeHc3idfWI2if99lPDQz/ow6wOUfRQFu1iGnTzGNTXEkgpgRG06FIJcaKuCQZPos1w1de6l5loFLaZS7G4GZDTRzMfSWZzG/TTjZ5UFc3Bjuv1GqOQlSLNLpQAIilPAfTRe94HNdulnQWdQd0jwoFzlhRtIDoGLFdMNmpGdPikIPciEFA1MWY58aWyH18AZNKCzgRtqWAQ2kEcJUHVcVQ==; 31:gKI9cQ3IXYXPfT+FdAgodu+Vy19BK9xZKejd9dXWL2kPJKQw1HsIKd1tkjHLZLgeUayTS0jX0PyPzFP7SxoDq+DMYKUs620ATVWf5lFu8+44gni3H8c768osV/E7WaOqHLcakSg75VEPJVLfI8uMeXzQQEasSEqR4mmIat9u115B0+ukvDKA35J5JNFZ1oGJ+o6Abh+RTIE6QgSoRu/KVJe/f8JivMAvklpaJASR5rM= X-MS-TrafficTypeDiagnostic: DM6PR07MB5002: X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB5002; 20:VQoX+4mcKa5e6GFKatRW/Dsy20mCuV9ET1AqX4yzUprh4pHncl5piYXE/7hpkpoNegzqQIfB78J941rXwsVITrM4xk8F0uLtWz1365Aq9jpkwjj4W06g3mVvJHOf5DLaZwNCfGf9kx8oJLA3XsZP4qbkbj/5IevQQFmLxViIaHj2Sv/p+4XQgnBTaGdZZ96qpQzjscfw1VoQYtPXnOfOm1k9eu/kSq1ulOef/D4Kyv2rt6w+HuXSIv8HIPyIZAPk8CsVou13Q1dXeKtUbFTVyL7GA5Zixw9x04QfntnxNtmACLL75yND4iesSFF3MgXBs1H4z+U+bg6LWwsL1TPvVtGe3Jl8HHuec1fRyY9wUV57iTn16ETWa5LWwYus8Cn0pPOdiPNIf9gxDm4ON5BUfnVDgNQzYyXrI1gsmtNinrEqNVBlJ+wW5wCoNboiIr26qMlcu4jXmlU3pXhvMoxiNP/YPYeWgsBnv93H+J04VvmRluHQQMonUxp/2ntmsQzNmjzwMp8WJK3QhdD1YzHb4WfoCcuIoC7rJZV2EtqhiNAcryUSCtOKia6qpAeNfupGpgQylVuI8gO2ZNTMURbHcxkw5G4II6m8ILUddS0Lc/g=; 4:RzEKQZQAGBcICeZnH7LV/v9Acblv0HYw5iERIXp95nama2qT/MzeKITmD0gC7Bm0c1B1DDpjN6t9yz2/23yGyhQuGfmyNzJ/RkHrFDpAbGut3/BsKvcIFjya3iHB/GTJAxM761lgTp0lLiw2AxfouA3mSEriyoV2j3bp+mGO2C4I1ZcEpOgGMIUnNNoCoxWlrVtMFrYjByq5AYMRz0qFfXAIQVe3GNWirdF/PlrrVf22J0TLGwJyrqM+0suTezjw5lCwmRvYYU4Jie+GQAfJMA== 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)(3231355)(944501410)(52105095)(3002001)(93006095)(10201501046)(149066)(150057)(6041310)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051); SRVR:DM6PR07MB5002; BCL:0; PCL:0; RULEID:; SRVR:DM6PR07MB5002; X-Forefront-PRVS: 0813C68E65 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(396003)(376002)(136003)(39860400002)(366004)(346002)(199004)(189003)(6486002)(5660300001)(97736004)(26005)(106356001)(7736002)(186003)(36756003)(305945005)(25786009)(1857600001)(6666003)(446003)(42882007)(110136005)(956004)(47776003)(3846002)(6116002)(1076002)(16526019)(11346002)(2870700001)(476003)(575784001)(2616005)(105586002)(66066001)(72206003)(4326008)(2906002)(53936002)(44832011)(478600001)(51416003)(50466002)(52116002)(81166006)(6512007)(55236004)(81156014)(107886003)(486006)(8676002)(50226002)(76176011)(316002)(14444005)(69590400006)(6506007)(386003)(68736007)(8936002)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR07MB5002; H:localhost.localdomain; 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; DM6PR07MB5002; 23:iwR/JO1MlMgeuzDkeJtUMBmvZukjyAuBD9IhQHYWU?= =?us-ascii?Q?R0tohad2opyaQOGsaiItFTH3iuW3tLZWwIbxK8r6LtnWMBzKIhczPclgmPKI?= =?us-ascii?Q?5vQkxNCaP90nFPaHoHYkv809kBpvQflBmwJsSm/dWCVLP5Mtf3l+xeaE1pAS?= =?us-ascii?Q?eyna8L0Sx4dTk4LeefxAYYaATdIBtwzu12Z5HhX1Y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rWj88YgOwUGMIqkfK4EbQttu+nC+SiZriNdM1cUq4/kCHK686y0TLeQwBlRzLiWelW0olUTyZg92mL09RvQIGwf/cYcHfWpfJZM4mrIfPyE4nLe+G9s9UbLGevJh9KZlCWv+GbH0TNy/WZTs3roAyban5MCn8xos5vrea/pc/OsUWKdthjhMKWTiHIoOtdQDBCEw8lZZlksn88k4TwaCBOrNz5MUHM5WeNVlBQJhhI1jg==; 5:e/qYVNxYpJXcJa4xa988/h7vu2dArWSmjnCacR+xY0O3CIsRn0UUtEpHE7R6kwDPzncnb28zqWl2rJKQMNu9a7rYSXpGrBw1kFlKrz34w7d+u9F/zVHADb+wjMYXRul37N4gAWSDqRLecFh5uI/mmW0LnsRVNFKamfFXco72AXc=; 7:8O2K+3d9h/TVCy7BRGYy5JJgF2TobxVVJQDZxpE5R+yjitMiycaQJ3FsALKYIbrDX3GwtM1R9CrBPo16zL7Vd1VcW/xvL1OVUcv8rFyzII02TCPJLdhC9Mh0Q8gOOMItbWmI6ktWhJ0tZhDP7NJWLno792C4a2vxWvy81RKwQg/0IRMx92hkonbuSvjy8yc4flfFLqlNLctJzAkJQASj9BvL7ustDc564xrWh1WoM62t8M+5m6/8A4eoQuNDeEhe SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2018 10:52:28.9105 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5c1cce73-d2fb-4562-8208-08d6285527e9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB5002 Subject: [dpdk-dev] [PATCH v2 1/2] 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: Tue, 02 Oct 2018 10:52:36 -0000 Added SCTP Rx checksum offload support Signed-off-by: Jerin Jacob --- v2: - Fix printf formatting error(Ferruh Yigit) --- 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 794aa5268..1adc9b94b 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 b085bda86..d42489b6d 100644 --- a/doc/guides/nics/features.rst +++ b/doc/guides/nics/features.rst @@ -576,7 +576,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`` | @@ -584,7 +584,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 ef99f7068..e9a82fe7f 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -126,6 +126,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 012577b0a..d02db14ad 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -888,6 +888,7 @@ struct rte_eth_conf { #define DEV_RX_OFFLOAD_TIMESTAMP 0x00004000 #define DEV_RX_OFFLOAD_SECURITY 0x00008000 #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 | \ -- 2.19.0