FPGARelated.com
Forums

How to drop a Ethernet Packet in Xilinx EMAC

Started by Venu April 26, 2007
Hi,

I am using a Xilinx Ethernet MAC core on the OPB Bus. I would like to
know how to drop an ethernet packet.

I read the Length FIFO in the MAC to get the length of the packet that
has been recieved. On the basis of the length and the time at which it
has been recieved , now I decide whether the bus bandwidth is
sufficient for me to transfer the packet out of the Recieve FIFO into
a memory. If the bandwidth is not sufficient I have to drop the
packet.

The problem is that to drop the packet I have to remove the MAC
recieve FIFO. To clear the FIFO I have to read the FIFO ( for as many
times as the length of the recieved data) . But this approach uses up
Bus Bandwidth , the very reason why I decided to drop the packet.

The other option that I can think of is to write into the Read Packet
FIFO Reset Register. But this just has the drawback that if I recieve
lots of packets in a burst , then I will drop all of them.

Any advice would be greatly appreciated

Thank You
Venu

On Apr 26, 1:21 am, Venu <get2v...@gmail.com> wrote:
> Hi, > > I am using a Xilinx Ethernet MAC core on the OPB Bus. I would like to > know how to drop an ethernet packet. > > I read the Length FIFO in the MAC to get the length of the packet that > has been recieved. On the basis of the length and the time at which it > has been recieved , now I decide whether the bus bandwidth is > sufficient for me to transfer the packet out of the Recieve FIFO into > a memory. If the bandwidth is not sufficient I have to drop the > packet. > > The problem is that to drop the packet I have to remove the MAC > recieve FIFO. To clear the FIFO I have to read the FIFO ( for as many > times as the length of the recieved data) . But this approach uses up > Bus Bandwidth , the very reason why I decided to drop the packet. > > The other option that I can think of is to write into the Read Packet > FIFO Reset Register. But this just has the drawback that if I recieve > lots of packets in a burst , then I will drop all of them. > > Any advice would be greatly appreciated > > Thank You > Venu
Perhaps one could insert a custom block between the OPB bus and the ethernet MAC that could drain the FIFO the desired amount upon command without tying up the OPB bus. -Newman