All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: Marcin Szycik <marcin.szycik@intel.com>,
	netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
	Sandeep Penigalapati <sandeep.penigalapati@intel.com>
Subject: [PATCH net-next 6/9] ice: Add support for changing MTU on PR in switchdev mode
Date: Thu, 28 Oct 2021 11:06:56 -0700	[thread overview]
Message-ID: <20211028180659.218912-7-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20211028180659.218912-1-anthony.l.nguyen@intel.com>

From: Marcin Szycik <marcin.szycik@intel.com>

This change adds support for changing MTU on port representor in
switchdev mode, by setting the min/max MTU values on port representor
netdev. Before it was possible to change the MTU only in a limited,
default range (68-1500).

Signed-off-by: Marcin Szycik <marcin.szycik@intel.com>
Tested-by: Sandeep Penigalapati <sandeep.penigalapati@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_repr.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/intel/ice/ice_repr.c b/drivers/net/ethernet/intel/ice/ice_repr.c
index c49eeea7cb67..af8e6ef5f571 100644
--- a/drivers/net/ethernet/intel/ice/ice_repr.c
+++ b/drivers/net/ethernet/intel/ice/ice_repr.c
@@ -267,6 +267,9 @@ static int ice_repr_add(struct ice_vf *vf)
 	if (err)
 		goto err_devlink;
 
+	repr->netdev->min_mtu = ETH_MIN_MTU;
+	repr->netdev->max_mtu = ICE_MAX_MTU;
+
 	err = ice_repr_reg_netdev(repr->netdev);
 	if (err)
 		goto err_netdev;
-- 
2.31.1


  parent reply	other threads:[~2021-10-28 18:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 18:06 [PATCH net-next 0/9][pull request] 100GbE Intel Wired LAN Driver Updates 2021-10-28 Tony Nguyen
2021-10-28 18:06 ` [PATCH net-next 1/9] ice: support for indirect notification Tony Nguyen
2021-10-28 18:06 ` [PATCH net-next 2/9] ice: VXLAN and Geneve TC support Tony Nguyen
2021-10-28 18:06 ` [PATCH net-next 3/9] ice: low level support for tunnels Tony Nguyen
2021-10-28 18:06 ` [PATCH net-next 4/9] ice: support for GRE in eswitch Tony Nguyen
2021-10-28 18:06 ` [PATCH net-next 5/9] ice: send correct vc status in switchdev Tony Nguyen
2021-10-28 18:06 ` Tony Nguyen [this message]
2021-10-28 18:06 ` [PATCH net-next 7/9] ice: Add support to print error on PHY FW load failure Tony Nguyen
2021-10-28 18:06 ` [PATCH net-next 8/9] ice: Fix clang -Wimplicit-fallthrough in ice_pull_qvec_from_rc() Tony Nguyen
2021-10-28 18:06 ` [PATCH net-next 9/9] ice: fix error return code in ice_get_recp_frm_fw() Tony Nguyen
2021-10-29 12:10 ` [PATCH net-next 0/9][pull request] 100GbE Intel Wired LAN Driver Updates 2021-10-28 patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211028180659.218912-7-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=marcin.szycik@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=sandeep.penigalapati@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.