Re: [PATCH v6 1/2] net: mhi: Enable Ethernet interface support

vivek pernamitta <[email protected]>
Newsgroups dev.linux.lists.mhi,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <[email protected]>

On 12/10/2025 10:20 PM, Andrew Lunn wrote:
> On Wed, Dec 10, 2025 at 10:46:11AM +0530, vivek pernamitta wrote:
>>
>> On 12/9/2025 7:06 PM, Andrew Lunn wrote:
>>
>>                  ndev = alloc_netdev(sizeof(struct mhi_net_dev), info->netname,
>>          -                           NET_NAME_PREDICTABLE, mhi_net_setup);
>>          +                           NET_NAME_PREDICTABLE, info->ethernet_if ?
>>          +                           mhi_ethernet_setup : mhi_net_setup);
>>
>>      Is the name predictable? I thought "eth%d" was considered
>>      NET_NAME_ENUM?
>>
>>      https://elixir.bootlin.com/linux/v6.18/source/net/ethernet/eth.c#L382
>>
>>              Andrew
>>
>> For Ethernet-type devices, the interface name will follow the standard
>> convention: eth%d,
>> For normal IP interfaces, the interface will be created as mhi_swip%d/
>> mhi_hwip%d.
>> The naming will depend on the details provided through struct mhi_device_info.
> 
> Take a look again at my question. Why is NET_NAME_PREDICTABLE correct?
> Justify it. Especially given what alloc_etherdev_mqs() does.
> 
> 	Andrew

You’re right—eth%d should use NET_NAME_ENUM. I’ll update the patch to 
use NET_NAME_ENUM for both Ethernet-type interfaces and for non-Ethernet 
(SW/HW IP) interfaces.
Thanks for the pointer.

Regards
Vivek
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.