如《Gigabit Ethernet (GbE) Switch Subsystem.pdf》2.3.2.2.2节所示MAC modue会计算一个4字节的CRC校验值加在QMSS queue发送的buffer的后面。
我们项目中不需要MAC module给buffer内容后加CRC校验值。但是根据2.3.2.2.2和2.3.1.3设置descriptor的protocol specific flags的第19bit为1后packet就不能发送到SGMLL port2了(未设置前是可以的)。
请帮忙看下是否有没考虑到的地方?多谢!
以下是从《Gigabit Ethernet (GbE) Switch Subsystem.pdf》截取的两个相关内容:
2.3.2.2.2 CRC Insertion
This section describes the procedure for inserting CRC checksums into Ethernet
frames. The MAC module can generate and append a 32-bit Ethernet CRC onto
transmitted data. By default, the MAC module generates and appends a CRC. If the
user does not want the MAC module to generate a CRC, bit 19 of the protocol specific
flags region of the descriptor must be set before transmitting the packet via the packet
DMA to the NETCP.If bit 19 of the protocol specific flags is set in the descriptor, the
last four bytes of the TX data are transmitted as the frame CRC. The four CRC data
bytes should be the last four bytes of the frame and should be included in the packet
byte count value. The MAC performs no error checking on the outgoing CRC when
bit 19 of the protocol specific flags field is set in the descriptor.
2.3.1.3 Receive Streaming Packet Interface
The receive streaming interface on port 0 of the GbE switch is responsible for receiving
packets from the packet streaming switch in the NETCP. The GbE switch has one
receive streaming packet interface for port 0. The CPPI receive port is equivalent to a
MAC port with the difference being that the data is provided to the GbE switch in the
streaming interface data format instead of 8-bit GMII data format.
In addition to the packet data, the receive streaming interface can also provide
additional control information that resides the PS_FLAGS field of the descriptor of the
packet that was transmitted to the GbE switch.
For packets being transmitted to the GbE, the PS_FLAGS field has the following
configuration:
Setting the RX_PASS_CRC bit indicates that the CRC is passed with the packet data.
The packet is a directed packet when any of the TO_PORT bits are nonzero. The packet
will be sent to the port indicated.
Andy Yin1:
ps_flag2-0 TO_PORT需要同时配置为2指定为direct packet,试试吧。
weiqiang li:
回复 Andy Yin1:
多谢!
不过之前我的测试中ps_flag2-0 TO_PORT已经设置成2了,不设置我帖子中所说的第19bit时是可以通过SGMLL2正常收发的,设置了第19bit后发送不到SGMLL2了。
请帮忙看看有没有其它没考虑到的地方?
Andy Yin1:
回复 weiqiang li:
发布到Port2是有什么具体的现象么?
建议看一下发送包对应的描述符有没有回收到Tx ReturnQ,如果没有回收的话可能是发送包的描述符配置有问题。