aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cavium/liquidio/liquidio_common.h
diff options
context:
space:
mode:
authorVeerasenareddy Burru <veerasenareddy.burru@cavium.com>2018-03-10 00:17:35 -0800
committerDavid S. Miller <davem@davemloft.net>2018-03-12 11:00:42 -0400
commit87a7c4b3c3570feed2edb9478c3bdd474f43a239 (patch)
treeefface1c55592c1eefb670ef1a5ab83bc76f9618 /drivers/net/ethernet/cavium/liquidio/liquidio_common.h
parentMerge branch 'hns3-next' (diff)
downloadlinux-dev-87a7c4b3c3570feed2edb9478c3bdd474f43a239.tar.xz
linux-dev-87a7c4b3c3570feed2edb9478c3bdd474f43a239.zip
liquidio: fix ndo_change_mtu to always return correct status to the caller
In a scenario where the command queued to firmware get dropped or times out, MTU change from host will not propagate to firmware. So, it is required for host driver to wait for response from firmware or timeout and then return correct status to caller of ndo_change_mtu. Also moved the common code for MTU change from PF and VF driver files to common file lio_core.c Signed-off-by: Veerasenareddy Burru <veerasenareddy.burru@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium/liquidio/liquidio_common.h')
-rw-r--r--drivers/net/ethernet/cavium/liquidio/liquidio_common.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/liquidio_common.h b/drivers/net/ethernet/cavium/liquidio/liquidio_common.h
index 522dcc4dcff7..4f72ed1ad15a 100644
--- a/drivers/net/ethernet/cavium/liquidio/liquidio_common.h
+++ b/drivers/net/ethernet/cavium/liquidio/liquidio_common.h
@@ -192,7 +192,8 @@ static inline void add_sg_size(struct octeon_sg_entry *sg_entry,
#define OCTNET_MAX_FRM_SIZE (16000 + OCTNET_FRM_HEADER_SIZE)
-#define OCTNET_DEFAULT_FRM_SIZE (1500 + OCTNET_FRM_HEADER_SIZE)
+#define OCTNET_DEFAULT_MTU (1500)
+#define OCTNET_DEFAULT_FRM_SIZE (OCTNET_DEFAULT_MTU + OCTNET_FRM_HEADER_SIZE)
/** NIC Commands are sent using this Octeon Input Queue */
#define OCTNET_CMD_Q 0