Caitlin Bestler wrote:
The presumption is that most callers of rdma_poll_cq want to apply transport neutral logic. This is especially easy when no specific recovery plans are in place based upon the specific error (the specific error just gets logged).
The logic surrounding the call could be transport neutral, but the data structure into the call itself cannot be. I don't think that it makes sense to provide a neutral call that requires a transport specific input parameter. To use rdma_poll_cq() in a neutral fashion, the application needs to allocate largest possible data structure, and the data structures must match in the layout of the common portions.
defining a type that can hold any of the results. The presumption is that the consumer will note the type, and if they wish to process tht type shift to a routine that casts the wc to the required matching struct.
The provider needs to perform the casts as well, such as when posting work requests.
The alternative would be to use extensivel sub-types on input, and unions for work completions. That works, but could easily be confusing to developers.
I'm not sure that's any more confusing than requiring the developer to know which data type is actually expected. It does make the data structures larger than they may need to be.
- Sean _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
