Commit 2c2c8e33 authored by David S. Miller's avatar David S. Miller

Merge branch 'nfp-fixes'

Jakub Kicinski says:

====================
nfp: fixes and trivial cleanup

First patch drops unnecessary version.h includes.  Second one
drops support for pre-release versions of FW ABI.  Removing
FW ABI 0.0 from supported set is particularly good since 0
could just be uninitialized memory.  Last but not least I drop
unnecessary padding of frames on RX which makes us count bytes
incorrectly for the VF2VF traffic.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents db7196a0 ebecefc8
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
* Chris Telfer <chris.telfer@netronome.com> * Chris Telfer <chris.telfer@netronome.com>
*/ */
#include <linux/version.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -1441,10 +1440,6 @@ static int nfp_net_rx(struct nfp_net_rx_ring *rx_ring, int budget) ...@@ -1441,10 +1440,6 @@ static int nfp_net_rx(struct nfp_net_rx_ring *rx_ring, int budget)
nfp_net_set_hash(nn->netdev, skb, rxd); nfp_net_set_hash(nn->netdev, skb, rxd);
/* Pad small frames to minimum */
if (skb_put_padto(skb, 60))
break;
/* Stats update */ /* Stats update */
u64_stats_update_begin(&r_vec->rx_sync); u64_stats_update_begin(&r_vec->rx_sync);
r_vec->rx_pkts++; r_vec->rx_pkts++;
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
* Brad Petrus <brad.petrus@netronome.com> * Brad Petrus <brad.petrus@netronome.com>
*/ */
#include <linux/version.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
......
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
* Rolf Neugebauer <rolf.neugebauer@netronome.com> * Rolf Neugebauer <rolf.neugebauer@netronome.com>
*/ */
#include <linux/version.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -134,7 +133,7 @@ static int nfp_netvf_pci_probe(struct pci_dev *pdev, ...@@ -134,7 +133,7 @@ static int nfp_netvf_pci_probe(struct pci_dev *pdev,
} }
nfp_net_get_fw_version(&fw_ver, ctrl_bar); nfp_net_get_fw_version(&fw_ver, ctrl_bar);
if (fw_ver.class != NFP_NET_CFG_VERSION_CLASS_GENERIC) { if (fw_ver.resv || fw_ver.class != NFP_NET_CFG_VERSION_CLASS_GENERIC) {
dev_err(&pdev->dev, "Unknown Firmware ABI %d.%d.%d.%d\n", dev_err(&pdev->dev, "Unknown Firmware ABI %d.%d.%d.%d\n",
fw_ver.resv, fw_ver.class, fw_ver.major, fw_ver.minor); fw_ver.resv, fw_ver.class, fw_ver.major, fw_ver.minor);
err = -EINVAL; err = -EINVAL;
...@@ -142,9 +141,7 @@ static int nfp_netvf_pci_probe(struct pci_dev *pdev, ...@@ -142,9 +141,7 @@ static int nfp_netvf_pci_probe(struct pci_dev *pdev,
} }
/* Determine stride */ /* Determine stride */
if (nfp_net_fw_ver_eq(&fw_ver, 0, 0, 0, 0) || if (nfp_net_fw_ver_eq(&fw_ver, 0, 0, 0, 1)) {
nfp_net_fw_ver_eq(&fw_ver, 0, 0, 0, 1) ||
nfp_net_fw_ver_eq(&fw_ver, 0, 0, 0x12, 0x48)) {
stride = 2; stride = 2;
tx_bar_no = NFP_NET_Q0_BAR; tx_bar_no = NFP_NET_Q0_BAR;
rx_bar_no = NFP_NET_Q1_BAR; rx_bar_no = NFP_NET_Q1_BAR;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment