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 9ff682c8d0315f3f1921d5b9fe13d62897c78710 (commit) via 1ae234f54c17374997a89e5858f9e0d7855f8cf0 (commit) via 58bc37399f6bdb2426bf2eb6ba4eee6791a9c8a4 (commit) via 9b3a29ddb261d2b030a7806933787aaaee497aab (commit) via a57dc0bce7aab4600548096dd358e88ca2f4fe1c (commit) from a1312ccf383637b5711c0f8c4bab6f43e63325dc (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 9ff682c8d0315f3f1921d5b9fe13d62897c78710 Author: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Date: Wed Nov 8 20:45:46 2017 +0300
linux-gen: crypto: drop DES-CBC support
DES-CBC (not 3DES-CBC) support is invalid (DES should use 8 bytes key, not 24 bytes), it is not covered by testsuite and DES is cracable/deprecated/etc since long ago. Stop providing single-key DES support. In case one really needs it, it can be emulated through supplying same key triple times to 3DES-CBC.
Signed-off-by: Dmitry Eremin-Solenikov dmitry.ereminsolenikov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index 47816279..9ebbe552 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -25,7 +25,6 @@ #include <string.h> #include <stdlib.h>
-#include <openssl/des.h> #include <openssl/rand.h> #include <openssl/hmac.h> #include <openssl/evp.h> @@ -40,9 +39,6 @@ static const odp_crypto_cipher_capability_t cipher_capa_null[] = { {.key_len = 0, .iv_len = 0} };
-static const odp_crypto_cipher_capability_t cipher_capa_des[] = { -{.key_len = 24, .iv_len = 8} }; - static const odp_crypto_cipher_capability_t cipher_capa_trides_cbc[] = { {.key_len = 24, .iv_len = 8} };
@@ -589,7 +585,6 @@ int odp_crypto_capability(odp_crypto_capability_t *capa) memset(capa, 0, sizeof(odp_crypto_capability_t));
capa->ciphers.bit.null = 1; - capa->ciphers.bit.des = 1; capa->ciphers.bit.trides_cbc = 1; capa->ciphers.bit.aes_cbc = 1; capa->ciphers.bit.aes_gcm = 1; @@ -627,10 +622,6 @@ int odp_crypto_cipher_capability(odp_cipher_alg_t cipher, src = cipher_capa_null; num = sizeof(cipher_capa_null) / size; break; - case ODP_CIPHER_ALG_DES: - src = cipher_capa_des; - num = sizeof(cipher_capa_des) / size; - break; case ODP_CIPHER_ALG_3DES_CBC: src = cipher_capa_trides_cbc; num = sizeof(cipher_capa_trides_cbc) / size; @@ -741,7 +732,6 @@ odp_crypto_session_create(odp_crypto_session_param_t *param, session->cipher.func = null_crypto_routine; rc = 0; break; - case ODP_CIPHER_ALG_DES: case ODP_CIPHER_ALG_3DES_CBC: rc = process_cipher_param(session, EVP_des_ede3_cbc()); break;
commit 1ae234f54c17374997a89e5858f9e0d7855f8cf0 Author: Bogdan Pricope bogdan.pricope@linaro.org Date: Thu Nov 2 12:25:14 2017 +0200
example: generator: use L3/L4 checksum validation status functions
Update odp_generator example application to use L3/L4 checksum validation status functions.
Signed-off-by: Bogdan Pricope bogdan.pricope@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c index 771bd1a2..912fe7e9 100644 --- a/example/generator/odp_generator.c +++ b/example/generator/odp_generator.c @@ -784,15 +784,13 @@ static void print_pkts(int thr, odp_packet_t pkt_tbl[], unsigned len) static int gen_recv_thread(void *arg) { int thr; - thread_args_t *thr_args; odp_packet_t pkts[MAX_RX_BURST], pkt; odp_event_t events[MAX_RX_BURST]; int pkt_cnt, ev_cnt, i; - interface_t *itfs, *itf; + odp_packet_chksum_status_t csum_status;
+ (void)arg; thr = odp_thread_id(); - thr_args = (thread_args_t *)arg; - itfs = thr_args->rx.ifs;
printf(" [%02i] created mode: RECEIVE\n", thr); odp_barrier_wait(&barrier); @@ -811,21 +809,14 @@ static int gen_recv_thread(void *arg) continue; for (i = 0, pkt_cnt = 0; i < ev_cnt; i++) { pkt = odp_packet_from_event(events[i]); - itf = &itfs[odp_pktio_index(odp_packet_input(pkt))];
- if (odp_packet_has_ipv4(pkt)) { - if (itf->config.pktin.bit.ipv4_chksum) { - if (odp_packet_has_l3_error(pkt)) - printf("HW detected L3 error\n"); - } - } + csum_status = odp_packet_l3_chksum_status(pkt); + if (csum_status == ODP_PACKET_CHKSUM_BAD) + printf("L3 checksum error detected.\n");
- if (odp_packet_has_udp(pkt)) { - if (itf->config.pktin.bit.udp_chksum) { - if (odp_packet_has_l4_error(pkt)) - printf("HW detected L4 error\n"); - } - } + csum_status = odp_packet_l4_chksum_status(pkt); + if (csum_status == ODP_PACKET_CHKSUM_BAD) + printf("L4 checksum error detected.\n");
/* Drop packets with errors */ if (odp_unlikely(odp_packet_has_error(pkt))) {
commit 58bc37399f6bdb2426bf2eb6ba4eee6791a9c8a4 Author: Bogdan Pricope bogdan.pricope@linaro.org Date: Thu Nov 2 11:49:53 2017 +0200
linux-gen: pktio: dpdk: set L3/L4 checksum validation flags
L3/L4 checksum validation flags are used to report L3/L4 checksum check status for the incoming packets.
Signed-off-by: Bogdan Pricope bogdan.pricope@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c index 9782d60c..764ed37d 100644 --- a/platform/linux-generic/pktio/dpdk.c +++ b/platform/linux-generic/pktio/dpdk.c @@ -337,9 +337,9 @@ static struct rte_mempool_ops ops_stack = {
MEMPOOL_REGISTER_OPS(ops_stack);
-#define HAS_IP4_CSUM_FLAG(m, f) ((m->ol_flags & PKT_RX_IP_CKSUM_MASK) == f) +#define IP4_CSUM_RESULT(m) (m->ol_flags & PKT_RX_IP_CKSUM_MASK) +#define L4_CSUM_RESULT(m) (m->ol_flags & PKT_RX_L4_CKSUM_MASK) #define HAS_L4_PROTO(m, proto) ((m->packet_type & RTE_PTYPE_L4_MASK) == proto) -#define HAS_L4_CSUM_FLAG(m, f) ((m->ol_flags & PKT_RX_L4_CKSUM_MASK) == f)
#define PKTIN_CSUM_BITS 0x1C
@@ -347,29 +347,52 @@ static inline int pkt_set_ol_rx(odp_pktin_config_opt_t *pktin_cfg, odp_packet_hdr_t *pkt_hdr, struct rte_mbuf *mbuf) { + uint64_t packet_csum_result; + if (pktin_cfg->bit.ipv4_chksum && - RTE_ETH_IS_IPV4_HDR(mbuf->packet_type) && - HAS_IP4_CSUM_FLAG(mbuf, PKT_RX_IP_CKSUM_BAD)) { - if (pktin_cfg->bit.drop_ipv4_err) - return -1; + RTE_ETH_IS_IPV4_HDR(mbuf->packet_type)) { + packet_csum_result = IP4_CSUM_RESULT(mbuf); + + if (packet_csum_result == PKT_RX_IP_CKSUM_GOOD) { + pkt_hdr->p.input_flags.l3_chksum_done = 1; + } else if (packet_csum_result != PKT_RX_IP_CKSUM_UNKNOWN) { + if (pktin_cfg->bit.drop_ipv4_err) + return -1;
- pkt_hdr->p.error_flags.ip_err = 1; + pkt_hdr->p.input_flags.l3_chksum_done = 1; + pkt_hdr->p.error_flags.ip_err = 1; + pkt_hdr->p.error_flags.l3_chksum = 1; + } }
if (pktin_cfg->bit.udp_chksum && - HAS_L4_PROTO(mbuf, RTE_PTYPE_L4_UDP) && - HAS_L4_CSUM_FLAG(mbuf, PKT_RX_L4_CKSUM_BAD)) { - if (pktin_cfg->bit.drop_udp_err) - return -1; + HAS_L4_PROTO(mbuf, RTE_PTYPE_L4_UDP)) { + packet_csum_result = L4_CSUM_RESULT(mbuf);
- pkt_hdr->p.error_flags.udp_err = 1; + if (packet_csum_result == PKT_RX_L4_CKSUM_GOOD) { + pkt_hdr->p.input_flags.l4_chksum_done = 1; + } else if (packet_csum_result != PKT_RX_L4_CKSUM_UNKNOWN) { + if (pktin_cfg->bit.drop_udp_err) + return -1; + + pkt_hdr->p.input_flags.l4_chksum_done = 1; + pkt_hdr->p.error_flags.udp_err = 1; + pkt_hdr->p.error_flags.l4_chksum = 1; + } } else if (pktin_cfg->bit.tcp_chksum && - HAS_L4_PROTO(mbuf, RTE_PTYPE_L4_TCP) && - HAS_L4_CSUM_FLAG(mbuf, PKT_RX_L4_CKSUM_BAD)) { - if (pktin_cfg->bit.drop_tcp_err) - return -1; + HAS_L4_PROTO(mbuf, RTE_PTYPE_L4_TCP)) { + packet_csum_result = L4_CSUM_RESULT(mbuf);
- pkt_hdr->p.error_flags.tcp_err = 1; + if (packet_csum_result == PKT_RX_L4_CKSUM_GOOD) { + pkt_hdr->p.input_flags.l4_chksum_done = 1; + } else if (packet_csum_result != PKT_RX_L4_CKSUM_UNKNOWN) { + if (pktin_cfg->bit.drop_tcp_err) + return -1; + + pkt_hdr->p.input_flags.l4_chksum_done = 1; + pkt_hdr->p.error_flags.tcp_err = 1; + pkt_hdr->p.error_flags.l4_chksum = 1; + } }
return 0;
commit 9b3a29ddb261d2b030a7806933787aaaee497aab Author: Bogdan Pricope bogdan.pricope@linaro.org Date: Thu Nov 2 10:23:52 2017 +0200
linux-gen: packet: implement checksum validation status functions
Checksum validation status functions return the status of the latest checksum check done for the packet based on packet input flags and packet error flags.
Signed-off-by: Bogdan Pricope bogdan.pricope@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 74e3ff2b..61162932 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -1292,6 +1292,32 @@ uint16_t odp_packet_ones_comp(odp_packet_t pkt, odp_packet_data_range_t *range) return 0; }
+odp_packet_chksum_status_t odp_packet_l3_chksum_status(odp_packet_t pkt) +{ + odp_packet_hdr_t *pkt_hdr = packet_hdr(pkt); + + if (!pkt_hdr->p.input_flags.l3_chksum_done) + return ODP_PACKET_CHKSUM_UNKNOWN; + + if (pkt_hdr->p.error_flags.l3_chksum) + return ODP_PACKET_CHKSUM_BAD; + + return ODP_PACKET_CHKSUM_OK; +} + +odp_packet_chksum_status_t odp_packet_l4_chksum_status(odp_packet_t pkt) +{ + odp_packet_hdr_t *pkt_hdr = packet_hdr(pkt); + + if (!pkt_hdr->p.input_flags.l4_chksum_done) + return ODP_PACKET_CHKSUM_UNKNOWN; + + if (pkt_hdr->p.error_flags.l4_chksum) + return ODP_PACKET_CHKSUM_BAD; + + return ODP_PACKET_CHKSUM_OK; +} + void odp_packet_flow_hash_set(odp_packet_t pkt, uint32_t flow_hash) { odp_packet_hdr_t *pkt_hdr = packet_hdr(pkt);
commit a57dc0bce7aab4600548096dd358e88ca2f4fe1c Author: Bogdan Pricope bogdan.pricope@linaro.org Date: Thu Nov 2 10:02:31 2017 +0200
linux-gen: packet: add L3/L4 checksum validation flags
Add L3/L4 checksum validation flags to signal if operation was performed by the platform and its result.
Signed-off-by: Bogdan Pricope bogdan.pricope@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/include/odp/api/plat/packet_types.h b/platform/linux-generic/include/odp/api/plat/packet_types.h index 68c66312..050f69dc 100644 --- a/platform/linux-generic/include/odp/api/plat/packet_types.h +++ b/platform/linux-generic/include/odp/api/plat/packet_types.h @@ -150,6 +150,9 @@ typedef union {
uint64_t color:2; /**< Packet color for traffic mgmt */ uint64_t nodrop:1; /**< Drop eligibility status */ + + uint64_t l3_chksum_done:1; /**< L3 checksum validation done */ + uint64_t l4_chksum_done:1; /**< L4 checksum validation done */ };
} _odp_packet_input_flags_t; diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h index 97efcec4..fc10d61c 100644 --- a/platform/linux-generic/include/odp_packet_internal.h +++ b/platform/linux-generic/include/odp_packet_internal.h @@ -51,8 +51,10 @@ typedef union { uint32_t snap_len:1; /**< Snap length error */ uint32_t l2_chksum:1; /**< L2 checksum error, checks TBD */ uint32_t ip_err:1; /**< IP error, checks TBD */ + uint32_t l3_chksum:1; /**< L3 checksum error */ uint32_t tcp_err:1; /**< TCP error, checks TBD */ uint32_t udp_err:1; /**< UDP error, checks TBD */ + uint32_t l4_chksum:1; /**< L4 checksum error */ }; } error_flags_t;
-----------------------------------------------------------------------
Summary of changes: example/generator/odp_generator.c | 25 +++------- .../include/odp/api/plat/packet_types.h | 3 ++ .../linux-generic/include/odp_packet_internal.h | 2 + platform/linux-generic/odp_crypto.c | 10 ---- platform/linux-generic/odp_packet.c | 26 ++++++++++ platform/linux-generic/pktio/dpdk.c | 57 +++++++++++++++------- 6 files changed, 79 insertions(+), 44 deletions(-)
hooks/post-receive