diff options
author | John Fraker <jfraker@google.com> | 2023-11-28 03:26:48 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-11-29 19:32:36 +0300 |
commit | da7d4b42caf1b4d6ba3447bfd9ed185479fb0fe4 (patch) | |
tree | f3b636799b0e342e0131ce41ea84f6763d6e0d5a /drivers/net/ethernet/google/gve/gve_ethtool.c | |
parent | 513072fb4bf816686473eec897194ce6a28e53db (diff) | |
download | linux-da7d4b42caf1b4d6ba3447bfd9ed185479fb0fe4.tar.xz |
gve: Remove dependency on 4k page size.
Prior to this change, gve crashes when attempting to run in kernels with
page sizes other than 4k. This change removes unnecessary references to
PAGE_SIZE and replaces them with more meaningful constants.
Signed-off-by: Jordan Kimbrough <jrkim@google.com>
Signed-off-by: John Fraker <jfraker@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20231128002648.320892-6-jfraker@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/google/gve/gve_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/google/gve/gve_ethtool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/google/gve/gve_ethtool.c b/drivers/net/ethernet/google/gve/gve_ethtool.c index 233e5946905e..e5397aa1e48f 100644 --- a/drivers/net/ethernet/google/gve/gve_ethtool.c +++ b/drivers/net/ethernet/google/gve/gve_ethtool.c @@ -519,7 +519,7 @@ static int gve_set_tunable(struct net_device *netdev, case ETHTOOL_RX_COPYBREAK: { u32 max_copybreak = gve_is_gqi(priv) ? - (PAGE_SIZE / 2) : priv->data_buffer_size_dqo; + GVE_DEFAULT_RX_BUFFER_SIZE : priv->data_buffer_size_dqo; len = *(u32 *)value; if (len > max_copybreak) |