if you are interested, in one of my projects i also had to use uip lib on atmega328.
i have successfully reduced the uip lib to a very small footprint. (with using static ip and other hacks). i can try to find the methods i used, if you would like to take a look…
read this, maybe will help: