From patchwork Thu Dec 21 17:41:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Euan Bourke X-Patchwork-Id: 135474 X-Patchwork-Delegate: thomas@monjalon.net 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 434DD43752; Thu, 21 Dec 2023 18:42:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 10F5F402BD; Thu, 21 Dec 2023 18:42:38 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mails.dpdk.org (Postfix) with ESMTP id 28FB04028B; Thu, 21 Dec 2023 18:42:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703180556; x=1734716556; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=C9nEhIlAD0g5x19h0Ufl+BA1ogfAVGvNn+5gmC3quko=; b=eicEs9FnFvl7PPrCTdIbHQX9CxW0tq8j6irLH9niri1nEJVcKKnERotM GiyLK9SwSF7Hn8cvDBpL9lSasQEayDWokLe+UUDqHGgcGj0Ha8jo+9gnH UHO6yLPj4tOLzhg4GNpdNxJCTorcavfcTtAsDTdN5P+1vJGcZIRRL/Dv+ LhQrqjP7EjoHtGPYW6piOrDR0Wr4CdN3ZyRM+gFkCTo72CKApVgy6eL2k oiHz4JMnzT0PTKTJ2U7BOVdQNMy3DyZa8N2PkFX4QLuCJSgyY6U7T1TbZ popSTVl2zEHtBXNjslipfDXlpCRhYLNWf3tYl8U0nbKP+GF6DaDrWQRwQ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10931"; a="9490090" X-IronPort-AV: E=Sophos;i="6.04,294,1695711600"; d="scan'208";a="9490090" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2023 09:42:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10931"; a="776784430" X-IronPort-AV: E=Sophos;i="6.04,294,1695711600"; d="scan'208";a="776784430" Received: from unknown (HELO silpixa00400630.ir.intel.com) ([10.237.213.151]) by orsmga002.jf.intel.com with ESMTP; 21 Dec 2023 09:42:33 -0800 From: Euan Bourke To: dev@dpdk.org Cc: Euan Bourke , stable@dpdk.org, Thomas Monjalon , Konstantin Ananyev Subject: [PATCH v3 1/2] doc: updated incorrect value for IP frag max fragments Date: Thu, 21 Dec 2023 17:41:39 +0000 Message-Id: <20231221174140.3369894-1-euan.bourke@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231221113242.3351356-1-euan.bourke@intel.com> References: <20231221113242.3351356-1-euan.bourke@intel.com> MIME-Version: 1.0 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 Docs for IP Fragment said RTE_LIBRTE_IP_FRAG_MAX_FRAG was 4 by default, however this was changed to 8. Documentation has been updated to account for this, including a snippet of code where RTE_LIBRTE_IP_FRAG_MAX_FRAG is defined to ensure documentation stays up to date. Fixes: f8e0f8ce9030 ("ip_frag: increase default maximum of fragments") Cc: stable@dpdk.org Signed-off-by: Euan Bourke --- .mailmap | 1 + doc/guides/prog_guide/ip_fragment_reassembly_lib.rst | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index ab0742a382..528bc68a30 100644 --- a/.mailmap +++ b/.mailmap @@ -379,6 +379,7 @@ Eric Zhang Erik Gabriel Carrillo Erik Ziegenbalg Erlu Chen +Euan Bourke Eugenio PĂ©rez Eugeny Parshutin Evan Swanson diff --git a/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst b/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst index 314d4adbb8..f3ed90d700 100644 --- a/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst +++ b/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst @@ -43,7 +43,13 @@ Note that all update/lookup operations on Fragment Table are not thread safe. So if different execution contexts (threads/processes) will access the same table simultaneously, then some external syncing mechanism have to be provided. -Each table entry can hold information about packets consisting of up to RTE_LIBRTE_IP_FRAG_MAX (by default: 4) fragments. +Each table entry can hold information about packets of up to ``RTE_LIBRTE_IP_FRAG_MAX_FRAG`` fragments, +where ``RTE_LIBRTE_IP_FRAG_MAX_FRAG`` defaults to: + +.. literalinclude:: ../../../config/rte_config.h + :language: c + :start-at: #define RTE_LIBRTE_IP_FRAG_MAX_FRAG + :lines: 1 Code example, that demonstrates creation of a new Fragment table: From patchwork Thu Dec 21 17:41:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Euan Bourke X-Patchwork-Id: 135475 X-Patchwork-Delegate: thomas@monjalon.net 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 E89F643752; Thu, 21 Dec 2023 18:42:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4500540EE2; Thu, 21 Dec 2023 18:42:40 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mails.dpdk.org (Postfix) with ESMTP id 6E6594067D for ; Thu, 21 Dec 2023 18:42:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703180559; x=1734716559; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dSMpYC27Bp6giGRLdxXaFWmcnunWYOJDly6WQq1SYVg=; b=Ghub25KLv1AoBa9myrKPVSelpNMqqr6YoBM9tw8SFWsZkErznZoeqdRp 2GopKbHIlewT9LUz+75DXwWTHb2vNVKp2uxtMldjG5SzJVStyAlS1P2c7 Xm+rs5yzR/1P+HSO1Kgl1XZnLVaDgcb1PNuRFdPnaR7ATS7eFQOVyiX5w zGX1ZCQcKUd/tkU/Ua4RYuXCY9elqd7aSQd6Vm8zlT5X4cxuWuRRXu2mv ZMizT2udmKMb+ZtZJBA2PxVPsWGgUQlWlZe05s7mlDGq1tNOG4ESq5VtT sE3E7SwxihVg0ulVBJe+KbPRGHTXIGO0Lyp0sjm6ONmlphYSDR7Gkab3I g==; X-IronPort-AV: E=McAfee;i="6600,9927,10931"; a="9490103" X-IronPort-AV: E=Sophos;i="6.04,294,1695711600"; d="scan'208";a="9490103" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2023 09:42:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10931"; a="776784439" X-IronPort-AV: E=Sophos;i="6.04,294,1695711600"; d="scan'208";a="776784439" Received: from unknown (HELO silpixa00400630.ir.intel.com) ([10.237.213.151]) by orsmga002.jf.intel.com with ESMTP; 21 Dec 2023 09:42:36 -0800 From: Euan Bourke To: dev@dpdk.org Cc: Euan Bourke , Konstantin Ananyev , Bruce Richardson , Radu Nicolau , Akhil Goyal Subject: [PATCH v3 2/2] ip_frag: updated name for IP frag max frag define Date: Thu, 21 Dec 2023 17:41:40 +0000 Message-Id: <20231221174140.3369894-2-euan.bourke@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231221174140.3369894-1-euan.bourke@intel.com> References: <20231221113242.3351356-1-euan.bourke@intel.com> <20231221174140.3369894-1-euan.bourke@intel.com> MIME-Version: 1.0 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 Removed LIBRTE from name as its an old prefix. Signed-off-by: Euan Bourke --- app/test/test_reassembly_perf.c | 2 +- config/rte_config.h | 2 +- doc/guides/prog_guide/ip_fragment_reassembly_lib.rst | 8 ++++---- doc/guides/sample_app_ug/ip_reassembly.rst | 4 ++-- examples/ip_fragmentation/main.c | 2 +- examples/ip_reassembly/main.c | 2 +- examples/ipsec-secgw/ipsec_worker.h | 2 +- lib/ip_frag/ip_reassembly.h | 2 +- lib/ip_frag/rte_ip_frag.h | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/test/test_reassembly_perf.c b/app/test/test_reassembly_perf.c index 3912179022..805ae2fe9d 100644 --- a/app/test/test_reassembly_perf.c +++ b/app/test/test_reassembly_perf.c @@ -20,7 +20,7 @@ #define MAX_FLOWS (1024 * 32) #define MAX_BKTS MAX_FLOWS #define MAX_ENTRIES_PER_BKT 16 -#define MAX_FRAGMENTS RTE_LIBRTE_IP_FRAG_MAX_FRAG +#define MAX_FRAGMENTS RTE_IP_FRAG_MAX_FRAG #define MIN_FRAGMENTS 2 #define MAX_PKTS (MAX_FLOWS * MAX_FRAGMENTS) diff --git a/config/rte_config.h b/config/rte_config.h index da265d7dd2..e2fa2a58fa 100644 --- a/config/rte_config.h +++ b/config/rte_config.h @@ -85,7 +85,7 @@ #define RTE_RAWDEV_MAX_DEVS 64 /* ip_fragmentation defines */ -#define RTE_LIBRTE_IP_FRAG_MAX_FRAG 8 +#define RTE_IP_FRAG_MAX_FRAG 8 // RTE_LIBRTE_IP_FRAG_TBL_STAT is not set /* rte_power defines */ diff --git a/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst b/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst index f3ed90d700..2d422309bb 100644 --- a/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst +++ b/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst @@ -43,12 +43,12 @@ Note that all update/lookup operations on Fragment Table are not thread safe. So if different execution contexts (threads/processes) will access the same table simultaneously, then some external syncing mechanism have to be provided. -Each table entry can hold information about packets of up to ``RTE_LIBRTE_IP_FRAG_MAX_FRAG`` fragments, -where ``RTE_LIBRTE_IP_FRAG_MAX_FRAG`` defaults to: +Each table entry can hold information about packets of up to ``RTE_IP_FRAG_MAX_FRAG`` fragments, +where ``RTE_IP_FRAG_MAX_FRAG`` defaults to: .. literalinclude:: ../../../config/rte_config.h :language: c - :start-at: #define RTE_LIBRTE_IP_FRAG_MAX_FRAG + :start-at: #define RTE_IP_FRAG_MAX_FRAG :lines: 1 Code example, that demonstrates creation of a new Fragment table: @@ -69,7 +69,7 @@ Also, entries that resides in the table longer then are considered and could be removed/replaced by the new ones. Note that reassembly demands a lot of mbuf's to be allocated. -At any given time up to (2 \* bucket_entries \* RTE_LIBRTE_IP_FRAG_MAX \* ) +At any given time up to (2 \* bucket_entries \* RTE_IP_FRAG_MAX \* ) can be stored inside Fragment Table waiting for remaining fragments. Packet Reassembly diff --git a/doc/guides/sample_app_ug/ip_reassembly.rst b/doc/guides/sample_app_ug/ip_reassembly.rst index 5280bf4ea0..d9aaa4b5c4 100644 --- a/doc/guides/sample_app_ug/ip_reassembly.rst +++ b/doc/guides/sample_app_ug/ip_reassembly.rst @@ -135,7 +135,7 @@ Fragment table maintains information about already received fragments of the pac Each IP packet is uniquely identified by triple , , . To avoid lock contention, each RX queue has its own Fragment Table, e.g. the application can't handle the situation when different fragments of the same packet arrive through different RX queues. -Each table entry can hold information about packet consisting of up to RTE_LIBRTE_IP_FRAG_MAX_FRAGS fragments. +Each table entry can hold information about packet consisting of up to RTE_IP_FRAG_MAX_FRAGS fragments. .. literalinclude:: ../../../examples/ip_reassembly/main.c :language: c @@ -147,7 +147,7 @@ Mempools Initialization ~~~~~~~~~~~~~~~~~~~~~~~ The reassembly application demands a lot of mbuf's to be allocated. -At any given time up to (2 \* max_flow_num \* RTE_LIBRTE_IP_FRAG_MAX_FRAGS \* ) +At any given time up to (2 \* max_flow_num \* RTE_IP_FRAG_MAX_FRAGS_FRAG \* ) can be stored inside Fragment Table waiting for remaining fragments. To keep mempool size under reasonable limits and to avoid situation when one RX queue can starve other queues, each RX queue uses its own mempool. diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c index 744a1aa9b4..1e4471891b 100644 --- a/examples/ip_fragmentation/main.c +++ b/examples/ip_fragmentation/main.c @@ -71,7 +71,7 @@ /* * Max number of fragments per packet expected - defined by config file. */ -#define MAX_PACKET_FRAG RTE_LIBRTE_IP_FRAG_MAX_FRAG +#define MAX_PACKET_FRAG RTE_IP_FRAG_MAX_FRAG #define NB_MBUF 8192 diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c index bd0b1d31de..16607d99f3 100644 --- a/examples/ip_reassembly/main.c +++ b/examples/ip_reassembly/main.c @@ -69,7 +69,7 @@ #define MIN_FLOW_TTL 1 #define DEF_FLOW_TTL MS_PER_S -#define MAX_FRAG_NUM RTE_LIBRTE_IP_FRAG_MAX_FRAG +#define MAX_FRAG_NUM RTE_IP_FRAG_MAX_FRAG /* Should be power of two. */ #define IP_FRAG_TBL_BUCKET_ENTRIES 16 diff --git a/examples/ipsec-secgw/ipsec_worker.h b/examples/ipsec-secgw/ipsec_worker.h index ac980b8bcf..918e6b5200 100644 --- a/examples/ipsec-secgw/ipsec_worker.h +++ b/examples/ipsec-secgw/ipsec_worker.h @@ -291,7 +291,7 @@ send_fragment_packet(struct lcore_conf *qconf, struct rte_mbuf *m, len = tbl->len; /* free space for new fragments */ - if (len + RTE_LIBRTE_IP_FRAG_MAX_FRAG >= RTE_DIM(tbl->m_table)) { + if (len + RTE_IP_FRAG_MAX_FRAG >= RTE_DIM(tbl->m_table)) { send_burst(qconf, len, port); len = 0; } diff --git a/lib/ip_frag/ip_reassembly.h b/lib/ip_frag/ip_reassembly.h index a9f97aefca..77c22ca9d1 100644 --- a/lib/ip_frag/ip_reassembly.h +++ b/lib/ip_frag/ip_reassembly.h @@ -16,7 +16,7 @@ enum { IP_LAST_FRAG_IDX, /* index of last fragment */ IP_FIRST_FRAG_IDX, /* index of first fragment */ IP_MIN_FRAG_NUM, /* minimum number of fragments */ - IP_MAX_FRAG_NUM = RTE_LIBRTE_IP_FRAG_MAX_FRAG, + IP_MAX_FRAG_NUM = RTE_IP_FRAG_MAX_FRAG, /* maximum number of fragments per packet */ }; diff --git a/lib/ip_frag/rte_ip_frag.h b/lib/ip_frag/rte_ip_frag.h index 2ad318096b..6465ec316b 100644 --- a/lib/ip_frag/rte_ip_frag.h +++ b/lib/ip_frag/rte_ip_frag.h @@ -32,7 +32,7 @@ struct rte_mbuf; /** death row size in mbufs */ #define RTE_IP_FRAG_DEATH_ROW_MBUF_LEN \ - (RTE_IP_FRAG_DEATH_ROW_LEN * (RTE_LIBRTE_IP_FRAG_MAX_FRAG + 1)) + (RTE_IP_FRAG_DEATH_ROW_LEN * (RTE_IP_FRAG_MAX_FRAG + 1)) /** mbuf death row (packets to be freed) */ struct rte_ip_frag_death_row {