[Ns-bugs] [Bug 189] CSMA device receives all packets it sends

bugzilla-daemon@nsnam-www.ece.gatech.edu bugzilla-daemon at nsnam-www.ece.gatech.edu
Fri May 30 16:57:54 PDT 2008


http://www.nsnam.org/bugzilla/show_bug.cgi?id=189





------- Comment #9 from craigdo at ee.washington.edu  2008-05-30 19:57 -------
>> Well, you have to increment a reference count and then decrement it.

> no, you have to call Packet::Copy which performs a heap allocation.

This is descending into esoterica a little, but okay, you allocate a smart
pointer with reference count of 1 to hold the reference to the underlying
buffer, the count of which which is incremented and then eventually decremented
when the smart pointer reference is decremented and finally the smart pointer
is deleted.  Right?  I was trying to make the point that this isn't a
copy-the-whole-packet operation, it's logically a reference counting operation.

Anyway, this operation currently happens for all N of the N devices on the
channel; putting the source filtering in the channel would allow us to do this
(N-1) times at the cost of putting the filtering in a strange (IMO) place.

I lean toward implementing the filtering in the place where it would normally
(in the real world) go and not in a place that normally has nothing but copper
atoms ;-)

If you can make a case that this has a big performance impact I might be
convinced to do what I think is unusual thing in furtherance of speed.  I might
also suggest that adding filtering to the device will have negligable
performance impact since the copy already happens and I'm just adding a
compare.  Perhaps more impact could be made performance-wise by speeding up all
N packet operations here and in all other devices with a packet cache to remove
the new/delete if we are concerned about the issue.


-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Ns-bugs mailing list