Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/137055/?format=api
http://patches.dpdk.org/api/patches/137055/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240222194800.80648-10-ajit.khaparde@broadcom.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20240222194800.80648-10-ajit.khaparde@broadcom.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20240222194800.80648-10-ajit.khaparde@broadcom.com", "date": "2024-02-22T19:47:59", "name": "[v2,09/10] net/bnxt: fix compressed Rx CQE handling", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "f86eeaa94ddef8172824320e76b09d394f64d2c4", "submitter": { "id": 501, "url": "http://patches.dpdk.org/api/people/501/?format=api", "name": "Ajit Khaparde", "email": "ajit.khaparde@broadcom.com" }, "delegate": { "id": 1766, "url": "http://patches.dpdk.org/api/users/1766/?format=api", "username": "ajitkhaparde", "first_name": "Ajit", "last_name": "Khaparde", "email": "ajit.khaparde@broadcom.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240222194800.80648-10-ajit.khaparde@broadcom.com/mbox/", "series": [ { "id": 31188, "url": "http://patches.dpdk.org/api/series/31188/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31188", "date": "2024-02-22T19:47:50", "name": "patchset for bnxt", "version": 2, "mbox": "http://patches.dpdk.org/series/31188/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/137055/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/137055/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "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])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 307BA43B84;\n\tThu, 22 Feb 2024 20:49:18 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 452E3427E0;\n\tThu, 22 Feb 2024 20:48:23 +0100 (CET)", "from mail-pf1-f177.google.com (mail-pf1-f177.google.com\n [209.85.210.177])\n by mails.dpdk.org (Postfix) with ESMTP id B736F411F3\n for <dev@dpdk.org>; Thu, 22 Feb 2024 20:48:19 +0100 (CET)", "by mail-pf1-f177.google.com with SMTP id\n d2e1a72fcca58-6e471caaa71so11206b3a.2\n for <dev@dpdk.org>; Thu, 22 Feb 2024 11:48:19 -0800 (PST)", "from C02GC2QQMD6T.wifi.broadcom.net ([192.19.223.252])\n by smtp.gmail.com with ESMTPSA id\n gu12-20020a056a004e4c00b006e025e1fa61sm9538452pfb.14.2024.02.22.11.48.17\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 22 Feb 2024 11:48:17 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=broadcom.com; s=google; t=1708631298; x=1709236098; darn=dpdk.org;\n h=mime-version:references:in-reply-to:message-id:date:subject:cc:to\n :from:from:to:cc:subject:date:message-id:reply-to;\n bh=22bt2kVLhyKVCCQkEuGvTIbzlFcM2bTX2UmSd37F3es=;\n b=SpBLgkIfTnrO4C/M9Y7ZJtqsO4i8w3ADJykO7OmBXJwKe8kAmSFEGT2l++FR5PceO9\n /0xufvU/5Z7ng/68/7p30IdX4T3rNYlhG0TKMSf0tHtAPKMCHj9whhtOMFLKrNagZ2i+\n MYwlb3WQqn08QnG/1wNehXSu+5TBji76iI27o=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1708631298; x=1709236098;\n h=mime-version:references:in-reply-to:message-id:date:subject:cc:to\n :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n bh=22bt2kVLhyKVCCQkEuGvTIbzlFcM2bTX2UmSd37F3es=;\n b=jHCBNY0NgL4OmBDNOZgAZ+30fJTGm6IXN1v6z704eTsvfCaOYHweJpn1jRBEWNSZZL\n tqUuBDP/cehZTFTcTCnep/yH3NUniVAnE4E1PpqdTxufAHH6QrAK10QbgfFA79nrlSWX\n ne72a7YyjeD7G89PIDCiqOybW7pGRqyv8yHEqG8k5HK07xbYhB+jtK3fFRUg00m2Je+X\n KW/8hNgCvqFPxGpLbsKvLfLMV02NzN8h2aOdgC9OScZlShVWkF6//5ceR3VeyYSA6T3B\n ctT0+wW2hmmjNUblVGwnu4NdwOgVlQ0yuI4xa8ZjgOql5W2smpqTxT67ADCHMrYeigBs\n xqqg==", "X-Gm-Message-State": "AOJu0YxnjwgC7/1avqUWn8k7saOZpWvwYto5p3f99yyaBGCGvhmnSaqq\n AU5o2nPp3u4GrSRD0+KSMGDfQuy9G48VRghrhWAcVbQOFZuKTY5Nf+t1Z4Y2SKk7oJZoprOD0xT\n 1w++WNjGrlx4nksv5rGAlSJ4CXyHRJakm2vtAqaGSWWO/I2zo64kdV/xJWJiSN8z0ND+RXV3DmC\n 9WeAEf8sUkSnafiBse+lOVdvQG/rIo", "X-Google-Smtp-Source": "\n AGHT+IG4pvS7wjmgBQ6SSTPgEiLyRfateMrXUiIinDke3AoMqJEYT4C5NNd4rNPRbcvLmwNPycyTJA==", "X-Received": "by 2002:a05:6a00:26c6:b0:6e4:d519:4681 with SMTP id\n p6-20020a056a0026c600b006e4d5194681mr1447964pfw.11.1708631298494;\n Thu, 22 Feb 2024 11:48:18 -0800 (PST)", "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>", "To": "dev@dpdk.org", "Cc": "ferruh.yigit@amd.com,\n\tthomas@monjalon.net", "Subject": "[PATCH v2 09/10] net/bnxt: fix compressed Rx CQE handling", "Date": "Thu, 22 Feb 2024 11:47:59 -0800", "Message-Id": "<20240222194800.80648-10-ajit.khaparde@broadcom.com>", "X-Mailer": "git-send-email 2.39.2 (Apple Git-143)", "In-Reply-To": "<20240222194800.80648-1-ajit.khaparde@broadcom.com>", "References": "<20240221212044.27209-1-ajit.khaparde@broadcom.com>\n <20240222194800.80648-1-ajit.khaparde@broadcom.com>", "MIME-Version": "1.0", "Content-Type": "multipart/signed; protocol=\"application/pkcs7-signature\";\n micalg=sha-256; boundary=\"000000000000a098590611fdb949\"", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "We were trying to reuse 32-byte CQE macros for\ncompressed CQE handling. And that was causing the packet\nerror bits to be misinterpreted.\n\nFix it by using appropriate macros.\n\nFixes: d58c6c077cc2 (\"net/bnxt: add AVX2 Rx for compressed CQE\")\n\nSigned-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>\n---\n drivers/net/bnxt/bnxt_rxtx_vec_avx2.c | 39 ++++++++++++++++-----------\n 1 file changed, 23 insertions(+), 16 deletions(-)", "diff": "diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c b/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c\nindex ce6b597611..976f258044 100644\n--- a/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c\n+++ b/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c\n@@ -392,19 +392,21 @@ crx_burst_vec_avx2(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n \t\t\t\t0xFF, 0xFF, 3, 2, /* pkt_len */\n \t\t\t\t0xFF, 0xFF, 0xFF, 0xFF); /* pkt_type (zeroes) */\n \tconst __m256i flags_type_mask =\n-\t\t_mm256_set1_epi32(RX_PKT_CMPL_FLAGS_ITYPE_MASK);\n+\t\t_mm256_set1_epi32(RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_MASK);\n \tconst __m256i flags2_mask1 =\n-\t\t_mm256_set1_epi32(CMPL_FLAGS2_VLAN_TUN_MSK);\n+\t\t_mm256_set1_epi32(CMPL_FLAGS2_VLAN_TUN_MSK_CRX);\n \tconst __m256i flags2_mask2 =\n-\t\t_mm256_set1_epi32(RX_PKT_CMPL_FLAGS2_IP_TYPE);\n+\t\t_mm256_set1_epi32(RX_PKT_COMPRESS_CMPL_FLAGS_IP_TYPE);\n \tconst __m256i rss_mask =\n-\t\t_mm256_set1_epi32(RX_PKT_CMPL_FLAGS_RSS_VALID);\n+\t\t_mm256_set1_epi32(RX_PKT_COMPRESS_CMPL_FLAGS_RSS_VALID);\n \t__m256i t0, t1, flags_type, flags2, index, errors;\n \t__m256i ptype_idx, ptypes, is_tunnel;\n \t__m256i mbuf01, mbuf23, mbuf45, mbuf67;\n \t__m256i rearm0, rearm1, rearm2, rearm3, rearm4, rearm5, rearm6, rearm7;\n \t__m256i ol_flags, ol_flags_hi;\n \t__m256i rss_flags;\n+\t__m256i errors_v2;\n+\t__m256i cs_err_v2;\n \n \t/* Validate ptype table indexing at build time. */\n \tbnxt_check_ptype_constants();\n@@ -447,7 +449,6 @@ crx_burst_vec_avx2(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n \t\t\t\t cons += BNXT_RX_DESCS_PER_LOOP_VEC256,\n \t\t\t\t mbcons += BNXT_RX_DESCS_PER_LOOP_VEC256) {\n \t\t__m256i rxcmp0_1, rxcmp2_3, rxcmp4_5, rxcmp6_7, info3_v;\n-\t\t__m256i errors_v2;\n \t\tuint32_t num_valid;\n \n \t\t/* Copy eight mbuf pointers to output array. */\n@@ -470,6 +471,7 @@ crx_burst_vec_avx2(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n \t\trxcmp2_3 = _mm256_loadu_si256((void *)&cp_desc_ring[cons + 2]);\n \t\trte_compiler_barrier();\n \t\trxcmp0_1 = _mm256_loadu_si256((void *)&cp_desc_ring[cons + 0]);\n+\t\trte_compiler_barrier();\n \n \t\t/* Compute packet type table indices for eight packets. */\n \t\tt0 = _mm256_unpacklo_epi32(rxcmp0_1, rxcmp2_3);\n@@ -477,19 +479,19 @@ crx_burst_vec_avx2(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n \t\tflags_type = _mm256_unpacklo_epi64(t0, t1);\n \t\tptype_idx = _mm256_and_si256(flags_type, flags_type_mask);\n \t\tptype_idx = _mm256_srli_epi32(ptype_idx,\n-\t\t\t\t\t RX_PKT_CMPL_FLAGS_ITYPE_SFT -\n+\t\t\t\t\t RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_SFT -\n \t\t\t\t\t BNXT_PTYPE_TBL_TYPE_SFT);\n \n-\t\tt0 = _mm256_unpacklo_epi32(rxcmp0_1, rxcmp2_3);\n-\t\tt1 = _mm256_unpacklo_epi32(rxcmp4_5, rxcmp6_7);\n-\t\tflags2 = _mm256_unpackhi_epi64(t0, t1);\n+\t\tt0 = _mm256_unpackhi_epi32(rxcmp0_1, rxcmp2_3);\n+\t\tt1 = _mm256_unpackhi_epi32(rxcmp4_5, rxcmp6_7);\n+\t\tcs_err_v2 = _mm256_unpacklo_epi64(t0, t1);\n \n-\t\tt0 = _mm256_srli_epi32(_mm256_and_si256(flags2, flags2_mask1),\n-\t\t\t\t RX_PKT_CMPL_FLAGS2_META_FORMAT_SFT -\n+\t\tt0 = _mm256_srli_epi32(_mm256_and_si256(cs_err_v2, flags2_mask1),\n+\t\t\t\t RX_PKT_COMPRESS_CMPL_METADATA1_SFT -\n \t\t\t\t BNXT_PTYPE_TBL_VLAN_SFT);\n \t\tptype_idx = _mm256_or_si256(ptype_idx, t0);\n \n-\t\tt0 = _mm256_srli_epi32(_mm256_and_si256(flags2, flags2_mask2),\n+\t\tt0 = _mm256_srli_epi32(_mm256_and_si256(cs_err_v2, flags2_mask2),\n \t\t\t\t RX_PKT_CMPL_FLAGS2_IP_TYPE_SFT -\n \t\t\t\t BNXT_PTYPE_TBL_IP_VER_SFT);\n \t\tptype_idx = _mm256_or_si256(ptype_idx, t0);\n@@ -505,17 +507,22 @@ crx_burst_vec_avx2(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)\n \t\t * Compute ol_flags and checksum error table indices for eight\n \t\t * packets.\n \t\t */\n-\t\tis_tunnel = _mm256_and_si256(flags2, _mm256_set1_epi32(4));\n+\t\tis_tunnel = _mm256_and_si256(cs_err_v2,\n+\t\t\t\t\t _mm256_set1_epi32(BNXT_CRX_TUN_CS_CALC));\n \t\tis_tunnel = _mm256_slli_epi32(is_tunnel, 3);\n-\t\tflags2 = _mm256_and_si256(flags2, _mm256_set1_epi32(0x1F));\n+\n+\t\tflags2 = _mm256_and_si256(cs_err_v2,\n+\t\t\t\t\t _mm256_set1_epi32(BNXT_CRX_CQE_CSUM_CALC_MASK));\n+\t\tflags2 = _mm256_srli_epi64(flags2, 8);\n \n \t\t/* Extract errors_v2 fields for eight packets. */\n \t\tt0 = _mm256_unpackhi_epi32(rxcmp0_1, rxcmp2_3);\n \t\tt1 = _mm256_unpackhi_epi32(rxcmp4_5, rxcmp6_7);\n \t\terrors_v2 = _mm256_unpacklo_epi64(t0, t1);\n \n-\t\terrors = _mm256_srli_epi32(errors_v2, 4);\n-\t\terrors = _mm256_and_si256(errors, _mm256_set1_epi32(0xF));\n+\t\t/* Compute errors out of cs_err_v2 to index into flags table. */\n+\t\terrors = _mm256_and_si256(cs_err_v2, _mm256_set1_epi32(0xF0));\n+\t\terrors = _mm256_srli_epi32(errors, 4);\n \t\terrors = _mm256_and_si256(errors, flags2);\n \n \t\tindex = _mm256_andnot_si256(errors, flags2);\n", "prefixes": [ "v2", "09/10" ] }{ "id": 137055, "url": "