Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: davidb@eyrie.Werj.com.au (David Burren)
Subject: Re: MTU size setting
Date: 15 Jun 1994 09:33:58 +1000	[thread overview]
Message-ID: <2tlep6$om@pandion.eyrie.Werj.com.au> (raw)
In-Reply-To: rvd.2.00145C3E@rsred.rbc.cl

In <rvd.2.00145C3E@rsred.rbc.cl> rvd@rsred.rbc.cl (Roberto Valdovinos) writes:

>        I need to change the MTU size on my ethernet interface (ln0) on a 
>DECStation running Ultrix 4.3. I 'm trying out Semaphore's Encription Unit
>and I need to change my MTU size to no more than 1400 Bytes to get
>better performance. Can anyone help me out, because I haven't been
>able to find out how to change it from the default 1500.

Well, there isn't really a way to do it (not officially anyway).

But...  I recently had to wind the 4.4 fza driver back to 1500 bytes (for
a specialised network configuration I won't bother going into right now) and
can offer some advice.

	****************************************************************
	NOTE:	THIS IS NOT SUPPORTED BY DIGITAL.
		IT'S NOT EVEN SUPPORTED BY ME, SO USE AT YOUR OWN RISK.
		I DISCLAIM ALL RESPONSIBILITY IF THIS FAILS IN ANY WAY,
		INCLUDING DAMAGING YOUR EQUIPMENT!!!!
	****************************************************************

	To keep DEC support, you could open a call with DEC and try to
	convince them to recompile if_ln.o for you with a smaller MTU,
	but I don't know if that'd work for you.


In each network driver, the driver's "attach" function fills out a
struct ifnet and passes it to if_attach().  One of the fields of that
structure is if_mtu, which declares to the kernel the largest packet
that should be sent through the interface.

By making a patch to if_ln.o to change the value of if_mtu and then
recompiling your kernel you can change the MTU _of_all_"ln"_interfaces_.
You can't change only a single interface.

If you do this, you should keep a copy of the unpatched if_ln.o, and
remember that you will have to reapply the patch to any new if_ln.o issued
by DEC.

Running `dis -h if_ln.o` will generate reams of assembly code, and will
let you identify the location that needs patching.  It identifies the
function entry-point names, so look for "lnattach".  Then search for
where the value "1500" is assigned.  On one of my 4.3 systems (where
if_ln.o's checksum is 49073) I find the following:

  [../../io/netif/if_ln.c: 540] 0xe74:  240b05dc        li      r11,1500

Note that this is the only place that the value 1500 is used within
lnattach() and thus we have a good probability of this working...

What you then need to do is change the 05dc (1500) to 0578 (1400).
Under 4.3 you'll have to find your own way to do this.

With version 3 of dbx (which comes with Ultrix 4.3A and 4.4) the "patch"
command is supported:

	# cp if_ln.o if_ln.o.1500
	# dbx if_ln.o
	dbx version 3.0.1
	Type 'help' for help.
	reading symbolic information ...

	"main" is not defined
	(dbx) patch 0xe74=0x240b0578
	  [lnattach:540, 0xe74]         li      r11,1400
	(dbx) quit
	#

Unfortunately the earlier dbx versions don't have a patch command...
If you have a 4.3A or 4.4 machine available, you can send the file there
to be patched.  Otherwise you might use some 8-bit editor like emacs or nvi.
Or in a last-ditch case you can use dd, but that's tedious.

I hope this helps, and remember: if anything breaks - you've been warned.

- David Burren
  Werj Consultants
  davidb@werj.com.au


  reply	other threads:[~1994-06-14 23:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-06-11  2:21 MTU size setting Roberto Valdovinos
1994-06-14 23:33 ` David Burren [this message]
1994-06-15 14:46   ` Megan
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox