A method in Field Programmable Gate Array for processing packets received
at a media gateway is provided. The method includes ascertaining whether
a received packet is a UDP (User Datagram Protocol) packet. The method
also includes comparing first portion of UDP destination port number from
UDP packet header with first portion with UDP port base that has been set
up in media gateway. If a match exist, employing second portion of UDP
destination port number as a key to UDP port table to ascertain whether
packets associated with media stream ID are to be discarded, and
discarding received packet if packet associated with media stream ID is
to be discarded. If not, obtaining media processing CPU ID associated
with media stream ID, formulating destination MAC address, and updating
packet with destination MAC address, thereby enabling packet to be
switched to media processing CPU associated with media processing CPU ID.