public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net-next/hinic: Fix MTU limitation
@ 2017-08-24 13:21 Aviad Krawczyk
  2017-08-24 15:19 ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: Aviad Krawczyk @ 2017-08-24 13:21 UTC (permalink / raw)
  To: davem; +Cc: linux-kernel, netdev, zhaochen6, Aviad Krawczyk

Fix the hw MTU limitation by setting min/max_mtu

Signed-off-by: Aviad Krawczyk <aviad.krawczyk@huawei.com>
Signed-off-by: Zhao Chen <zhaochen6@huawei.com>
---
 drivers/net/ethernet/huawei/hinic/hinic_main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c
index ae7ad48..7a14963 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_main.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c
@@ -980,6 +980,9 @@ static int nic_dev_init(struct pci_dev *pdev)
 	hinic_hwdev_cb_register(nic_dev->hwdev, HINIC_MGMT_MSG_CMD_LINK_STATUS,
 				nic_dev, link_status_event_handler);
 
+	netdev->min_mtu = ETH_MIN_MTU;
+	netdev->max_mtu = ETH_MAX_MTU;
+
 	err = register_netdev(netdev);
 	if (err) {
 		dev_err(&pdev->dev, "Failed to register netdev\n");
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net-next/hinic: Fix MTU limitation
  2017-08-24 13:21 [PATCH net-next] net-next/hinic: Fix MTU limitation Aviad Krawczyk
@ 2017-08-24 15:19 ` Andrew Lunn
  2017-08-24 16:41   ` Aviad Krawczyk
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2017-08-24 15:19 UTC (permalink / raw)
  To: Aviad Krawczyk; +Cc: davem, linux-kernel, netdev, zhaochen6

On Thu, Aug 24, 2017 at 09:21:25PM +0800, Aviad Krawczyk wrote:
> Fix the hw MTU limitation by setting min/max_mtu
> 
> Signed-off-by: Aviad Krawczyk <aviad.krawczyk@huawei.com>
> Signed-off-by: Zhao Chen <zhaochen6@huawei.com>
> ---
>  drivers/net/ethernet/huawei/hinic/hinic_main.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c
> index ae7ad48..7a14963 100644
> --- a/drivers/net/ethernet/huawei/hinic/hinic_main.c
> +++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c
> @@ -980,6 +980,9 @@ static int nic_dev_init(struct pci_dev *pdev)
>  	hinic_hwdev_cb_register(nic_dev->hwdev, HINIC_MGMT_MSG_CMD_LINK_STATUS,
>  				nic_dev, link_status_event_handler);
>  
> +	netdev->min_mtu = ETH_MIN_MTU;

You don't need to set the min_mtu. See:

http://elixir.free-electrons.com/linux/latest/source/net/ethernet/eth.c#L354

	Andrew

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net-next/hinic: Fix MTU limitation
  2017-08-24 15:19 ` Andrew Lunn
@ 2017-08-24 16:41   ` Aviad Krawczyk
  0 siblings, 0 replies; 3+ messages in thread
From: Aviad Krawczyk @ 2017-08-24 16:41 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: davem, linux-kernel, netdev, zhaochen6

On 8/24/2017 6:19 PM, Andrew Lunn wrote:
> On Thu, Aug 24, 2017 at 09:21:25PM +0800, Aviad Krawczyk wrote:
>> Fix the hw MTU limitation by setting min/max_mtu
>>
>> Signed-off-by: Aviad Krawczyk <aviad.krawczyk@huawei.com>
>> Signed-off-by: Zhao Chen <zhaochen6@huawei.com>
>> ---
>>  drivers/net/ethernet/huawei/hinic/hinic_main.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c
>> index ae7ad48..7a14963 100644
>> --- a/drivers/net/ethernet/huawei/hinic/hinic_main.c
>> +++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c
>> @@ -980,6 +980,9 @@ static int nic_dev_init(struct pci_dev *pdev)
>>  	hinic_hwdev_cb_register(nic_dev->hwdev, HINIC_MGMT_MSG_CMD_LINK_STATUS,
>>  				nic_dev, link_status_event_handler);
>>  
>> +	netdev->min_mtu = ETH_MIN_MTU;
> 
> You don't need to set the min_mtu. See:
> 
> http://elixir.free-electrons.com/linux/latest/source/net/ethernet/eth.c#L354
> 
> 	Andrew
> 
> .
> 

Thanks for paying attention to this unuseful line, I don't need to set min mtu.
I added it by mistake, the target was to change the MTU limitation.
I will send the patch soon without this line(in few days, after we will test it)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-24 16:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-24 13:21 [PATCH net-next] net-next/hinic: Fix MTU limitation Aviad Krawczyk
2017-08-24 15:19 ` Andrew Lunn
2017-08-24 16:41   ` Aviad Krawczyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox