]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
nfp: validate the return code from dev_queue_xmit()
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 27 Mar 2019 18:38:38 +0000 (11:38 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit7ae96281ca17c77f092134a46bd3ea263a3a2601
treee0f25b49525deac7b6d1a28fc1d9c24c679905f1
parenta6cb6f38feb26082a338b3410e3e84bb9297ddb0
nfp: validate the return code from dev_queue_xmit()

BugLink: https://bugs.launchpad.net/bugs/1838116
[ Upstream commit c8ba5b91a04e3e2643e48501c114108802f21cda ]

dev_queue_xmit() may return error codes as well as netdev_tx_t,
and it always consumes the skb.  Make sure we always return a
correct netdev_tx_t value.

Fixes: eadfa4c3be99 ("nfp: add stats and xmit helpers for representors")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: John Hurley <john.hurley@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c