@@ -67,6 +67,7 @@ Class Of Service
struct cos_s {
queue_entry_t *queue; /* Associated Queue */
pool_entry_t *pool; /* Associated Buffer pool */
+ odp_pool_t pool_id; /* Associated pool handle */
union pmr_u *pmr; /* Chained PMR */
union cos_u *linked_cos; /* CoS linked with the PMR */
uint32_t valid; /* validity Flag */
@@ -61,6 +61,9 @@ This function calls Classifier module internal functions for a given packet and
enqueues the packet to specific Queue based on PMR and CoS selected.
**/
int packet_classifier(odp_pktio_t pktio, odp_packet_t pkt);
+
+int _odp_packet_classifier(pktio_entry_t *entry, odp_packet_t pkt);
+
/**
Packet IO classifier init
@@ -28,6 +28,8 @@ extern "C" {
#include <odp/crypto.h>
#include <odp_crypto_internal.h>
+#define PACKET_JUMBO_LEN (9 * 1024)
+
/**
* Packet input & protocol flags
*/
@@ -243,7 +245,7 @@ void packet_parse_l2(odp_packet_hdr_t *pkt_hdr);
int packet_parse_full(odp_packet_hdr_t *pkt_hdr);
/* Reset parser metadata for a new parse */
-void packet_parse_reset(odp_packet_t pkt);
+void packet_parse_reset(odp_packet_hdr_t *pkt_hdr);
/* Convert a packet handle to a buffer handle */
odp_buffer_t _odp_packet_to_buffer(odp_packet_t pkt);
@@ -251,6 +253,10 @@ odp_buffer_t _odp_packet_to_buffer(odp_packet_t pkt);
/* Convert a buffer handle to a packet handle */
odp_packet_t _odp_packet_from_buffer(odp_buffer_t buf);
+int _odp_parse_common(odp_packet_hdr_t *pkt_hdr, const uint8_t *parseptr);
+
+int _odp_cls_parse(odp_packet_hdr_t *pkt_hdr, const uint8_t *parseptr);
+
#ifdef __cplusplus
}
#endif
@@ -86,6 +86,7 @@ struct pktio_entry {
classifier_t cls; /**< classifier linked with this pktio*/
char name[PKTIO_NAME_LEN]; /**< name of pktio provided to
pktio_open() */
+ odp_pktio_t id;
odp_pktio_param_t param;
};
@@ -44,6 +44,8 @@ typedef struct {
int sockfd; /**< socket descriptor */
odp_pool_t pool; /**< pool to alloc packets from */
unsigned char if_mac[ETH_ALEN]; /**< IF eth mac addr */
+ uint8_t *cache_ptr[ODP_PACKET_SOCKET_MAX_BURST_RX];
+ odp_shm_t shm;
} pkt_sock_t;
/** packet mmap ring */
Adds linux-generic internal api's and modify internal structs to support configuring packet pool to CoS. Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> --- platform/linux-generic/include/odp_classification_datamodel.h | 1 + platform/linux-generic/include/odp_classification_internal.h | 3 +++ platform/linux-generic/include/odp_packet_internal.h | 8 +++++++- platform/linux-generic/include/odp_packet_io_internal.h | 1 + platform/linux-generic/include/odp_packet_socket.h | 2 ++ 5 files changed, 14 insertions(+), 1 deletion(-)