lkml.org 
[lkml]   [2024]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH net-next v4 09/12] net: ethernet: oa_tc6: implement receive path to receive rx ethernet frames
Date
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
>

\
 
 \ /
  Last update: 2024-04-29 10:32    [W:0.348 / U:2.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site