From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 94217A2EFC for ; Mon, 14 Oct 2019 18:26:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2C5AE1D41B; Mon, 14 Oct 2019 18:24:35 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 05EED1C43E for ; Mon, 14 Oct 2019 18:24:16 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Oct 2019 09:24:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,296,1566889200"; d="scan'208";a="201503685" Received: from silpixa00381635.ir.intel.com (HELO silpixa00381635.ger.corp.intel.com) ([10.237.223.229]) by FMSMGA003.fm.intel.com with ESMTP; 14 Oct 2019 09:24:14 -0700 From: Jasvinder Singh To: dev@dpdk.org Cc: cristian.dumitrescu@intel.com, Lukasz Krakowiak Date: Mon, 14 Oct 2019 18:23:47 +0100 Message-Id: <20191014172347.139114-16-jasvinder.singh@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191014172347.139114-1-jasvinder.singh@intel.com> References: <20191014120951.152654-1-jasvinder.singh@intel.com> <20191014172347.139114-1-jasvinder.singh@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v5 15/15] sched: remove redundant code 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Remove redundant data structure fields from port level data structures and update the release notes. Signed-off-by: Jasvinder Singh Signed-off-by: Lukasz Krakowiak --- doc/guides/rel_notes/release_19_11.rst | 7 ++++- lib/librte_sched/rte_sched.c | 42 +------------------------- lib/librte_sched/rte_sched.h | 22 -------------- 3 files changed, 7 insertions(+), 64 deletions(-) diff --git a/doc/guides/rel_notes/release_19_11.rst b/doc/guides/rel_notes/release_19_11.rst index 23ceb8f67..87812b32c 100644 --- a/doc/guides/rel_notes/release_19_11.rst +++ b/doc/guides/rel_notes/release_19_11.rst @@ -172,6 +172,11 @@ API Changes * ethdev: changed ``rte_eth_dev_owner_delete`` return value from ``void`` to ``int`` to provide a way to report various error conditions. +* sched: The pipe nodes configuration parameters such as number of pipes, + pipe queue sizes, pipe profiles, etc., are moved from port level structure + to subport level. This allows different subports of the same port to + have different configuration for the pipe nodes. + ABI Changes ----------- @@ -259,7 +264,7 @@ The libraries prepended with a plus sign were incremented in this version. librte_rcu.so.1 librte_reorder.so.1 librte_ring.so.2 - librte_sched.so.3 + + librte_sched.so.4 librte_security.so.2 librte_stack.so.1 librte_table.so.3 diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c index 1faa580d0..710ecf65a 100644 --- a/lib/librte_sched/rte_sched.c +++ b/lib/librte_sched/rte_sched.c @@ -216,13 +216,6 @@ struct rte_sched_port { uint32_t mtu; uint32_t frame_overhead; int socket; - uint16_t qsize[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE]; - uint32_t n_pipe_profiles; - uint32_t n_max_pipe_profiles; - uint32_t pipe_tc_be_rate_max; -#ifdef RTE_SCHED_RED - struct rte_red_config red_config[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE][RTE_COLORS]; -#endif /* Timing */ uint64_t time_cpu_cycles; /* Current CPU time measured in CPU cyles */ @@ -230,48 +223,15 @@ struct rte_sched_port { uint64_t time; /* Current NIC TX time measured in bytes */ struct rte_reciprocal inv_cycles_per_byte; /* CPU cycles per byte */ - /* Scheduling loop detection */ - uint32_t pipe_loop; - uint32_t pipe_exhaustion; - - /* Bitmap */ - struct rte_bitmap *bmp; - uint32_t grinder_base_bmp_pos[RTE_SCHED_PORT_N_GRINDERS] __rte_aligned_16; - /* Grinders */ - struct rte_sched_grinder grinder[RTE_SCHED_PORT_N_GRINDERS]; - uint32_t busy_grinders; struct rte_mbuf **pkts_out; uint32_t n_pkts_out; uint32_t subport_id; - /* Queue base calculation */ - uint32_t qsize_add[RTE_SCHED_QUEUES_PER_PIPE]; - uint32_t qsize_sum; - /* Large data structures */ - struct rte_sched_subport *subports[0]; - struct rte_sched_subport *subport; - struct rte_sched_pipe *pipe; - struct rte_sched_queue *queue; - struct rte_sched_queue_extra *queue_extra; - struct rte_sched_pipe_profile *pipe_profiles; - uint8_t *bmp_array; - struct rte_mbuf **queue_array; - uint8_t memory[0] __rte_cache_aligned; + struct rte_sched_subport *subports[0] __rte_cache_aligned; } __rte_cache_aligned; -enum rte_sched_port_array { - e_RTE_SCHED_PORT_ARRAY_SUBPORT = 0, - e_RTE_SCHED_PORT_ARRAY_PIPE, - e_RTE_SCHED_PORT_ARRAY_QUEUE, - e_RTE_SCHED_PORT_ARRAY_QUEUE_EXTRA, - e_RTE_SCHED_PORT_ARRAY_PIPE_PROFILES, - e_RTE_SCHED_PORT_ARRAY_BMP_ARRAY, - e_RTE_SCHED_PORT_ARRAY_QUEUE_ARRAY, - e_RTE_SCHED_PORT_ARRAY_TOTAL, -}; - enum rte_sched_subport_array { e_RTE_SCHED_SUBPORT_ARRAY_PIPE = 0, e_RTE_SCHED_SUBPORT_ARRAY_QUEUE, diff --git a/lib/librte_sched/rte_sched.h b/lib/librte_sched/rte_sched.h index 40f02f124..c82c23c14 100644 --- a/lib/librte_sched/rte_sched.h +++ b/lib/librte_sched/rte_sched.h @@ -260,28 +260,6 @@ struct rte_sched_port_params { * the subports of the same port. */ uint32_t n_pipes_per_subport; - - /** Packet queue size for each traffic class. - * All the pipes within the same subport share the similar - * configuration for the queues. - */ - uint16_t qsize[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE]; - - /** Pipe profile table. - * Every pipe is configured using one of the profiles from this table. - */ - struct rte_sched_pipe_params *pipe_profiles; - - /** Profiles in the pipe profile table */ - uint32_t n_pipe_profiles; - - /** Max profiles allowed in the pipe profile table */ - uint32_t n_max_pipe_profiles; - -#ifdef RTE_SCHED_RED - /** RED parameters */ - struct rte_red_params red_params[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE][RTE_COLORS]; -#endif }; /* -- 2.21.0