[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6315c8d7-c140-427e-b4b1-ce5bbe1e536e@intel.com>
Date: Fri, 17 Jan 2025 12:36:31 +0100
From: Przemek Kitszel <przemyslaw.kitszel@...el.com>
To: Petr Machata <petrm@...dia.com>, Amit Cohen <amcohen@...dia.com>
CC: Richard Cochran <richardcochran@...il.com>, Ido Schimmel
<idosch@...dia.com>, <mlxsw@...dia.com>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Andrew Lunn
<andrew+netdev@...n.ch>, <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 4/5] mlxsw: Move Tx header handling to PCI driver
On 1/16/25 17:38, Petr Machata wrote:
> From: Amit Cohen <amcohen@...dia.com>
Two nits, not worth a respin, perhaps you could address given any future
change around this will come.
(but still please educate me and reply to the last question).
> +static int mlxsw_pci_txhdr_construct(struct sk_buff *skb,
> + const struct mlxsw_txhdr_info *txhdr_info)
> +{
> + const struct mlxsw_tx_info tx_info = txhdr_info->tx_info;
> + char *txhdr;
I know that this is was just code moved, but u8* would fit better as a
type.
> +
> + if (skb_cow_head(skb, MLXSW_TXHDR_LEN))
> + return -ENOMEM;
> +
> + txhdr = skb_push(skb, MLXSW_TXHDR_LEN);
> + memset(txhdr, 0, MLXSW_TXHDR_LEN);
> +
> + mlxsw_tx_hdr_version_set(txhdr, MLXSW_TXHDR_VERSION_1);
> + mlxsw_tx_hdr_proto_set(txhdr, MLXSW_TXHDR_PROTO_ETH);
> + mlxsw_tx_hdr_swid_set(txhdr, 0);
> +
> + if (unlikely(txhdr_info->data)) {
> + u16 fid = txhdr_info->max_fid + tx_info.local_port - 1;
Again copy-pasta, but would be good to explain why -1.
Powered by blists - more mailing lists