lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7bfb8a48-8a14-47cb-bd69-1d864535aeba@amperemail.onmicrosoft.com>
Date: Wed, 18 Dec 2024 11:23:06 -0500
From: Adam Young <admiyo@...eremail.onmicrosoft.com>
To: Joe Damato <jdamato@...tly.com>, admiyo@...amperecomputing.com,
 Jeremy Kerr <jk@...econstruct.com.au>,
 Matt Johnston <matt@...econstruct.com.au>,
 Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
 Sudeep Holla <sudeep.holla@....com>,
 Jonathan Cameron <Jonathan.Cameron@...wei.com>,
 Huisong Li <lihuisong@...wei.com>
Subject: Re: [PATCH v9 1/1] mctp pcc: Implement MCTP over PCC Transport


On 12/17/24 14:04, Joe Damato wrote:
>> +static void mctp_pcc_client_rx_callback(struct mbox_client *c, void *buffer)
>> +{
>> +	struct mctp_pcc_ndev *mctp_pcc_ndev;
>> +	struct mctp_pcc_hdr mctp_pcc_hdr;
>> +	struct pcpu_dstats *dstats;
>> +	struct mctp_skb_cb *cb;
>> +	struct sk_buff *skb;
>> +	void *skb_buf;
>> +	u32 data_len;
>> +
>> +	mctp_pcc_ndev = container_of(c, struct mctp_pcc_ndev, inbox.client);
>> +	memcpy_fromio(&mctp_pcc_hdr, mctp_pcc_ndev->inbox.chan->shmem,
>> +		      sizeof(struct mctp_pcc_hdr));
>> +	data_len = mctp_pcc_hdr.length + MCTP_HEADER_LENGTH;
>> +	skb = netdev_alloc_skb(mctp_pcc_ndev->mdev.dev, data_len);
>> +
>> +	dstats = this_cpu_ptr(mctp_pcc_ndev->mdev.dev->dstats);
>> +	u64_stats_update_begin(&dstats->syncp);
>> +	if (data_len > mctp_pcc_ndev->mdev.dev->mtu) {
>> +		u64_stats_inc(&dstats->rx_drops);
>> +		u64_stats_inc(&dstats->rx_drops);
> Double counting rx_drops ?

Oops.  Yes I was.  Thanks.

>
>> +		u64_stats_update_end(&dstats->syncp);
>> +		return;
>> +	}
>> +	if (!skb) {
>> +		u64_stats_inc(&dstats->rx_drops);
>> +		u64_stats_update_end(&dstats->syncp);
>> +		return;
>> +	}
>> +	u64_stats_inc(&dstats->rx_packets);
>> +	u64_stats_add(&dstats->rx_bytes, data_len);
>> +	u64_stats_update_end(&dstats->syncp);
> I suspect what Jeremy meant (but please feel free to correct me if
> I'm mistaken, Jeremy) was that you may want to use the helpers in:
>
> include/linux/netdevice.h
>
> e.g.
>
>    dev_dstats_rx_add(mctp_pcc_ndev->mdev.dev, data_len);
>    dev_dstats_rx_dropped(mctp_pcc_ndev->mdev.dev);
>
> etc.

I don't see those function calls in the 6.13-rc3 tree I am working 
with.  Are they coming later?



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ