All of lore.kernel.org
 help / color / mirror / Atom feed
From: "mengyuanlou@net-swift.com" <mengyuanlou@net-swift.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, "Jiawen Wu" <jiawenwu@trustnetic.com>,
	张宇弘 <yuhongzhang@net-swift.com>,
	张玲玲 <linglingzhang@net-swift.com>
Subject: Re: [PATCH net-next v2 05/10] net: libwx: Allocate Rx and Tx resources
Date: Thu, 2 Feb 2023 22:32:36 +0800	[thread overview]
Message-ID: <1752DEC1-E8DC-4BA5-A422-3D53DAF48993@net-swift.com> (raw)
In-Reply-To: <20230201215112.37a72893@kernel.org>

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@kernel.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?
> 


  reply	other threads:[~2023-02-02 14:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-31 10:05 [PATCH net-next v2 00/10] Wangxun interrupt and RxTx support Mengyuan Lou
2023-01-31 10:05 ` [PATCH net-next v2 01/10] net: libwx: Add irq flow functions Mengyuan Lou
2023-02-02  5:39   ` Jakub Kicinski
2023-02-02  5:45   ` Jakub Kicinski
2023-01-31 10:05 ` [PATCH net-next v2 02/10] net: ngbe: Add irqs request flow Mengyuan Lou
2023-01-31 10:05 ` [PATCH net-next v2 03/10] net: txgbe: Add interrupt support Mengyuan Lou
2023-01-31 10:05 ` [PATCH net-next v2 04/10] net: libwx: Configure Rx and Tx unit on hardware Mengyuan Lou
2023-01-31 10:05 ` [PATCH net-next v2 05/10] net: libwx: Allocate Rx and Tx resources Mengyuan Lou
2023-02-02  5:51   ` Jakub Kicinski
2023-02-02 14:32     ` mengyuanlou [this message]
2023-01-31 10:05 ` [PATCH net-next v2 06/10] net: txgbe: Setup Rx and Tx ring Mengyuan Lou
2023-01-31 10:05 ` [PATCH net-next v2 07/10] net: libwx: Support to receive packets in NAPI Mengyuan Lou
2023-01-31 10:05 ` [PATCH net-next v2 08/10] net: libwx: Add tx path to process packets Mengyuan Lou
2023-01-31 10:05 ` [PATCH net-next v2 09/10] net: txgbe: Support Rx and Tx process path Mengyuan Lou
2023-01-31 10:05 ` [PATCH net-next v2 10/10] net: ngbe: " Mengyuan Lou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1752DEC1-E8DC-4BA5-A422-3D53DAF48993@net-swift.com \
    --to=mengyuanlou@net-swift.com \
    --cc=jiawenwu@trustnetic.com \
    --cc=kuba@kernel.org \
    --cc=linglingzhang@net-swift.com \
    --cc=netdev@vger.kernel.org \
    --cc=yuhongzhang@net-swift.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.