Skip to content

Commit

Permalink
aquantia: Do not purge addresses when setting the number of rings
Browse files Browse the repository at this point in the history
IPV6 addresses are purged when setting the number of rx/tx
rings using ethtool -G. The function aq_set_ringparam
calls dev_close, which removes the addresses. As a solution,
call an internal function (aq_ndev_close).

Fixes: c1af542 ("net: aquantia: Ethtool based ring size configuration")
Signed-off-by: Izabela Bakollari <ibakolla@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Izabela Bakollari authored and David S. Miller committed Nov 25, 2022
1 parent 3970160 commit 2a83891
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions drivers/net/ethernet/aquantia/atlantic/aq_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "aq_ptp.h"
#include "aq_filters.h"
#include "aq_macsec.h"
#include "aq_main.h"

#include <linux/ptp_clock_kernel.h>

Expand Down Expand Up @@ -858,7 +859,7 @@ static int aq_set_ringparam(struct net_device *ndev,

if (netif_running(ndev)) {
ndev_running = true;
dev_close(ndev);
aq_ndev_close(ndev);
}

cfg->rxds = max(ring->rx_pending, hw_caps->rxds_min);
Expand All @@ -874,7 +875,7 @@ static int aq_set_ringparam(struct net_device *ndev,
goto err_exit;

if (ndev_running)
err = dev_open(ndev, NULL);
err = aq_ndev_open(ndev);

err_exit:
return err;
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/aquantia/atlantic/aq_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct net_device *aq_ndev_alloc(void)
return ndev;
}

static int aq_ndev_open(struct net_device *ndev)
int aq_ndev_open(struct net_device *ndev)
{
struct aq_nic_s *aq_nic = netdev_priv(ndev);
int err = 0;
Expand Down Expand Up @@ -88,7 +88,7 @@ static int aq_ndev_open(struct net_device *ndev)
return err;
}

static int aq_ndev_close(struct net_device *ndev)
int aq_ndev_close(struct net_device *ndev)
{
struct aq_nic_s *aq_nic = netdev_priv(ndev);
int err = 0;
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/ethernet/aquantia/atlantic/aq_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ DECLARE_STATIC_KEY_FALSE(aq_xdp_locking_key);

void aq_ndev_schedule_work(struct work_struct *work);
struct net_device *aq_ndev_alloc(void);
int aq_ndev_open(struct net_device *ndev);
int aq_ndev_close(struct net_device *ndev);

#endif /* AQ_MAIN_H */

0 comments on commit 2a83891

Please sign in to comment.