Skip to content

Commit

Permalink
Merge branch 'nfp-fix-retcode-and-disable-netpoll-on-representors'
Browse files Browse the repository at this point in the history
Jakub Kicinski says:

====================
nfp: fix retcode and disable netpoll on representors

This series avoids a potential crash on nfp representor devices
when netpoll is in use.  If transmitting the frame through underlying
vNIC fails we'd return an error code (by passing on error code from
__dev_queue_xmit()) and cause double free in netpoll code.

Fix the error code and disable netpoll on reprs altogether.
IRQ-safety of locking the queues and calling __dev_queue_xmit()
is questionable.

Big thanks to John Hurley for debugging and narrowing down
the trace log after I gave up! :)
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
davem330 committed Mar 29, 2019
2 parents 355b985 + c3e1f7f commit 577dd43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/netronome/nfp/nfp_net_repr.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ static netdev_tx_t nfp_repr_xmit(struct sk_buff *skb, struct net_device *netdev)
ret = dev_queue_xmit(skb);
nfp_repr_inc_tx_stats(netdev, len, ret);

return ret;
return NETDEV_TX_OK;
}

static int nfp_repr_stop(struct net_device *netdev)
Expand Down Expand Up @@ -383,7 +383,7 @@ int nfp_repr_init(struct nfp_app *app, struct net_device *netdev,
netdev->features &= ~(NETIF_F_TSO | NETIF_F_TSO6);
netdev->gso_max_segs = NFP_NET_LSO_MAX_SEGS;

netdev->priv_flags |= IFF_NO_QUEUE;
netdev->priv_flags |= IFF_NO_QUEUE | IFF_DISABLE_NETPOLL;
netdev->features |= NETIF_F_LLTX;

if (nfp_app_has_tc(app)) {
Expand Down

0 comments on commit 577dd43

Please sign in to comment.