From: Adam Young <admiyo@amperemail.onmicrosoft.com>
To: Joe Damato <jdamato@fastly.com>,
admiyo@os.amperecomputing.com,
Jeremy Kerr <jk@codeconstruct.com.au>,
Matt Johnston <matt@codeconstruct.com.au>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Sudeep Holla <sudeep.holla@arm.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Huisong Li <lihuisong@huawei.com>
Subject: Re: [PATCH v8 2/2] mctp pcc: Implement MCTP over PCC Transport
Date: Fri, 22 Nov 2024 12:35:52 -0500 [thread overview]
Message-ID: <f3767d37-237e-4706-8965-b7e3255833b6@amperemail.onmicrosoft.com> (raw)
In-Reply-To: <Zz-AvBwUgNzMJb7-@LQ3V64L9R2>
On 11/21/24 13:49, Joe Damato wrote:
>> +static void mctp_pcc_client_rx_callback(struct mbox_client *c, void *buffer)
>> +{
>> + struct mctp_pcc_ndev *mctp_pcc_dev;
>> + struct mctp_pcc_hdr mctp_pcc_hdr;
>> + struct mctp_skb_cb *cb;
>> + struct sk_buff *skb;
>> + void *skb_buf;
>> + u32 data_len;
>> +
>> + mctp_pcc_dev = container_of(c, struct mctp_pcc_ndev, inbox.client);
>> + memcpy_fromio(&mctp_pcc_hdr, mctp_pcc_dev->inbox.chan->shmem,
>> + sizeof(struct mctp_pcc_hdr));
>> + data_len = mctp_pcc_hdr.length + MCTP_HEADER_LENGTH;
>> +
>> + if (data_len > mctp_pcc_dev->mdev.dev->mtu) {
>> + mctp_pcc_dev->mdev.dev->stats.rx_dropped++;
> I'm not an expert on rtnl stats, but maybe this should be
> accounted for as rx_length_errors ?
>
> And when rx_dropped is accounted in the stats callback it can add
> rx_length_errors in as well as setting rtnl_link_stats64's
> rx_length_errors?
>
> You've probably read this already, but just in case:
>
> https://docs.kernel.org/networking/statistics.html#struct-rtnl-link-stats64
Thanks for the review Joe. I think this is a good question, and might
be sufficient justification for me to get that help on the stats helper
functions that Jeremy offered in the last version. I suspect that I am
doing way too much one-off work in copying the stats from the driver
and should instead be making use of the helpers.
next prev parent reply other threads:[~2024-11-22 17:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-20 19:02 [PATCH v8 0/2] MCTP Over PCC Transport admiyo
2024-11-20 19:02 ` [PATCH v8 1/2] pcc: Check before sending MCTP PCC response ACK admiyo
2024-11-20 19:02 ` [PATCH v8 2/2] mctp pcc: Implement MCTP over PCC Transport admiyo
2024-11-21 18:49 ` Joe Damato
2024-11-22 17:35 ` Adam Young [this message]
2024-12-16 22:29 ` Adam Young
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=f3767d37-237e-4706-8965-b7e3255833b6@amperemail.onmicrosoft.com \
--to=admiyo@amperemail.onmicrosoft.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=admiyo@os.amperecomputing.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jdamato@fastly.com \
--cc=jk@codeconstruct.com.au \
--cc=kuba@kernel.org \
--cc=lihuisong@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@codeconstruct.com.au \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sudeep.holla@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox