[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 2 Feb 2023 22:32:36 +0800
From: "mengyuanlou@...-swift.com" <mengyuanlou@...-swift.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, Jiawen Wu <jiawenwu@...stnetic.com>,
张宇弘 <yuhongzhang@...-swift.com>,
张玲玲 <linglingzhang@...-swift.com>
Subject: Re: [PATCH net-next v2 05/10] net: libwx: Allocate Rx and Tx
resources
Our device is a different design from Intel’s product. The protocol of receive/transmit queue between driver and ASIC is similar to Intel 82599. If you are familiar with Intel design, the knowledge could save you a lot of time to understand the operation flows. For example, the receive/transmit descriptors are submitted to the queues. ASIC fetches the descriptors from host memory and processes them. Done bit is set to the writeback descriptor in the same queue. But there are many differences in receive/transmit descriptor definition and register implementation. These differences may need your attention. For example, we have packet type field defined in receive/transmit descriptor. Driver uses the info to get ASIC parse result and deliver host info to ASIC. And comparing with 82599, we have a few different features such as QCN, qinq, vxlan and etc.
> 2023年2月2日 13:51,Jakub Kicinski <kuba@...nel.org> 写道:
>
> On Tue, 31 Jan 2023 18:05:36 +0800 Mengyuan Lou wrote:
>> +/* Transmit Descriptor */
>> +union wx_tx_desc {
>> + struct {
>> + __le64 buffer_addr; /* Address of descriptor's data buf */
>> + __le32 cmd_type_len;
>> + __le32 olinfo_status;
>> + } read;
>> + struct {
>> + __le64 rsvd; /* Reserved */
>> + __le32 nxtseq_seed;
>> + __le32 status;
>> + } wb;
>> +};
>> +
>> +/* Receive Descriptor */
>> +union wx_rx_desc {
>> + struct {
>> + __le64 pkt_addr; /* Packet buffer address */
>> + __le64 hdr_addr; /* Header buffer address */
>> + } read;
>> + struct {
>> + struct {
>> + union {
>> + __le32 data;
>> + struct {
>> + __le16 pkt_info; /* RSS, Pkt type */
>> + __le16 hdr_info; /* Splithdr, hdrlen */
>> + } hs_rss;
>> + } lo_dword;
>> + union {
>> + __le32 rss; /* RSS Hash */
>> + struct {
>> + __le16 ip_id; /* IP id */
>> + __le16 csum; /* Packet Checksum */
>> + } csum_ip;
>> + } hi_dword;
>> + } lower;
>> + struct {
>> + __le32 status_error; /* ext status/error */
>> + __le16 length; /* Packet length */
>> + __le16 vlan; /* VLAN tag */
>> + } upper;
>> + } wb; /* writeback */
>> +};
>
> How close of a copy of Intel Niantic is your device?
>
Powered by blists - more mailing lists