This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to receive ARP requests with NetCp

Hello experts,

I'm running here a C6670 DSP where I can transmit and receive ethernet packets automaticly.

But in the moment it is just possible to get data from an external host after I set there the DSP Mac address with "arp -s".

Now I would implement an arp reply to the DSP after getting an arp request.

But in the moment i didn't made it to recieve the arp request.

I tried the following:

first try:

  • setting up an second RX flow
  • add the broadcast MAC (6 times 0xff) to the PA with route to flow 1

second try:

  • setting up an second RX flow
  • ad an exception to flow 0 (receive flow) with Pa_configExceptionRoute leading the exception to the second flow

Both tries where not successful. I tried to pop to the destination queue of the second flow but nothing happens.

So now my question.

Does I need to activate Broadcast separately to recieve those packets?

Or has anyone other suggestions what to do?

Best regards Frank.

  • Hi experts,

    my project goes well so far, but now I tried to receive ethernet packets at port 0x5678 and at port 0x5679.

    For this I set up a second receive flow(with additional queues and descriptors) and added the second port via the Add_Port function. (Mac-address and IP i will get from first flow)

    The good thing is that the packets for both descriptors are arriving in the dsp.

    Not so good is, that both packets are arriving at the queue which is defined in flow 0 and not as assumed that the packet for the second packet arrives in the queue for flow 1.

    I hope that someone can help me.

    Best regards

    Frank

  • Frank,

    In response to your ARP question. Assuming that you want to forward all ARP requests (regardless of the source MAC ADDR) to a unique queue you only need to call the Pa_addMac function with the struct below ,ethertype set to 0x0806 (for the ARP ethertype). The rest is don't care.

     

    typedef struct {

    paMacAddr_t  src;  //Source MAC address

    paMacAddr_t   dst;  //destination MAC addr

    unit16_t   vlan; //VLAN tage VID field, 12 lsbs

    uint16_t  ethertype;   //ethertype field

    unit32_t  mplsTag;     

    uint16_t inport;  //input EMAC port number as specfied by the EMAC port

    } paEthInfo_t ;

     

    So, for the matchRoute you can use any flowID you want, you just need to set the queue to the unique one you want the packets to be forwarded to. If you have a separate FDQ or pool of descriptors, you can just set the flowID to the one desired. This will forward all the packets with the ARP ethertype (0x0806) to the dest queue you specified using the flow you want.

     

    For your second question, you're saying that the packets are arriving in the queue you defined only in flow 0 but not flow 1. Check your definition of that packet that it is refferring to the struct with that flow defined, not the first flow defined.

     

    Feel free to ask more questions if you need help!

    Kat

     

     

     

  • Hi Kat,

    now all is working fine thanks to your purposals.

    Now I added with the final add port(for adding additional port) or add arp request (via addMac) not only the flow to the route.

    I added also the designated destination queue.

    And now al is working fine.

    Best regards Frank

  • Hi Frank,

    Looks like you are able to receive ARP packets, I am also trying to receive ARP packets, but PA is not filtering the packets based on MAC address even though I have called Add_MacAddress() function. We are getting the response from PA.

    Looks like PA is not set up properly may be I have missed something. Would you please tell me how to go about it as I am new to this processor?

    Best Regards,

    Manjushree.