X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fsoftnic%2Frte_eth_softnic_pipeline.c;h=337aa32e574cceb2581a5179fbf078ed0989e2f5;hb=c9d9825bea486d4490a02ce2c5672c5a16891fab;hp=5e180f8f70c3bd86a7d0ba1c52122142b285fb9a;hpb=e0e52c7c2975f3815c248b3d3a91b466b382a804;p=dpdk.git diff --git a/drivers/net/softnic/rte_eth_softnic_pipeline.c b/drivers/net/softnic/rte_eth_softnic_pipeline.c index 5e180f8f70..337aa32e57 100644 --- a/drivers/net/softnic/rte_eth_softnic_pipeline.c +++ b/drivers/net/softnic/rte_eth_softnic_pipeline.c @@ -108,6 +108,19 @@ softnic_pipeline_disable_all(struct pmd_internals *p) pipeline->name); } +uint32_t +softnic_pipeline_thread_count(struct pmd_internals *p, uint32_t thread_id) +{ + struct pipeline *pipeline; + uint32_t count = 0; + + TAILQ_FOREACH(pipeline, &p->pipeline_list, node) + if ((pipeline->enabled) && (pipeline->thread_id == thread_id)) + count++; + + return count; +} + struct pipeline * softnic_pipeline_find(struct pmd_internals *p, const char *name) @@ -647,7 +660,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv4[] = { .size = sizeof(uint8_t), .field_index = 0, .input_index = 0, - .offset = offsetof(struct ipv4_hdr, next_proto_id), + .offset = offsetof(struct rte_ipv4_hdr, next_proto_id), }, /* Source IP address (IPv4) */ @@ -656,7 +669,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv4[] = { .size = sizeof(uint32_t), .field_index = 1, .input_index = 1, - .offset = offsetof(struct ipv4_hdr, src_addr), + .offset = offsetof(struct rte_ipv4_hdr, src_addr), }, /* Destination IP address (IPv4) */ @@ -665,7 +678,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv4[] = { .size = sizeof(uint32_t), .field_index = 2, .input_index = 2, - .offset = offsetof(struct ipv4_hdr, dst_addr), + .offset = offsetof(struct rte_ipv4_hdr, dst_addr), }, /* Source Port */ @@ -674,8 +687,8 @@ static const struct rte_acl_field_def table_acl_field_format_ipv4[] = { .size = sizeof(uint16_t), .field_index = 3, .input_index = 3, - .offset = sizeof(struct ipv4_hdr) + - offsetof(struct tcp_hdr, src_port), + .offset = sizeof(struct rte_ipv4_hdr) + + offsetof(struct rte_tcp_hdr, src_port), }, /* Destination Port */ @@ -684,8 +697,8 @@ static const struct rte_acl_field_def table_acl_field_format_ipv4[] = { .size = sizeof(uint16_t), .field_index = 4, .input_index = 3, - .offset = sizeof(struct ipv4_hdr) + - offsetof(struct tcp_hdr, dst_port), + .offset = sizeof(struct rte_ipv4_hdr) + + offsetof(struct rte_tcp_hdr, dst_port), }, }; @@ -696,7 +709,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv6[] = { .size = sizeof(uint8_t), .field_index = 0, .input_index = 0, - .offset = offsetof(struct ipv6_hdr, proto), + .offset = offsetof(struct rte_ipv6_hdr, proto), }, /* Source IP address (IPv6) */ @@ -705,7 +718,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv6[] = { .size = sizeof(uint32_t), .field_index = 1, .input_index = 1, - .offset = offsetof(struct ipv6_hdr, src_addr[0]), + .offset = offsetof(struct rte_ipv6_hdr, src_addr[0]), }, [2] = { @@ -713,7 +726,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv6[] = { .size = sizeof(uint32_t), .field_index = 2, .input_index = 2, - .offset = offsetof(struct ipv6_hdr, src_addr[4]), + .offset = offsetof(struct rte_ipv6_hdr, src_addr[4]), }, [3] = { @@ -721,7 +734,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv6[] = { .size = sizeof(uint32_t), .field_index = 3, .input_index = 3, - .offset = offsetof(struct ipv6_hdr, src_addr[8]), + .offset = offsetof(struct rte_ipv6_hdr, src_addr[8]), }, [4] = { @@ -729,7 +742,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv6[] = { .size = sizeof(uint32_t), .field_index = 4, .input_index = 4, - .offset = offsetof(struct ipv6_hdr, src_addr[12]), + .offset = offsetof(struct rte_ipv6_hdr, src_addr[12]), }, /* Destination IP address (IPv6) */ @@ -738,7 +751,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv6[] = { .size = sizeof(uint32_t), .field_index = 5, .input_index = 5, - .offset = offsetof(struct ipv6_hdr, dst_addr[0]), + .offset = offsetof(struct rte_ipv6_hdr, dst_addr[0]), }, [6] = { @@ -746,7 +759,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv6[] = { .size = sizeof(uint32_t), .field_index = 6, .input_index = 6, - .offset = offsetof(struct ipv6_hdr, dst_addr[4]), + .offset = offsetof(struct rte_ipv6_hdr, dst_addr[4]), }, [7] = { @@ -754,7 +767,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv6[] = { .size = sizeof(uint32_t), .field_index = 7, .input_index = 7, - .offset = offsetof(struct ipv6_hdr, dst_addr[8]), + .offset = offsetof(struct rte_ipv6_hdr, dst_addr[8]), }, [8] = { @@ -762,7 +775,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv6[] = { .size = sizeof(uint32_t), .field_index = 8, .input_index = 8, - .offset = offsetof(struct ipv6_hdr, dst_addr[12]), + .offset = offsetof(struct rte_ipv6_hdr, dst_addr[12]), }, /* Source Port */ @@ -771,8 +784,8 @@ static const struct rte_acl_field_def table_acl_field_format_ipv6[] = { .size = sizeof(uint16_t), .field_index = 9, .input_index = 9, - .offset = sizeof(struct ipv6_hdr) + - offsetof(struct tcp_hdr, src_port), + .offset = sizeof(struct rte_ipv6_hdr) + + offsetof(struct rte_tcp_hdr, src_port), }, /* Destination Port */ @@ -781,8 +794,8 @@ static const struct rte_acl_field_def table_acl_field_format_ipv6[] = { .size = sizeof(uint16_t), .field_index = 10, .input_index = 9, - .offset = sizeof(struct ipv6_hdr) + - offsetof(struct tcp_hdr, dst_port), + .offset = sizeof(struct rte_ipv6_hdr) + + offsetof(struct rte_tcp_hdr, dst_port), }, };