[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b82a3006-05cb-43a3-bbe1-4f2f81113bab@microchip.com>
Date: Mon, 29 Apr 2024 08:32:31 +0000
From: <Parthiban.Veerasooran@...rochip.com>
To: <ramon.nordin.rodriguez@...roamp.se>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>, <horms@...nel.org>, <saeedm@...dia.com>,
<anthony.l.nguyen@...el.com>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <andrew@...n.ch>, <corbet@....net>,
<linux-doc@...r.kernel.org>, <robh+dt@...nel.org>,
<krzysztof.kozlowski+dt@...aro.org>, <conor+dt@...nel.org>,
<devicetree@...r.kernel.org>, <Horatiu.Vultur@...rochip.com>,
<ruanjinjie@...wei.com>, <Steen.Hegelund@...rochip.com>,
<vladimir.oltean@....com>, <UNGLinuxDriver@...rochip.com>,
<Thorsten.Kummermehr@...rochip.com>, <Pier.Beruto@...emi.com>,
<Selvamani.Rajagopal@...emi.com>, <Nicolas.Ferre@...rochip.com>,
<benjamin.bigler@...nformulastudent.ch>
Subject: Re: [PATCH net-next v4 09/12] net: ethernet: oa_tc6: implement
receive path to receive rx ethernet frames
Hi Ramon,
On 28/04/24 1:32 am, Ramón Nordin Rodriguez wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> Could xfer.rx_buf for the data path point to the currently allocacted socket buff
> struct spi_transfer xfer = { 0 };
> struct spi_message msg;
>
> if (header_type == OA_TC6_DATA_HEADER) {
> xfer.tx_buf = tc6->spi_data_tx_buf;
> xfer.rx_buf = tc6->spi_data_rx_buf;
> } else {
> xfer.tx_buf = tc6->spi_ctrl_tx_buf;
> xfer.rx_buf = tc6->spi_ctrl_rx_buf;
> }
> xfer.len = length;
>
> To avoid an additional copy here?
I think, this can be done later as part of optimization/improvements.
Let's keep it simple and optimize it later.
Best regards,
Parthiban V
>
>> +static void oa_tc6_update_rx_skb(struct oa_tc6 *tc6, u8 *payload, u8 length)
>> +{
>> + memcpy(skb_put(tc6->rx_skb, length), payload, length);
>> +}
>>
>
> R
>
Powered by blists - more mailing lists