On 9/22/2017 11:38 AM, santosh wrote:
In general api comment: Fix missing param definition like *service_id* above
and pl. remove other unnecessary params description from api above.
OK.
+static inline int
+valid_id(uint8_t id)
+{
+ return id < RTE_MAX_EVENT_ETH_RX_ADAPTER_INSTANCE;
+}
+
+#define RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(id, retval) do { \
+ if (!valid_id(id)) { \
+ RTE_EDEV_LOG_ERR("Invalid eth Rx adapter id = %d\n", id); \
+ return retval; \
+ } \
+} while (0)
+
Worth, moving this macro to rte_eventdev_pmd.h
Or How about reusing existing one ie.. RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET? >
I didn't see a reason for this macro to be used elsewhere apart from
rte_event_eth_rx_adapter.c.
Also, the check is different from the one in
RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET.
+
+static inline void
+mtoip(struct rte_mbuf *m, struct ipv4_hdr **ipv4_hdr,
+ struct ipv6_hdr **ipv6_hdr)
+{
mtoip(), imo is more of global api, likely other modules may use in future..
perhaps move to rte_io.h Or more correct place.. thought?
Good suggestion, Will post a separate patch for this in the future.
Nikhil