Skip to content

Commit 074f589

Browse files
committed
NAPI-279 overlay nic tag creation needs to consider min nic tag MTU
Reviewed by: Matt Smillie <[email protected]>
1 parent b644799 commit 074f589

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

lib/init.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,24 @@ function loadInitialData(opts, callback) {
192192

193193
vasync.pipeline({ funcs: [
194194
function initOverlayTag(_, cb) {
195+
var mtu;
196+
195197
if (!config.overlay.enabled) {
196198
return setImmediate(cb);
197199
}
198200

201+
/*
202+
* The minimum nic tag MTU is 1500, as that's what most physical
203+
* networks end up supporting. Therefore, if the overlay's MTU
204+
* is say, 1400 (a common non-Jumbo frame configuration), we
205+
* need to still create the nic tag at the minimum. Other
206+
* software needs to always be explicit about what MTU it
207+
* desires for the network (which has a much lower minimum MTU).
208+
*/
209+
mtu = Math.max(constants.OVERLAY_MTU, constants.MTU_NICTAG_MIN);
199210
initNicTag(opts.app, log, {
200211
name: constants.OVERLAY_TAG,
201-
mtu: constants.OVERLAY_MTU
212+
mtu: mtu
202213
}, function (tagErr, tag) {
203214

204215
if (tagErr) {

0 commit comments

Comments
 (0)