[ipxe-devel] REG: Query on 9K MTU Testing flow

MohamedShah R rmohamedshah at gmail.com
Mon Mar 13 03:16:37 UTC 2023


Hi,

Scenario:

   1. If our device configures netdev->mtu as 1500  and netdev->max_pkt_len
   is 9128(above 9k).
   2. If the DHCP server sends MTU size as 9K.   



As per the code walk-through, I understand that this api "static int
apply_netdev_settings”
get invoke and call the below part of code to handle the above scenario: In
this case, as part of netdev_close , it gets called the intf_close and it
didn’t call the intf_init/open  as part of netdev_open api.



 /* Close and reopen network device if MTU has increased */

if ( netdev_is_open ( netdev ) && ( mtu > old_mtu ) ) {

netdev_close ( netdev );

if ( ( rc = netdev_open ( netdev ) ) != 0 ) {

DBGC ( netdev, "NETDEV %s could not reopen: "

"%s\n", netdev->name, strerror ( rc ) );

return rc;

}

}



Intf_init api gets called from the below flow which is invoked as part of
device probe api.

alloc_etherdev()---> alloc_netdev()-----> intf_init gets called based on
the number of entries in the configuration.



Could you please let me know if the intf_close gets called as part of
netdev_close api , what is the flow to create the intf/ re-init the intf  again
for the above scenario.

Regards

Mohamed Shah R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20230313/aa0044d1/attachment.htm>


More information about the ipxe-devel mailing list