-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing retrieval of original mbuf in ToDPDKDevice. #7
Conversation
With respect to the original patch, I added a defensive assertion so that if (it is compiled with assertions enabled and) the assumption turns out to be wrong it doesnt segfault. |
Thought of a problem just in time... If the packet is shared and we have the clone, the destructor argument is not set, only the destructor argument of the p->data_packet()... Is using mbuf = (struct rte_mbuf *) (p->buffer() - sizeof(struct rte_mbuf)); really a problem? It should be constant... |
I also thought of this possibility, but it appears to me the current implementation of Yes, |
Mhh yes, only the _destructor is resetted to 0 in clone() just after the memcpy, I thought it was both... That's at least the less unclean for now. Thanks ! |
Fixing retrieval of original mbuf in ToDPDKDevice.
No the assert is enough, if not too much already... This is in a very fast path, called for every packet. At 40G every instruction counts... We should just think it through, rely on tests, and have the fewer runtime test as possible.... |
Indeed, I figured copiling for performance would require |
Never used it. Does it change a lot? Disabling all assert is not a good idea either. Some are needed to prevent mis-configuration from the user. In our present case, I meant it is possible to completely think of all cases, go through all possible changes of in _destructor_argument, and be sure that the code is correct and we can rely on destructor_argument() without asserting after. But there is some assert in some place which check for example that the ip header is set, and that only relies on the user having placed a MarkIPHeader or CheckIPHeader before... |
* EnsureDPDKBuffer: handle Packet::make errors gracefully * Fix previous commit * Correct fix...
Closes #6