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: <4478921b-067d-484d-ab09-0789c0cdb2ed@yunsilicon.com>
Date: Wed, 5 Mar 2025 12:17:37 +0800
From: "Xin Tian" <tianx@...silicon.com>
To: "Jakub Kicinski" <kuba@...nel.org>
Cc: <netdev@...r.kernel.org>, <leon@...nel.org>, <andrew+netdev@...n.ch>, 
	<pabeni@...hat.com>, <edumazet@...gle.com>, <davem@...emloft.net>, 
	<jeff.johnson@....qualcomm.com>, <przemyslaw.kitszel@...el.com>, 
	<weihg@...silicon.com>, <wanry@...silicon.com>, <jacky@...silicon.com>, 
	<horms@...nel.org>, <parthiban.veerasooran@...rochip.com>, 
	<masahiroy@...nel.org>
Subject: Re: [PATCH net-next v7 01/14] xsc: Add xsc driver basic framework

On 2025/3/5 10:48, Jakub Kicinski wrote:
> On Fri, 28 Feb 2025 23:41:24 +0800 Xin Tian wrote:
>> +config NET_VENDOR_YUNSILICON
>> +	depends on ARM64 || X86_64
> || COMPILE_TEST please ?
OK
>
>> diff --git a/drivers/net/ethernet/yunsilicon/Makefile b/drivers/net/ethernet/yunsilicon/Makefile
>> new file mode 100644
>> index 000000000..6fc8259a7
>> --- /dev/null
>> +++ b/drivers/net/ethernet/yunsilicon/Makefile
>> @@ -0,0 +1,8 @@
>> +# SPDX-License-Identifier: GPL-2.0
>> +# Copyright (C) 2021-2025, Shanghai Yunsilicon Technology Co., Ltd.
>> +# All rights reserved.
>> +# Makefile for the Yunsilicon device drivers.
>> +#
>> +
>> +# obj-$(CONFIG_YUNSILICON_XSC_ETH) += xsc/net/
> Why are you adding commented out lines? Add them where needed
ack
>
>> +obj-$(CONFIG_YUNSILICON_XSC_PCI) += xsc/pci/
>> \ No newline at end of file
> new line missing
ack
>
>> new file mode 100644
>> index 000000000..de743487e
>> --- /dev/null
>> +++ b/drivers/net/ethernet/yunsilicon/xsc/net/Kconfig
>> @@ -0,0 +1,17 @@
>> +# SPDX-License-Identifier: GPL-2.0
>> +# Copyright (C) 2021-2025, Shanghai Yunsilicon Technology Co., Ltd.
>> +# All rights reserved.
>> +# Yunsilicon driver configuration
>> +#
>> +
>> +config YUNSILICON_XSC_ETH
>> +	tristate "Yunsilicon XSC ethernet driver"
>> +	default n
> n is the default, you don't have to specify it
ack
>
>> +xsc_eth-y := main.o
>> \ No newline at end of file
> new line
ack
>> diff --git a/drivers/net/ethernet/yunsilicon/xsc/pci/Kconfig b/drivers/net/ethernet/yunsilicon/xsc/pci/Kconfig
>> new file mode 100644
>> index 000000000..2b6d79905
>> --- /dev/null
>> +++ b/drivers/net/ethernet/yunsilicon/xsc/pci/Kconfig
>> @@ -0,0 +1,16 @@
>> +# SPDX-License-Identifier: GPL-2.0
>> +# Copyright (C) 2021-2025, Shanghai Yunsilicon Technology Co., Ltd.
>> +# All rights reserved.
>> +# Yunsilicon PCI configuration
>> +#
>> +
>> +config YUNSILICON_XSC_PCI
>> +	tristate "Yunsilicon XSC PCI driver"
>> +	default n
> no need
ack
>
>> +	select PAGE_POOL
> Why is this in the PCI driver, not the ETH driver?
> Please add this line in a patch which actually makes use of page pool
OK, should be in the ETH driver, thanks for pointing that out
>> +static int set_dma_caps(struct pci_dev *pdev)
>> +{
>> +	int err;
>> +
>> +	err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
>> +	if (err)
>> +		err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
>> +	else
>> +		err = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
> Please grep git history for dma_set_mask_and_coherent
> The fallback is unnecessary, just:
>
> 	err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));

OK

Thanks

>
>> +	if (!err)
>> +		dma_set_max_seg_size(&pdev->dev, SZ_2G);
>> +
>> +	return err;
>> +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ