Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1719237 > unrolled thread
| Started by | Aviad Krawczyk <aviad.krawczyk@huawei.com> |
|---|---|
| First post | 2017-08-24 15:30 +0200 |
| Last post | 2017-08-24 18:50 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH net-next] net-next/hinic: Fix MTU limitation Aviad Krawczyk <aviad.krawczyk@huawei.com> - 2017-08-24 15:30 +0200
Re: [PATCH net-next] net-next/hinic: Fix MTU limitation Andrew Lunn <andrew@lunn.ch> - 2017-08-24 17:30 +0200
Re: [PATCH net-next] net-next/hinic: Fix MTU limitation Aviad Krawczyk <aviad.krawczyk@huawei.com> - 2017-08-24 18:50 +0200
| From | Aviad Krawczyk <aviad.krawczyk@huawei.com> |
|---|---|
| Date | 2017-08-24 15:30 +0200 |
| Subject | [PATCH net-next] net-next/hinic: Fix MTU limitation |
| Message-ID | <ui0mS-78Q-25@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Date | 2017-08-24 17:30 +0200 |
| Message-ID | <ui2f0-8jI-19@gated-at.bofh.it> |
| In reply to | #1719237 |
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
[toc] | [prev] | [next] | [standalone]
| From | Aviad Krawczyk <aviad.krawczyk@huawei.com> |
|---|---|
| Date | 2017-08-24 18:50 +0200 |
| Message-ID | <ui3up-zR-3@gated-at.bofh.it> |
| In reply to | #1719338 |
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)
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web