Donovan
as of your suggestion we have done the following changes

The API calls, in DNA mode, return the following errors:

#define GENERIC_DNA_ERROR      -1
#define END_OF_DEMO_MODE       -2
#define NO_TX_SLOT_AVAILABLE   -3

So if you get -3 from the send function you know that you are sending faster 
than the NIC can send or the receiver can receive. In fact ethernet is a 
point-to-point communication, thus in case of fast senders the receiver sends 
back ethernet pause frames for slowing down the sender. This means that a slow 
receiver can slow down a fast sender

Cheers Luca


On Oct 19, 2011, at 6:52 PM, Don Provan wrote:

> In general, I'd like to see pfring routines return an errno.
> That often helps in debugging any issues, particularly in
> cases such as the DNA library where I can't go in and look
> at the code. pfring_send() is a particular problem because
> there's no way for the calling code to distinguish "you screwed
> up" from "everything's fine, you just need to try again later".
> -don
> 
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Luca Deri
> Sent: Wednesday, October 19, 2011 1:39 AM
> To: [email protected]
> Cc: <[email protected]>
> Subject: Re: [Ntop-misc] Using DNA devices,pfring_send() sometimes fails
> to a ring that's also receiving
> 
> Don
> Would that help if we would return a different value for "no slot
> available" ?
> 
> Regards Luca
> 
> Sent from my iPad
> 
> On 19/ott/2011, at 01:58, "Don Provan" <[email protected]> wrote:
> 
>>> pfring_send() returns -1 when there are no slots available in the TX
>> ring
>> 
>> OK, thanks. It's good to know that's the only possible failure.
>> Of course, it also return -1 when there's no send dispatch point,
>> but I knew that wasn't the case. What happens within the DNA
>> send routine was out of my vision.
>> 
>>> No, it's just a possible design choice
>> 
>> I'll keep it in mind.
>> -don
>> _______________________________________________
>> Ntop-misc mailing list
>> [email protected]
>> http://listgateway.unipi.it/mailman/listinfo/ntop-misc
> _______________________________________________
> Ntop-misc mailing list
> [email protected]
> http://listgateway.unipi.it/mailman/listinfo/ntop-misc
> _______________________________________________
> Ntop-misc mailing list
> [email protected]
> http://listgateway.unipi.it/mailman/listinfo/ntop-misc

---
We can't solve problems by using the same kind of thinking we used when we 
created them - Albert Einstein

_______________________________________________
Ntop-misc mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-misc

Reply via email to