[PATCH net-next 10/10] net: mvneta: Use the new hwbm framework

Gregory CLEMENT gregory.clement at free-electrons.com
Wed Jan 13 09:47:25 PST 2016


Hi Marcin,
 
 On mar., janv. 12 2016, Marcin Wojtas <mw at semihalf.com> wrote:

> Hi Gregory,
>
> A quick remark below. All changes look fine to me at a first look, but
> I will test and dig more into code soon.

Great! A test would be nice because I have just did basic tests: mainly an
iperf.

>
>>
>> @@ -3946,11 +3965,6 @@ static int mvneta_probe(struct platform_device *pdev)
>>         dev->priv_flags |= IFF_UNICAST_FLT;
>>         dev->gso_max_segs = MVNETA_MAX_TSO_SEGS;
>>
>> -       err = register_netdev(dev);
>> -       if (err < 0) {
>> -               dev_err(&pdev->dev, "failed to register\n");
>> -               goto err_free_stats;
>> -       }
>
> The purpose of shifting register_netdev() was to be able to obtain
> pp->id from net_device, before mvneta_bm_port_init is called. It is
> needed for proper port - pool mapping control.

I can revert this change, initially I moved this chunk because I wanted
to add a netdev_ops before registering it and this netdev_op depend on
the bm support. As for now I don't have this this netdev_op this change
is pointless. But if in future I need it, then I will look for how to do
it in a different way.

Thanks,


>
>>
>>         pp->id = dev->ifindex;
>>
>> @@ -3965,6 +3979,12 @@ static int mvneta_probe(struct platform_device *pdev)
>>                 }
>>         }
>>
>> +       err = register_netdev(dev);
>> +       if (err < 0) {
>> +               dev_err(&pdev->dev, "failed to register\n");
>> +               goto err_free_stats;
>> +       }
>> +
>>         err = mvneta_init(&pdev->dev, pp);
>>         if (err < 0)
>>                 goto err_netdev;
>
> Best regards,
> Marcin

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com



More information about the linux-arm-kernel mailing list