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: <20250210175712.GK554665@kernel.org>
Date: Mon, 10 Feb 2025 17:57:12 +0000
From: Simon Horman <horms@...nel.org>
To: Suman Ghosh <sumang@...vell.com>
Cc: sgoutham@...vell.com, gakula@...vell.com, sbhatta@...vell.com,
	hkelam@...vell.com, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, lcherian@...vell.com,
	jerinj@...vell.com, john.fastabend@...il.com, bbhushan2@...vell.com,
	hawk@...nel.org, andrew+netdev@...n.ch, ast@...nel.org,
	daniel@...earbox.net, bpf@...r.kernel.org, larysa.zaremba@...el.com
Subject: Re: [net-next PATCH v5 5/6] octeontx2-pf: Prepare for AF_XDP

On Thu, Feb 06, 2025 at 02:20:33PM +0530, Suman Ghosh wrote:
> Implement necessary APIs required for AF_XDP transmit.
> 
> Signed-off-by: Hariprasad Kelam <hkelam@...vell.com>
> Signed-off-by: Suman Ghosh <sumang@...vell.com>

...

> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
> index 44137160bdf6..b012d8794f18 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
> @@ -22,6 +22,12 @@
>  #include "cn10k.h"
>  
>  #define CQE_ADDR(CQ, idx) ((CQ)->cqe_base + ((CQ)->cqe_size * (idx)))
> +#define READ_FREE_SQE(SQ, free_sqe)						   \
> +	do {							                   \
> +		typeof(SQ) _SQ = (SQ);						   \
> +		free_sqe = (((_SQ)->cons_head - (_SQ)->head - 1 + (_SQ)->sqe_cnt)  \
> +			   & ((_SQ)->sqe_cnt - 1));                                \
> +	} while (0)

It looks like READ_FREE_SQE() could be a function rather than a macro.
And, as an aside, CQE_ADDR could be too.

>  #define PTP_PORT	        0x13F
>  /* PTPv2 header Original Timestamp starts at byte offset 34 and
>   * contains 6 byte seconds field and 4 byte nano seconds field.

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ