* [PATCH net-next 0/2] ionic updates
@ 2020-12-01 0:25 Shannon Nelson
2020-12-01 0:25 ` [PATCH net-next 1/2] ionic: remove some unnecessary oom messages Shannon Nelson
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Shannon Nelson @ 2020-12-01 0:25 UTC (permalink / raw)
To: netdev, davem, kuba; +Cc: Shannon Nelson
These are a pair of small code cleanups.
Shannon Nelson (2):
ionic: remove some unnecessary oom messages
ionic: change mtu after queues are stopped
drivers/net/ethernet/pensando/ionic/ionic_dev.c | 2 +-
drivers/net/ethernet/pensando/ionic/ionic_lif.c | 14 +++++++-------
drivers/net/ethernet/pensando/ionic/ionic_main.c | 4 +---
3 files changed, 9 insertions(+), 11 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net-next 1/2] ionic: remove some unnecessary oom messages
2020-12-01 0:25 [PATCH net-next 0/2] ionic updates Shannon Nelson
@ 2020-12-01 0:25 ` Shannon Nelson
2020-12-01 0:25 ` [PATCH net-next 2/2] ionic: change mtu after queues are stopped Shannon Nelson
2020-12-02 1:15 ` [PATCH net-next 0/2] ionic updates Jakub Kicinski
2 siblings, 0 replies; 4+ messages in thread
From: Shannon Nelson @ 2020-12-01 0:25 UTC (permalink / raw)
To: netdev, davem, kuba; +Cc: Shannon Nelson
Remove memory allocation fail messages where the OOM stack
trace will make it obvious which allocation request failed.
Signed-off-by: Shannon Nelson <snelson@pensando.io>
---
drivers/net/ethernet/pensando/ionic/ionic_dev.c | 2 +-
drivers/net/ethernet/pensando/ionic/ionic_lif.c | 8 +++-----
drivers/net/ethernet/pensando/ionic/ionic_main.c | 4 +---
3 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_dev.c b/drivers/net/ethernet/pensando/ionic/ionic_dev.c
index 318db5f77fdb..fb2b5bf179d7 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_dev.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_dev.c
@@ -142,7 +142,7 @@ int ionic_heartbeat_check(struct ionic *ionic)
work = kzalloc(sizeof(*work), GFP_ATOMIC);
if (!work) {
- dev_err(ionic->dev, "%s OOM\n", __func__);
+ dev_err(ionic->dev, "LIF reset trigger dropped\n");
} else {
work->type = IONIC_DW_TYPE_LIF_RESET;
if (fw_status & IONIC_FW_STS_F_RUNNING &&
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index 0afec2fa572d..0b7f2def423c 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -842,7 +842,7 @@ static bool ionic_notifyq_service(struct ionic_cq *cq,
case IONIC_EVENT_RESET:
work = kzalloc(sizeof(*work), GFP_ATOMIC);
if (!work) {
- netdev_err(lif->netdev, "%s OOM\n", __func__);
+ netdev_err(lif->netdev, "Reset event dropped\n");
} else {
work->type = IONIC_DW_TYPE_LIF_RESET;
ionic_lif_deferred_enqueue(&lif->deferred, work);
@@ -1051,10 +1051,8 @@ static int ionic_lif_addr(struct ionic_lif *lif, const u8 *addr, bool add,
if (!can_sleep) {
work = kzalloc(sizeof(*work), GFP_ATOMIC);
- if (!work) {
- netdev_err(lif->netdev, "%s OOM\n", __func__);
+ if (!work)
return -ENOMEM;
- }
work->type = add ? IONIC_DW_TYPE_RX_ADDR_ADD :
IONIC_DW_TYPE_RX_ADDR_DEL;
memcpy(work->addr, addr, ETH_ALEN);
@@ -1183,7 +1181,7 @@ static void ionic_set_rx_mode(struct net_device *netdev, bool can_sleep)
if (!can_sleep) {
work = kzalloc(sizeof(*work), GFP_ATOMIC);
if (!work) {
- netdev_err(lif->netdev, "%s OOM\n", __func__);
+ netdev_err(lif->netdev, "rxmode change dropped\n");
return;
}
work->type = IONIC_DW_TYPE_RX_MODE;
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_main.c b/drivers/net/ethernet/pensando/ionic/ionic_main.c
index d355676f6c16..fbc57de6683e 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_main.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_main.c
@@ -511,10 +511,8 @@ int ionic_port_init(struct ionic *ionic)
idev->port_info_sz,
&idev->port_info_pa,
GFP_KERNEL);
- if (!idev->port_info) {
- dev_err(ionic->dev, "Failed to allocate port info\n");
+ if (!idev->port_info)
return -ENOMEM;
- }
}
sz = min(sizeof(ident->port.config), sizeof(idev->dev_cmd_regs->data));
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net-next 2/2] ionic: change mtu after queues are stopped
2020-12-01 0:25 [PATCH net-next 0/2] ionic updates Shannon Nelson
2020-12-01 0:25 ` [PATCH net-next 1/2] ionic: remove some unnecessary oom messages Shannon Nelson
@ 2020-12-01 0:25 ` Shannon Nelson
2020-12-02 1:15 ` [PATCH net-next 0/2] ionic updates Jakub Kicinski
2 siblings, 0 replies; 4+ messages in thread
From: Shannon Nelson @ 2020-12-01 0:25 UTC (permalink / raw)
To: netdev, davem, kuba; +Cc: Shannon Nelson
Order of operations is slightly more correct in the driver
to change the netdev->mtu after the queues have been stopped
rather than before.
Signed-off-by: Shannon Nelson <snelson@pensando.io>
---
drivers/net/ethernet/pensando/ionic/ionic_lif.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index 0b7f2def423c..11140915c2da 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -1465,12 +1465,14 @@ static int ionic_change_mtu(struct net_device *netdev, int new_mtu)
if (err)
return err;
- netdev->mtu = new_mtu;
/* if we're not running, nothing more to do */
- if (!netif_running(netdev))
+ if (!netif_running(netdev)) {
+ netdev->mtu = new_mtu;
return 0;
+ }
ionic_stop_queues_reconfig(lif);
+ netdev->mtu = new_mtu;
return ionic_start_queues_reconfig(lif);
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next 0/2] ionic updates
2020-12-01 0:25 [PATCH net-next 0/2] ionic updates Shannon Nelson
2020-12-01 0:25 ` [PATCH net-next 1/2] ionic: remove some unnecessary oom messages Shannon Nelson
2020-12-01 0:25 ` [PATCH net-next 2/2] ionic: change mtu after queues are stopped Shannon Nelson
@ 2020-12-02 1:15 ` Jakub Kicinski
2 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2020-12-02 1:15 UTC (permalink / raw)
To: Shannon Nelson; +Cc: netdev, davem
On Mon, 30 Nov 2020 16:25:44 -0800 Shannon Nelson wrote:
> These are a pair of small code cleanups.
Applied, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-02 1:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-01 0:25 [PATCH net-next 0/2] ionic updates Shannon Nelson
2020-12-01 0:25 ` [PATCH net-next 1/2] ionic: remove some unnecessary oom messages Shannon Nelson
2020-12-01 0:25 ` [PATCH net-next 2/2] ionic: change mtu after queues are stopped Shannon Nelson
2020-12-02 1:15 ` [PATCH net-next 0/2] ionic updates Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).