40-Gb/s optical packet label recognition, switching, and buffering using an optoelectronic logic module and a waveguide matrix optical switch module are demonstrated. The switch can achieve a high ON/OFF extinction ratio of 25-26 dB and a first switching time of less than 2 ns.