[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240506185129.7c904763@kernel.org>
Date: Mon, 6 May 2024 18:51:29 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: FUJITA Tomonori <fujita.tomonori@...il.com>
Cc: netdev@...r.kernel.org, andrew@...n.ch, jiri@...nulli.us,
 horms@...nel.org
Subject: Re: [PATCH net-next v4 3/6] net: tn40xx: add basic Tx handling
On Thu,  2 May 2024 08:05:49 +0900 FUJITA Tomonori wrote:
> +	err = tn40_tx_map_skb(priv, skb, txdd, &pkt_len);
> +	if (err) {
> +		dev_kfree_skb(skb);
> +		return NETDEV_TX_OK;
make sure you always count drops
> +	.ndo_get_stats = tn40_get_stats,
ndo_get_stats64 is the standard these days
> +struct tn40_txd_desc {
> +	__le32 txd_val1;
> +	__le16 mss;
> +	__le16 length;
> +	__le32 va_lo;
> +	__le32 va_hi;
> +	struct tn40_pbl pbl[]; /* Fragments */
> +} __packed;
> +
> +struct tn40_txf_desc {
> +	u32 status;
> +	u32 va_lo; /* VAdr[31:0] */
> +	u32 va_hi; /* VAdr[63:32] */
> +	u32 pad;
> +} __packed;
Can these be unaligned? There doesn't seem to be any holes in these
struct, it's not necessary to pack them unless you want them to be
unaligned.
Powered by blists - more mailing lists
 
