This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, api-next has been updated via e420668cd3886f003c8bd6022e210bf08a0ee3b5 (commit) via bb3400df72401d88aa8e79fb0244a2b90f3bd138 (commit) via 2bbf95311cb8136b7e769deda6254a9e9b26250b (commit) via 4ce95649367da9edd140ba9c25daaaf292edf883 (commit) via 03aa7c3572865dc03df1cf8c33b969ca4b17c7e8 (commit) via dca4f5bd8218f30a593f6fb37c060de41d1ca9b1 (commit) via 5a6d8798bc436fa3a7e90fcf105362eabb21db0c (commit) via cd15a2125781f4eefdab1f765999a59504fb2939 (commit) via 757439849936bb76885f27677fc8997a67fa2a3c (commit) via 92ad20c03bf4737558265a1ff942666d7c4ec3d8 (commit) via fd2ca1209dc19c8e8199ee556ad2c9a786eabf78 (commit) from 2394317ab247fa14b4e239aec512afee7eac4524 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit e420668cd3886f003c8bd6022e210bf08a0ee3b5 Merge: 2394317a bb3400df Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Tue Aug 8 17:04:12 2017 +0300
Merge branch 'master' into api-next
diff --cc platform/linux-generic/include/odp_classification_internal.h index aca8e8c6,369636d5..208b0f5b --- a/platform/linux-generic/include/odp_classification_internal.h +++ b/platform/linux-generic/include/odp_classification_internal.h @@@ -59,91 -49,14 +49,12 @@@ This function should be called during p **/ int pktio_classifier_init(pktio_entry_t *pktio);
- /** - @internal - match_pmr_cos - - Match a PMR chain with a Packet and return matching CoS - This function gets called recursively to check the chained PMR Term value - with the packet. - - **/ - cos_t *match_pmr_cos(cos_t *cos, const uint8_t *pkt_addr, pmr_t *pmr, - odp_packet_hdr_t *hdr); --/** --@internal - CoS associated with L3 QoS value - - This function returns the CoS associated with L3 QoS value - **/ - cos_t *match_qos_l3_cos(pmr_l3_cos_t *l3_cos, const uint8_t *pkt_addr, - odp_packet_hdr_t *hdr); - -Flow Signature Calculation +void _odp_cls_update_hash_proto(cos_t *cos, + odp_pktin_hash_proto_t hash_proto);
- /** - @internal - CoS associated with L2 QoS value - - This function returns the CoS associated with L2 QoS value - **/ - cos_t *match_qos_l2_cos(pmr_l2_cos_t *l2_cos, const uint8_t *pkt_addr, - odp_packet_hdr_t *hdr); - /** - @internal - Flow Signature Calculation - --This function calculates the Flow Signature for a packet based on --CoS and updates in Packet Meta Data --**/ --int update_flow_signature(uint8_t *pkt_addr, cos_t *cos); - - /** - @internal - Allocate a odp_pmr_t Handle - */ - odp_pmr_t alloc_pmr(pmr_t **pmr); - - /** - @internal - Pointer to pmr_t Handle - This function checks for validity of odp_pmr_t Handle - */ - pmr_t *get_pmr_entry(odp_pmr_t pmr_id); - - /** - @internal - Pointer to pmr_t Handle - */ - pmr_t *get_pmr_entry_internal(odp_pmr_t pmr_id); - - /** - @internal - Pointer to odp_cos_t Handle - */ - cos_t *get_cos_entry(odp_cos_t cos_id); - - /** - @internal - Pointer to odp_cos_t Handle - This function checks for validity of odp_cos_t Handle - */ - cos_t *get_cos_entry_internal(odp_cos_t cos_id); - - /** - @internal - Verify PMR with a Packet - - This function goes through each PMR_TERM value in pmr_t structure and - calls verification function for each term.Returns 1 if PMR matches or 0 - Otherwise. - **/ - int verify_pmr(pmr_t *pmr, const uint8_t *pkt_addr, odp_packet_hdr_t *pkt_hdr); - +uint32_t packet_rss_hash(odp_packet_hdr_t *pkt_hdr, + odp_cls_hash_proto_t hash_proto, + const uint8_t *base);
#ifdef __cplusplus } diff --cc platform/linux-generic/odp_classification.c index 5a76aa5e,5e9173dc..f9a82a2e --- a/platform/linux-generic/odp_classification.c +++ b/platform/linux-generic/odp_classification.c @@@ -31,18 -30,8 +31,19 @@@
static cos_tbl_t *cos_tbl; static pmr_tbl_t *pmr_tbl; +static _cls_queue_grp_tbl_t *queue_grp_tbl; + +const rss_key default_rss = { + .u8 = { + 0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2, + 0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0, + 0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, 0x30, 0xb4, + 0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c, + 0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa, + } +};
+ static cos_t *get_cos_entry_internal(odp_cos_t cos_id) { return &cos_tbl->cos_entry[_odp_typeval(cos_id)]; @@@ -293,9 -226,10 +299,10 @@@ odp_pmr_t alloc_pmr(pmr_t **pmr return ODP_PMR_INVAL; }
+ static cos_t *get_cos_entry(odp_cos_t cos_id) { - if (_odp_typeval(cos_id) >= ODP_COS_MAX_ENTRY || + if (_odp_typeval(cos_id) >= CLS_COS_MAX_ENTRY || cos_id == ODP_COS_INVALID) return NULL; if (cos_tbl->cos_entry[_odp_typeval(cos_id)].s.valid == 0) @@@ -303,9 -237,10 +310,10 @@@ return &cos_tbl->cos_entry[_odp_typeval(cos_id)]; }
+ static pmr_t *get_pmr_entry(odp_pmr_t pmr_id) { - if (_odp_typeval(pmr_id) >= ODP_PMR_MAX_ENTRY || + if (_odp_typeval(pmr_id) >= CLS_PMR_MAX_ENTRY || pmr_id == ODP_PMR_INVAL) return NULL; if (pmr_tbl->pmr[_odp_typeval(pmr_id)].s.valid == 0) @@@ -966,74 -871,7 +989,75 @@@ int cls_classify_packet(pktio_entry_t * return 0; }
+uint32_t packet_rss_hash(odp_packet_hdr_t *pkt_hdr, + odp_cls_hash_proto_t hash_proto, + const uint8_t *base) +{ + thash_tuple_t tuple; + const _odp_ipv4hdr_t *ipv4; + const _odp_udphdr_t *udp; + const _odp_tcphdr_t *tcp; + const _odp_ipv6hdr_t *ipv6; + uint32_t hash; + uint32_t tuple_len; + + tuple_len = 0; + hash = 0; + if (pkt_hdr->p.input_flags.ipv4) { + if (hash_proto.ipv4) { + /* add ipv4 */ + ipv4 = (const _odp_ipv4hdr_t *)base + + pkt_hdr->p.l3_offset; + tuple.v4.src_addr = ipv4->src_addr; + tuple.v4.dst_addr = ipv4->dst_addr; + tuple_len += 2; + } + + if (pkt_hdr->p.input_flags.tcp && hash_proto.tcp) { + /* add tcp */ + tcp = (const _odp_tcphdr_t *)base + + pkt_hdr->p.l4_offset; + tuple.v4.sport = tcp->src_port; + tuple.v4.dport = tcp->dst_port; + tuple_len += 1; + } else if (pkt_hdr->p.input_flags.udp && hash_proto.udp) { + /* add udp */ + udp = (const _odp_udphdr_t *)base + + pkt_hdr->p.l4_offset; + tuple.v4.sport = udp->src_port; + tuple.v4.dport = udp->dst_port; + tuple_len += 1; + } + } else if (pkt_hdr->p.input_flags.ipv6) { + if (hash_proto.ipv6) { + /* add ipv6 */ + ipv6 = (const _odp_ipv6hdr_t *)base + + pkt_hdr->p.l3_offset; + thash_load_ipv6_addr(ipv6, &tuple); + tuple_len += 8; + } + if (pkt_hdr->p.input_flags.tcp && hash_proto.tcp) { + tcp = (const _odp_tcphdr_t *)base + + pkt_hdr->p.l4_offset; + tuple.v4.sport = tcp->src_port; + tuple.v4.dport = tcp->dst_port; + tuple_len += 1; + } else if (pkt_hdr->p.input_flags.udp && hash_proto.udp) { + /* add udp */ + udp = (const _odp_udphdr_t *)base + + pkt_hdr->p.l4_offset; + tuple.v4.sport = udp->src_port; + tuple.v4.dport = udp->dst_port; + tuple_len += 1; + } + } + if (tuple_len) + hash = thash_softrss((uint32_t *)&tuple, + tuple_len, default_rss); + return hash; +} + + static cos_t *match_qos_l3_cos(pmr_l3_cos_t *l3_cos, const uint8_t *pkt_addr, odp_packet_hdr_t *hdr) {
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/_fdserver.c | 2 +- .../linux-generic/include/odp_buffer_internal.h | 4 - .../include/odp_classification_internal.h | 89 ---------------------- .../linux-generic/include/odp_packet_io_internal.h | 13 ---- .../linux-generic/include/odp_queue_internal.h | 5 -- platform/linux-generic/include/odp_schedule_if.h | 1 - platform/linux-generic/odp_classification.c | 31 ++++++++ platform/linux-generic/odp_packet_io.c | 28 +++---- platform/linux-generic/odp_pool.c | 13 ---- platform/linux-generic/odp_queue.c | 14 +--- platform/linux-generic/odp_schedule.c | 10 +-- platform/linux-generic/odp_schedule_iquery.c | 10 +-- 12 files changed, 56 insertions(+), 164 deletions(-)
hooks/post-receive