summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorAlok Mishra <almishra@marvell.com>2024-04-26 15:45:49 +0530
committerDamjan Marion <dmarion@0xa5.net>2024-08-21 11:54:29 +0000
commitf7f26e5b328617ae6527fa05e4cb7ab23a283045 (patch)
tree4a925e3210c5c9459ef606026a77d8ccb3487443 /src/vnet
parente00ce39714d4c6b9d107f6de2b8cf440713e3cf5 (diff)
octeon: add support for max_rx_frame_size update
This patch adds capability to update max_rx_frame_size on octeon port. Initial MTU value is being set in the "oct_port_start", which is invoked every time the Ethernet interface is brought up, thus overwriting any MTU value set by VPP CLI. Moved the MTU initialization to "oct_port_init" to address this. Type: feature Change-Id: I00d0d52bc7711062cde47b8fe52e6823bb718d08 Signed-off-by: Alok Mishra <almishra@marvell.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/dev/port.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/dev/port.c b/src/vnet/dev/port.c
index 5b4b8cdc7b8..df7805c1ff2 100644
--- a/src/vnet/dev/port.c
+++ b/src/vnet/dev/port.c
@@ -305,7 +305,8 @@ vnet_dev_port_cfg_change_req_validate (vlib_main_t *vm, vnet_dev_port_t *port,
switch (req->type)
{
case VNET_DEV_PORT_CFG_MAX_RX_FRAME_SIZE:
- if (req->max_rx_frame_size > port->attr.max_supported_rx_frame_size)
+ if ((req->max_rx_frame_size > port->attr.max_supported_rx_frame_size) ||
+ (req->max_rx_frame_size < ETHERNET_MIN_PACKET_BYTES))
return VNET_DEV_ERR_INVALID_VALUE;
if (req->max_rx_frame_size == port->max_rx_frame_size)
return VNET_DEV_ERR_NO_CHANGE;