Summarizing issues in the alpha stage by FZU Flying Club_Beta Sprint

本文分析了AlphaSprint期间团队在学习与实践过程中遇到的问题,如对‘学习应用’理解不一致、团队协作不足、工具流程不顺和时间管理欠缺。提出改进计划,包括优化分工、工具流程和博客时间管理,旨在提高团队效率并推进课程项目进度。
部署运行你感兴趣的模型镜像


This assignment belongs to which courseEE308FZ Software Engineering https://bbs.youkuaiyun.com/forums/ssynkqtd-04
Where this assignment is requiredhttps://bbs.youkuaiyun.com/topics/617676810
Team nameFZU Flying Club
The goal of this assignmentHelp students understand Beta Sprint and promote course project progress
Other referencesNone

1 Abstract

During the Alpha Sprint, our group went through a process of learning by doing, including learning about programming languages, using Git, and building projects. However, in the process of “learning by doing”, we encountered some profound problems that need to be learnt and improved. In this paper, we will discuss these issues and suggest ways to improve the next phase, add new features, and improve the content shared on our Leapfrog Handbook website.

2 Introduction

In the Alpha Sprint, each group put into practice the concept of “learning by doing” through practical projects. The goal of this phase was to turn theoretical knowledge into practical skills, however, we encountered a number of challenges and problems along the way.

3 Summary of Problems

3.1 Inconsistency in the team’s understanding of the concept of “applying what we learnt”.

In the team, there were differences in the understanding of “learning to use”, which led to some confusion in the project. Some members were more focused on theoretical learning while others were more focused on practical application, which led to unnecessary friction in decision-making and implementation of the project.

3.2 Insufficient teamwork and division of labour

There were some bottlenecks in team collaboration and division of labour in Alpha Sprint. Sometimes, tasks were not clearly distributed, which led to redundancy of work and reduced efficiency. This is mainly reflected in the fact that the integrity of the recorded test video or demo video cannot be guaranteed, the efficiency of code writing is low, and the speed of debugging is slow, and so on. In the next phase, we need to strengthen the sense of teamwork and improve the process of task division.

3.3 Insufficiently smooth tool flow

The tool flow used in the project, especially the version control and testing tools, has some unsmooth areas. This led to a number of code management and testing problems. It is mainly reflected in the fact that the test reports of the automated testing website are complicated and obscure, which are not very understandable and unclear to read. The next phase will require a thorough review and improvement of the tool processes to ensure that the project is carried out efficiently.

3.4 Lack of blogging and time planning

In the Alpha sprint, we had some lapses in blog planning and time planning, there were premature or late submission of the corresponding blogs, which affected the overall progress of the project. In the next phase, we need to plan the content and release time of the blogs more systematically, and precisely control the time of the sprints to ensure that the project proceeds as planned.

4 Improvements and New Features Plan

4.1 Improvement of team division of labour

In the next phase, we will formulate a clearer team division of labour plan, and arrange as many team meetings as possible to review and plan the completion of the sprint plan and tasks. Ensure that each member’s responsibilities are clearly defined to avoid redundancy and confusion. Through more effective communication, we will unify the understanding of “learning by doing” to better promote the progress of the project.

4.2 Optimisation of tool processes

We plan to conduct a comprehensive review and improvement of the tool processes used in the project. Especially in version control and testing, we will look for smoother and more efficient solutions to improve the efficiency of the team.

4.3 Blogging and time planning optimisation

In the next phase, we will develop detailed blog planning to ensure that the content of each blog is valuable and published on schedule. At the same time, we will schedule the sprints more precisely to ensure the progress and quality of the project.

5 Conclusion

During the Alpha sprint, we experienced the process of learning and applying, but also faced some problems. Through summarising and reflecting, we have come up with a clear improvement plan, including team division of labour, tool flow, blog planning and time management. These improvements will help us to better achieve our goal of “learning by doing” and move the project forward. In the coming sprints, we will continue to optimise the team’s operations and improve the quality and efficiency of the project.

您可能感兴趣的与本文相关的镜像

Stable-Diffusion-3.5

Stable-Diffusion-3.5

图片生成
Stable-Diffusion

Stable Diffusion 3.5 (SD 3.5) 是由 Stability AI 推出的新一代文本到图像生成模型,相比 3.0 版本,它提升了图像质量、运行速度和硬件效率

Centralized Counters Client Configuration The following sections describe each one of the clients, the way it is triggered, and the format of the index that the client passes to its bound counter block. The clients are defined by CPSS_DXCH_CNC_CLIENT_ENT and can be enabled or disabled per a client by calling cpssDxChCncCountingEnableSet or by port, by calling cpssDxChCncPortClientEnableSet. Enabling the CNC per port per client must be called as many times as the number of the clients enabled on a specific port. L2/L3 Ingress VLAN Client The L2/L3 Ingress VLAN client is defined as CPSS_DXCH_CNC_CLIENT_L2L3_INGRESS_VLAN_E and used to count traffic on a per-VLAN basis. The VLAN ID used is the VLAN assigned after the Ingress Policy engine. This is the same VID used by the Bridge and Router engines. Triggering CNC is enabled for this client by calling cpssDxChCncCountingEnableSet with the CPSS_DXCH_CNC_COUNTING_ENABLE_UNIT_PCL_E parameter. If the Ingress port is configured to enable the L2/L3 Ingress VLAN client, and one or more counter blocks are bound to the L2/L3 Ingress VLAN client, a counter update is triggered for all traffic received on the port. Index Information In eArch devices, the client is an eVLAN. Counter indexing can be done in one of VLAN-based modes defined by CPSS_DXCH_CNC_VLAN_INDEX_MODE_ENT and set by cpssDxChCncVlanClientIndexModeSet. Each mode has a different index calculation as shown in the tables in the Appendix CNC Indexing Format. Ingress Policy Clients The Ingress Policy engine supports the following lookups, where each lookup can serve as an independent client to the CNC unit. The Ingress Policy clients are: IPCL0_0 – Defined by CPSS_DXCH_CNC_CLIENT_INGRESS_PCL_LOOKUP_0_E IPCL0_1 – Defined by CPSS_DXCH_CNC_CLIENT_INGRESS_PCL_LOOKUP_0_1_E eArch devices introduce a new mechanism for TCAM lookups, where each lookup 0,1 and 2 has parallel quad lookups. The differences between the lookup and sub-lookup is that in every lookup, there is an option to use a different key while in a parallel lookup, the key remains the same. Each sub-lookup of a lookup can be a client and bind a CNC block. The clients are listed as follows: CPSS_DXCH_CNC_CLIENT_INGRESS_PCL_LOOKUP_0_PARALLEL_0_E CPSS_DXCH_CNC_CLIENT_INGRESS_PCL_LOOKUP_0_PARALLEL_1_E CPSS_DXCH_CNC_CLIENT_INGRESS_PCL_LOOKUP_0_PARALLEL_2_E CPSS_DXCH_CNC_CLIENT_INGRESS_PCL_LOOKUP_0_PARALLEL_3_E CPSS_DXCH_CNC_CLIENT_INGRESS_PCL_LOOKUP_1_PARALLEL_0_E CPSS_DXCH_CNC_CLIENT_INGRESS_PCL_LOOKUP_1_PARALLEL_1_E CPSS_DXCH_CNC_CLIENT_INGRESS_PCL_LOOKUP_1_PARALLEL_2_E CPSS_DXCH_CNC_CLIENT_INGRESS_PCL_LOOKUP_1_PARALLEL_3_E CPSS_DXCH_CNC_CLIENT_INGRESS_PCL_LOOKUP_2_PARALLEL_0_E - N/A for Falcon CPSS_DXCH_CNC_CLIENT_INGRESS_PCL_LOOKUP_2_PARALLEL_1_E - N/A for Falcon CPSS_DXCH_CNC_CLIENT_INGRESS_PCL_LOOKUP_2_PARALLEL_2_E - N/A for Falcon CPSS_DXCH_CNC_CLIENT_INGRESS_PCL_LOOKUP_2_PARALLEL_3_E - N/A for Falcon Triggering The PCL unit is enabled for CNC by calling cpssDxChCncCountingEnableSetwith the CPSS_DXCH_CNC_COUNTING_ENABLE_UNIT_PCL_E parameter. For each PCL rule, it is possible to enable the usage of a CNC block and the index of the counter in the associated action. This is defined by CPSS_DXCH_PCL_ACTION_MATCH_COUNTER_STCand is part of CPSS_DXCH_PCL_ACTION_STCset by cpssDxChPclRuleSet. Index Information The Ingress Policy Clients pass the matchCounterIndex to the counter block. The application must ensure that the index is in the range of the block. The counter is incremented every time the rule is matched. For a detailed description of the indexing, see tables in CNC Indexing Format. Ingress VLAN Pass/Drop Client The Ingress VLAN client, defined by CPSS_DXCH_CNC_CLIENT_INGRESS_VLAN_PASS_DROP_E, is used to count the allowed Ingress traffic and dropped Ingress traffic on a per-VLAN basis. The VLAN used is the VLAN assigned after the TTI lookup. In eArch devices, the counters are used per eVLAN. Triggering Enable the client per port to count all packets with the command FORWARD, MIRROR, SOFT_DROP, or HARD_DROP. Additionally, FROM_CPU traffic can be counted by calling cpssDxChCncIngressVlanPassDropFromCpuCountEnableSet. In eArch devices, the counting is enabled per physical port. Index Information The VLAN Ingress counter index that is passed to the bound counter block(s) contains the following information: VLAN-ID assigned to the packet after the TTI lookup Drop/Pass command: 0 – Packet passes through the Ingress pipeline (at the Pre-Egress engine, the packet command is FORWARD, MIRROR, and optionally FROM_CPU) 1 – Packet is dropped by the Ingress pipeline (at the Pre-Egress engine, the packet command is HARD_DROP or SOFT_DROP) For a detailed description of the indexing, see tables in CNC Indexing Format. Egress VLAN Pass/Drop Client The Egress VLAN client, defined by CPSS_DXCH_CNC_CLIENT_EGRESS_VLAN_PASS_DROP_E, is used for counting the Egress queued traffic and Egress drop traffic separately, on a per VLAN basis. In eArch devices, the counters are used per eVLAN. The CPSS version for Falcon only counts tail-drops. On other devices, there are 3 ways to define how dropped traffic is counted: A drop-counter counts egress-filtered and tail-dropped traffic. A drop-counter counts egress-filtered traffic only. A drop-counter counts tail-drop only. These options are defined by CPSS_DXCH_CNC_EGRESS_DROP_COUNT_MODE_ENT. Egress-filtered traffic is traffic filtered due to VIDX filtering, Egress VLAN filtering, Egress spanning tree filtering, Egress source-ID filtering, Source port/trunk filtering, Trunk Multicast filtering, and so on. Tail-dropped traffic is traffic filtered due to tail drop thresholds (see Transmit Queues Manager). Triggering The Egress VLAN client is triggered by the Egress pipeline during the queuing stage. There is no need to trigger the counting in CNC globally—only per port. To set the Egress VLAN drop counting mode, call cpssDxChCncEgressVlanDropCountModeSet. Index Information The Egress VLAN Counter index that is passed to the counter block(s) contains the following information: Packets Egress VID If the packet was routed, this is the VLAN assigned by the router’s next hop entry or Multicast Linked List (MLL) entry. If the packet was bridged, this is the VLAN used by the Bridge engine. The Egress VID may still be subsequently modified by the Egress Policy engine and Egress VLAN Translation mechanism. Drop/Pass command: 0 – Packet is passed 1 – Packet is dropped For a detailed description of the indexing, see tables in CNC Indexing Format. Egress Queue Client The Egress Queue client, defined by CPSS_DXCH_CNC_CLIENT_EGRESS_QUEUE_PASS_DROP_E, is used for separately counting the Egress-queued traffic and Egress-dropped traffic on a per port/traffic-class/drop precedence basis. In Lion2 devices and in eArch devices, the   Egress Queue client is also used for counting QCN queued messages and QCN dropped messages.   These modes are defined by CPSS_DXCH_CNC_EGRESS_QUEUE_CLIENT_MODE_ENT: Tail-drop Counting Mode – Implements Egress packet pass/drop counters on a per port/traffic-class/drop-precedence basis. For Gen6 devices, there is an optional reduced Tail-Drop counting mode CPSS_DXCH_CNC_EGRESS_QUEUE_CLIENT_MODE_TAIL_DROP_REDUCED_E, which is unaware of drop precedence. Note, that indexing format is different in this mode! CN Mode (for Lion2 devices, and Gen5/Gen6 devices) – Implements CN message pass/drop counters and non-CN message pass/drop counters. The mode is set by calling cpssDxChCncEgressQueueClientModeSet. Triggering Client in Tail-Drop Counting Mode The Egress Queue client is triggered by the Egress pipeline during the queuing stage. If a counter block is bound to the Egress Queue client, a counter update is triggered for queued and tail-dropped traffic. There is no need to explicitly trigger the client. Index Information The Egress Queue client index that is passed to the counter block(s) contains the DP, TC, Port number and Pass/Drop command. For a detailed description of the indexing, see tables in CNC Indexing Format.  In Lion2, a specific counter associated with the Egress port and queue is not counted only in the related Egress port group.<To keep the wire speed there is an arbiter that selects a port group in the relevant hemisphere and the counter in the appropriate index is incremented. for example, 4 packets from same flow will be counted in 4 port groups> Therefore, the user must: Ensure that the TxQ client has an associated CNC block in all port groups. Get the correct value of the packets by summarizing the relevant counters in 4 port groups. To do so, there are 2 options. One is to loop through the relevant port groups, read the counter by calling cpssDxChCncPortGroupCounterGet and summarize the values. The second option is to call cpssDxChCncPortGroupCounterGet with portGroupsBmp = 0x0F if the port is associated with port group 0-3, or with value of 0xF0 if the port is associated with port group 4-7. Code Example The following two functions show an example of setting and reading the Egress Queue counters: /* samplePort is the port used in SetTCCounters, it identifies what index range is mapped into the block, since each range is for set of 64 ports Use like GetTCCounters 0,1 */ GT_STATUS GetTCCounters(GT_U32 startBlock, GT_U32 samplePort) { CPSS_DXCH_CNC_COUNTER_STC tcCount; GT_STATUS rc; GT_U16 i, offset, blockSize; GT_U16 dp, tc, tc_swap, port, port_swap, dropped; if(PRV_CPSS_DXCH_PP_HW_INFO_E_ARCH_SUPPORTED_MAC(0) == GT_TRUE) blockSize = 1024; else blockSize = 2048; for(i=0; i< blockSize;i++) { rc = cpssDxChCncCounterGet(0, startBlock, i, CPSS_DXCH_CNC_COUNTER_FORMAT_MODE_0_E, &tcCount); if( GT_OK != rc) return rc; if(tcCount.packetCount.l[0] != 0) { if(PRV_CPSS_DXCH_PP_HW_INFO_E_ARCH_SUPPORTED_MAC(0) == GT_TRUE) { offset = samplePort/32; port = (i>>5) & 0x00ff + offset*64; tc = (i>>2) & 0x0007; dp = i & 0x0003; osPrintf("counter %d: port %d queue %d dp level %d ",i, port+offset*32, tc, dp); osPrintf("%d packets PASSED %u bytes\n",tcCount.packetCount.l[0], tcCount.byteCount.l[0] ); } else /* for AC3 */ { offset = samplePort/64; /* not sure ... */ dp = i & 0x0003;; tc = (i>>2) & 0x0007; port = (i>>5) & 0x001f; dropped = (i>>10) & 0x0001; osPrintf("counter %d: on port %d on queue %d dp level %d\n ",i, port+offset*64, tc, dp); if(dropped) osPrintf("%d packets DROPPED %u bytes\n",tcCount.packetCount, tcCount.byteCount.l[0] ); else osPrintf("%d packets PASSED %u bytes\n",tcCount.packetCount, tcCount.byteCount.l[0] ); } } rc = cpssDxChCncCounterGet(0, startBlock+1, i, CPSS_DXCH_CNC_COUNTER_FORMAT_MODE_0_E, &tcCount); if( GT_OK != rc) return rc; if(tcCount.packetCount.l[0] != 0) { if(PRV_CPSS_DXCH_PP_HW_INFO_E_ARCH_SUPPORTED_MAC(0) == GT_TRUE) { offset = samplePort/32; port = (i>>5) & 0x00ff + offset*64; tc = (i>>2) & 0x0007; dp = i & 0x0003; osPrintf("counter %d: port %d queue %d dp level %d ",i, port+offset*32, tc, dp); osPrintf("%d packets DROPPED %u bytes\n",tcCount.packetCount.l[0], tcCount.byteCount.l[0] ); } } } return rc; } /* use like SetTCCounters 0,1 */ GT_STATUS SetTCCounters(GT_U32 startBlock, GT_U32 port) { GT_STATUS rc = GT_OK; GT_U16 i,r; GT_U64 indexRangesBmp; rc = cpssDxChCncBlockClientEnableSet(0,startBlock, CPSS_DXCH_CNC_CLIENT_EGRESS_QUEUE_PASS_DROP_E,GT_TRUE); if( GT_OK != rc) return rc; rc = cpssDxChCncBlockClientEnableSet(0,startBlock+1, CPSS_DXCH_CNC_CLIENT_EGRESS_QUEUE_PASS_DROP_E,GT_TRUE); if( GT_OK != rc) return rc; /* in BC2 every range covers 32 ports, so 256 ports or 8 ranges are supported */ r = port << 5; r = r/1024; r = port/32; indexRangesBmp.l[0] = 1 << r; indexRangesBmp.l[1] = 0; osPrintf("pass range is %d\n", indexRangesBmp.l[0]); rc = cpssDxChCncBlockClientRangesSet(0,startBlock, CPSS_DXCH_CNC_CLIENT_EGRESS_QUEUE_PASS_DROP_E, indexRangesBmp); if( GT_OK != rc) return rc; indexRangesBmp.l[0] = 1 << (r+8); indexRangesBmp.l[1] = 0; osPrintf("drop range is %d\n", indexRangesBmp.l[0]); rc = cpssDxChCncBlockClientRangesSet(0,startBlock+1, CPSS_DXCH_CNC_CLIENT_EGRESS_QUEUE_PASS_DROP_E, indexRangesBmp); if( GT_OK != rc) return rc; return rc; }   Egress Policy Client The Egress Policy client, defined by CPSS_DXCH_CNC_CLIENT_EGRESS_PCL_E, is used for counting traffic on a per Egress rule basis. In eArch devices, the EPCL has parallel quad sub-lookups defined as: CPSS_DXCH_CNC_CLIENT_EGRESS_PCL_PARALLEL_0_E CPSS_DXCH_CNC_CLIENT_EGRESS_PCL_PARALLEL_1_E CPSS_DXCH_CNC_CLIENT_EGRESS_PCL_PARALLEL_2_E CPSS_DXCH_CNC_CLIENT_EGRESS_PCL_PARALLEL_3_E Each sub-lookup can be set as a client. Triggering The Egress PCL client is enabled by calling cpssDxChCncCountingEnableSetwith the CPSS_DXCH_CNC_COUNTING_ENABLE_UNIT_PCL_E parameter. A counter update is triggered if the Egress Policy TCAM lookup results in a match. See the matchCounter member of the CPSS_DXCH_PCL_ACTION_STC data type for the counter enable flag and the counter block index. Index Information The Egress Policy client index that is passed to the counter block(s) contains the <CounterIndex> field extracted from the Egress Policy Action Table. This field is a pointer to one of the 32 policy rule match counters. The counter is incremented for every packet matching this rule. For a detailed description of the indexing, see tables in CNC Indexing Format.    ARP Table Client This section is relevant for: a xCat3 / AlleyCat5 a Lion2 devices a Gen5 devices and above The ARP Table client, defined by CPSS_DXCH_CNC_CLIENT_ARP_TABLE_ACCESS_E, is used for counting routed traffic on per next hop MAC address. Triggering The ARP Table client is globally enabled if one or more blocks of CNC are bound to it. Index Information The ARP Table client index for the centralized counter block(s) is the index used to access the ARP Table (the ARP Pointer), which is assigned by the Router next hop entry. This section is relevant for Gen5 devices and above In the above devices, the ARP pointer is also used as the NAT Table Client index to the centralized counter block(s). Since the ARP pointer and NAT pointer are multiplexed on the same client, an offset is added to point to the NAT index so that the NAT index equals to the ARP/NAT pointer plus the offset. The offset is a global configuration and is configured using cpssDxChCncOffsetForNatClientSet. For a detailed description of the indexing, see tables in CNC Indexing Format. Tunnel-Start Client This section is relevant for: a xCat3 / AlleyCat5 a Lion2 devices a Gen5 devices and above The Tunnel-Start client, defined by CPSS_DXCH_CNC_CLIENT_TUNNEL_START_E, can be used for counting traffic that egressed on a tunnel-start interface. Triggering The Tunnel-Start client is globally enabled if one or more blocks of CNC are bound to it. Index Information The index used to access the Tunnel-start Table (aka the Tunnel Pointer) is used as the Tunnel-start Table client index for the centralized counter block(s). For a detailed description of the indexing, see tables in CNC Indexing Format. Tunnel Termination Interface (TTI) Client This section is relevant for: a xCat3 / AlleyCat5 a Lion2 Devices a Gen5 devices and above The Tunnel Termination Interface engine, defined by CPSS_DXCH_CNC_CLIENT_TTI_E, supports one lookup. Gen5 devices and above introduce a mechanism enabling 2 parallel lookups defined by CPSS_DXCH_CNC_CLIENT_TTI_PARALLEL_0_EandCPSS_DXCH_CNC_CLIENT_TTI_PARALLEL_1_E which can be bound to a different block of counters. Bobcat3 and higher devices implement two additional CNC clients: CPSS_DXCH_CNC_CLIENT_TTI_PARALLEL_2_E and CPSS_DXCH_CNC_CLIENT_TTI_PARALLEL_3_E These are used in TTI TCAM parallel lookups 2 and 3 respectively. Triggering CNC is enabled for this client by calling cpssDxChCncCountingEnableSet with the CPSS_DXCH_CNC_COUNTING_ENABLE_TTI_UNIT_E parameter. Every hit on the TTI rule will increment the relevant counter. Bobcat3 and higher devices implement two additional CNC clients for use with TTI TCAM parallel lookups 2 and 3 respectively: CPSS_DXCH_CNC_CLIENT_TTI_PARALLEL_2_E CPSS_DXCH_CNC_CLIENT_TTI_PARALLEL_3_E Index Information The TTI Client specifies the counter index in the TTI Action entry. For a detailed description of the indexing, see tables in CNC Indexing Format. Ingress Source ePort Client This section is relevant for Gen5 devices and above The Ingress source ePort client, defined by CPSS_DXCH_CNC_CLIENT_INGRESS_SRC_EPORT_E, is used to count packets and bytes per Ingress source ePort. The used ePort is the one that was assigned after all IPCL lookups. Triggering The Ingress source ePort client is globally enabled if one or more blocks of CNC are bound to it. Index Information The Ingress source ePort Client is indexed by the ePort. For a detailed description of the indexing, see tables in CNC Indexing Format. Egress Target ePort Client This section is relevant for Gen5 devices and above The Egress Target ePort client, defined by CPSS_DXCH_CNC_CLIENT_EGRESS_TRG_EPORT_E, is used to count packets and bytes per Egress target ePort. The target ePort is the destination ePort assigned by one of the forwarding engines. Note that it must be an individual local ePort. If forwarding is destined to a Multicast group, the ports composing the group will not be included in the counting. Triggering The Egress target ePort client is globally enabled if one or more blocks of CNC are bound to it. Index Information The Egress Target ePort Client is indexed by the ePort assigned by the tunnel start entry. For a detailed description of the indexing, see tables in CNC Indexing Format. Packet Type Pass/Drop Client This section is relevant for Gen5 devices and above The Packet Type Pass/Drop client, defined by CPSS_DXCH_CNC_CLIENT_PACKET_TYPE_PASS_DROP_E, is used to count packets and bytes in the Pre-egress unit after all the replications, with the TO_CPU command. There are 2 sub-classifications of the packet type defined by CPSS_DXCH_CNC_PACKET_TYPE_PASS_DROP_TO_CPU_MODE_ENT. One is based on the physical port and the other one is set by the CPU CODE. Setting one of these modes is done by calling cpssDxChCncPacketTypePassDropToCpuModeSet. Triggering The Packet Type Pass/Drop client is globally enabled if one or more blocks of CNC are bound to it. Index Information The Packet Type Pass/Drop Client has 2 different indexing modes. For a detailed description of the indexing, see tables in CNC Indexing Format. Traffic Manager (TM) Pass/Drop Client This section is relevant for Gen5 devices and above The TM Pass/Drop client, defined by CPSS_DXCH_CNC_CLIENT_TM_PASS_DROP_E, is used to count packets processed by the TM. Note that the TM itself does not drop packets. The PP queries the TM before sending a packet to it. Upon the TM response, the counters are incremented. For more information on the TM architecture, see Traffic Manager (TM). An example of using TM CNC counters is found in the cpssEnabler directory - look for configTMQCounters() and getTMQCounters(). Triggering The TM client is globally enabled if one or more blocks of the CNC are bound to it. Index Information The TM Pass/Drop client has 4 different indexing modes defined by CPSS_DXCH_CNC_TM_INDEX_MODE_ENT. To set the required mode, call cpssDxChCncTmClientIndexModeSet. For details on the indexing format, see tables in CNC Indexing Format.根据以上内容 因转发异常丢弃的报文。即由于芯片表项缺失、芯片表项下发错误、报文检查错误等异常场景导致的丢包。 因转发正常丢弃的报文。即丢包是可以预测的,比如下发了端口隔离需要丢掉两个端口之间的报文、配置了惩罚动作产生的丢包如MAC漂移联动流量抑制导致的丢包、端口配置了水平分割导致的丢包等。 因缓存满丢弃的报文。即超过了端口或队列的buffer缓存,导致丢包。 因ACL DENY丢弃的报文。即下发了匹配某些条件的ACL DENY规则产生的丢包。 这四种丢包如何进行统计
09-30
根据您提供的完整文档内容,结合 **Centralized Counters (CNC)** 模块在 Gen5 及以上设备中的能力,以下是对四种丢包类型的**精确统计方法**,均基于官方支持的 CNC 客户端、触发机制和索引格式。 --- ### ✅ 1. **因转发异常丢弃的报文** > 包括:芯片表项缺失、表项下发错误、报文检查错误(如 CRC、长度异常等)导致的不可预期丢包。 #### 🔹 推荐客户端: - `CPSS_DXCH_CNC_CLIENT_RX_DMA_ERROR_E` - `CPSS_DXCH_CNC_CLIENT_TXQ_BAD_PACKET_E` #### 📌 实现方式: - 使用 `RX_DMA_ERROR` 客户端可捕获入向报文因硬件校验失败(CRC、oversize、undersize、alignment error)或缓冲区问题被丢弃的情况。 - 若涉及出向队列发现非法结构(如 TTL=0 后仍尝试转发),可用 `TXQ_BAD_PACKET` 客户端。 ```c // 启用 RX DMA Error 客户端计数 cpssDxChCncCountingEnableSet(dev, blockNum, CPSS_DXCH_CNC_COUNTING_ENABLE_RX_DMA_ERROR_E, GT_TRUE); // 绑定 CNC 块到该客户端 cpssDxChCncBlockClientSet(dev, blockNum, CPSS_DXCH_CNC_CLIENT_RX_DMA_ERROR_E); ``` #### 🧩 索引信息: - 索引由物理端口 + 错误类型构成(详见《CNC Indexing Format》表格)。 - 可区分不同端口上发生的各类“异常”丢包。 #### ✅ 适用场景: - 表项未命中 → 被标记为“未知目标”并最终由 DMA 或桥接引擎丢弃。 - 报文损坏 → 直接由 RX DMA 检测到并丢弃。 --- ### ✅ 2. **因转发正常丢弃的报文** > 如端口隔离、MAC 漂移抑制、水平分割等策略性、可预测的丢包。 #### 🔹 推荐客户端: - `CPSS_DXCH_CNC_CLIENT_INGRESS_PCL_LOOKUP_0_E` (或其他 IPCL 子查找) - 或使用 `CPSS_DXCH_CNC_CLIENT_INGRESS_VLAN_PASS_DROP_E` #### 📌 实现方式: ##### 方式一:通过 **Ingress PCL Match Counter** - 在配置 ACL 规则时,在 `CPSS_DXCH_PCL_ACTION_STC` 中启用 `matchCounter.enable = GT_TRUE`,并指定唯一 index。 - 所有匹配此规则且执行 DROP 的报文都会递增对应 CNC 计数器。 ```c action.pktCmd = CPSS_PACKET_CMD_DROP_E; action.matchCounter.enable = GT_TRUE; action.matchCounter.index = your_counter_index; // 映射到某个CNC块 ``` 然后绑定 CNC 块到 PCL 客户端: ```c cpssDxChCncBlockClientSet(dev, blockNum, CPSS_DXCH_CNC_CLIENT_INGRESS_PCL_LOOKUP_0_E); cpssDxChCncCountingEnableSet(dev, blockNum, CPSS_DXCH_CNC_COUNTING_ENABLE_UNIT_PCL_E, GT_TRUE); ``` ✅ 支持细粒度统计:每条规则独立计数。 ##### 方式二:通过 **Ingress VLAN Pass/Drop Client** - 使用 `CPSS_DXCH_CNC_CLIENT_INGRESS_VLAN_PASS_DROP_E` - 可按 VLAN 统计“通过”与“丢弃”的流量。 - “Drop”包括 SOFT_DROP 和 HARD_DROP,适用于端口隔离、STP blocking、源端口过滤等。 ```c cpssDxChCncBlockClientSet(dev, blockNum, CPSS_DXCH_CNC_CLIENT_INGRESS_VLAN_PASS_DROP_E); ``` 📌 索引包含: - VLAN-ID(TTI 后分配) - Drop/Pass 标志(0=pass, 1=drop) --- ### ✅ 3. **因缓存满丢弃的报文** > 即超过端口或队列 buffer 缓存容量导致的 Tail-drop 类型拥塞丢包。 #### 🔹 推荐客户端: - `CPSS_DXCH_CNC_CLIENT_EGRESS_QUEUE_PASS_DROP_E`(用于标准设备) - `CPSS_DXCH_CNC_CLIENT_TM_PASS_DROP_E`(用于 TM 架构设备,如 Bobcat3/Falcon) #### 📌 实现方式: ##### 对于非 TM 设备(如 Lion2、eArch): 使用 **Egress Queue Pass/Drop Client** ```c cpssDxChCncEgressQueueClientModeSet(dev, CPSS_DXCH_CNC_EGRESS_QUEUE_CLIENT_MODE_TAIL_DROP_E); cpssDxChCncBlockClientSet(dev, blockNum, CPSS_DXCH_CNC_CLIENT_EGRESS_QUEUE_PASS_DROP_E); ``` 📌 索引信息: - Port + TC(Traffic Class)+ DP(Drop Precedence)+ Pass/Drop - 可精确监控每个端口队列的 tail-drop 事件。 ⚠️ 注意:Lion2 设备需汇总多个 port group 的计数器以获取真实值。 ##### 对于 TM 设备(Falcon、Gen6): 使用 **TM Pass/Drop Client** ```c cpssDxChCncTmClientIndexModeSet(dev, CPSS_DXCH_CNC_TM_INDEX_MODE_PORT_TC_E); cpssDxChCncBlockClientSet(dev, blockNum, CPSS_DXCH_CNC_CLIENT_TM_PASS_DROP_E); ``` - TM 不直接丢包,但 PP 根据 TM 返回结果决定是否发送 → 触发 drop 计数。 - 支持多种索引模式(queue/port/tc 等)。 --- ### ✅ 4. **因 ACL DENY 丢弃的报文** > 明确由于 ACL 规则中配置了 DENY/DROP 动作而导致的丢包。 #### 🔹 推荐客户端: - `CPSS_DXCH_CNC_CLIENT_INGRESS_PCL_LOOKUP_0_E`(最常用) - 支持多级 lookup 和 parallel sub-lookups #### 📌 实现方式: 与第 2 类中的“策略丢包”相同,核心是 **启用 matchCounter**。 ```c // 配置一条 ACL 规则,动作是 DENY 并启用计数 cpssDxChPclRuleSet( dev, stage, ruleIndex, &pattern, &mask, &action // action.matchCounter.enable = GT_TRUE ); ``` - 每当报文匹配该 ACL 规则并执行 DROP,对应的 CNC counter 自动递增。 - 多个 ACL 规则可映射到不同 counter index,实现分类统计。 📌 示例应用场景: - 安全 ACL 过滤攻击报文 → 单独计数 - QoS 限速后超限丢包 → 关联 Policer + matchCounter - 用户自定义规则 DENY → 全部纳入 CNC 统计 --- ### ✅ 四类丢包统计方案总结表 | 丢包类型 | 推荐 CNC 客户端 | 触发条件 | 索引维度 | |--------|------------------|----------|---------| | 转发异常丢包 | `RX_DMA_ERROR`, `TXQ_BAD_PACKET` | 报文格式错误、CRC、表项缺失 | Port + Error Type | | 转发正常策略丢包 | `INGRESS_PCL_LOOKUP_x`, `INGRESS_VLAN_PASS_DROP` | PCL 规则 DROP / VLAN 过滤 | Rule Index 或 VLAN + Drop Flag | | 缓存满丢包(Tail-drop) | `EGRESS_QUEUE_PASS_DROP`, `TM_PASS_DROP` | 队列满、buffer 耗尽 | Port + TC + DP + Drop Flag | | ACL DENY 丢包 | `INGRESS_PCL_LOOKUP_0_E` 等 | 匹配 DENY 规则 | matchCounter.index | --- ### ✅ 配置流程建议 1. **规划 CNC Block 分配**:为四类丢包分配独立 block(如 block 0~7)。 2. **绑定客户端**:调用 `cpssDxChCncBlockClientSet()` 将 block 与目标 client 绑定。 3. **启用计数单元**:对 PCL、TTI、RX_DMA 等调用 `cpssDxChCncCountingEnableSet()`。 4. **设置索引模式**:如 TM 或 Egress Queue 需调用专用 API 设置 mode。 5. **规则侧配置**:ACL/TTL 规则中必须启用 `matchCounter` 才能触发 CNC。 6. **定期读取**:使用 `cpssDxChCncCounterGet()` 获取数据进行分析。 ---
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值