Re: [dpdk-dev] [PATCH] doc: add tested platforms and nics and OSes
Hi Thomas, Did you notice this patch ? do you have any comments ? Thanks Yulong Pei -Original Message- From: Pei, Yulong Sent: Monday, January 23, 2017 4:38 PM To: dev@dpdk.org Cc: Mcnamara, John ; thomas.monja...@6wind.com; Pei, Yulong Subject: [PATCH] doc: add tested platforms and nics and OSes Add tested platforms and nics and OSes to the release notes. Signed-off-by: Yulong Pei --- doc/guides/rel_notes/release_17_02.rst | 103 + 1 file changed, 103 insertions(+) diff --git a/doc/guides/rel_notes/release_17_02.rst b/doc/guides/rel_notes/release_17_02.rst index 0ecd720..f62dea1 100644 --- a/doc/guides/rel_notes/release_17_02.rst +++ b/doc/guides/rel_notes/release_17_02.rst @@ -368,6 +368,57 @@ Tested Platforms Also, make sure to start the actual text at the margin. = +#. SuperMicro 1U + + - BIOS: 1.0c + - Processor: Intel(R) Atom(TM) CPU C2758 @ 2.40GHz + +#. SuperMicro 1U + + - BIOS: 1.0a + - Processor: Intel(R) Xeon(R) CPU D-1540 @ 2.00GHz + - Onboard NIC: Intel(R) X552/X557-AT (2x10G) + + - Firmware-version: 0x81cf + - Device ID (PF/VF): 8086:15ad /8086:15a8 + + - kernel driver version: 4.2.5 (ixgbe) + +#. SuperMicro 2U + + - BIOS: 1.0a + - Processor: Intel(R) Xeon(R) CPU E5-4667 v3 @ 2.00GHz + +#. Intel(R) Server board S2600GZ + + - BIOS: SE5C600.86B.02.02.0002.122320131210 + - Processor: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz + +#. Intel(R) Server board S2600CWT + + - BIOS: SE5C610.86B.01.01.0009.060120151350 + - Processor: Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz + +#. Intel(R) Server board S2600WTT + + - BIOS: SE5C610.86B.01.01.0005.101720141054 + - Processor: Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz + +#. Intel(R) Server board S2600WTT + + - BIOS: SE5C610.86B.11.01.0044.090120151156 + - Processor: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10GHz + +#. Intel Corporation S2600GZ + + - BIOS: SE5C600.86B.01.06.0002.110120121539 + - Processor: Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz + +#. Intel Corporation S2600CO + + - BIOS: SE5C600.86B.02.02.0002.122320131210 + - Processor: Intel(R) Xeon(R) CPU E5-2658 v2 @ 2.40GHz + Tested NICs --- @@ -385,6 +436,48 @@ Tested NICs Also, make sure to start the actual text at the margin. = +#. Intel(R) 82599ES 10 Gigabit Ethernet Controller + + - Firmware version: 0x61bf0001 + - Device id (pf/vf): 8086:10fb / 8086:10ed + - Driver version: 4.0.1-k (ixgbe) + +#. Intel(R) Corporation Ethernet Connection X552/X557-AT 10GBASE-T + + - Firmware version: 0x81cf + - Device id (pf/vf): 8086:15ad / 8086:15a8 + - Driver version: 4.2.5 (ixgbe) + +#. Intel(R) Ethernet Converged Network Adapter X710-DA4 (4x10G) + + - Firmware version: 5.05 + - Device id (pf/vf): 8086:1572 / 8086:154c + - Driver version: 1.5.23 (i40e) + +#. Intel(R) Ethernet Converged Network Adapter X710-DA2 (2x10G) + + - Firmware version: 5.05 + - Device id (pf/vf): 8086:1572 / 8086:154c + - Driver version: 1.5.23 (i40e) + +#. Intel(R) Ethernet Converged Network Adapter XL710-QDA1 (1x40G) + + - Firmware version: 5.05 + - Device id (pf/vf): 8086:1584 / 8086:154c + - Driver version: 1.5.23 (i40e) + +#. Intel(R) Ethernet Converged Network Adapter XL710-QDA2 (2X40G) + + - Firmware version: 5.05 + - Device id (pf/vf): 8086:1583 / 8086:154c + - Driver version: 1.5.23 (i40e) + +#. Intel(R) Corporation I350 Gigabit Network Connection + + - Firmware version: 1.48, 0x86e7 + - Device id (pf/vf): 8086:1521 / 8086:1520 + - Driver version: 5.2.13-k (igb) + Tested OSes --- @@ -405,3 +498,13 @@ Tested OSes This section is a comment. do not overwrite or remove it. Also, make sure to start the actual text at the margin. = + +* CentOS 7.2 +* Fedora 25 +* FreeBSD 11 +* Red Hat Enterprise Linux Server release 7.3 +* SUSE Enterprise Linux 12 +* Wind River Linux 8 +* Ubuntu 16.04 +* Ubuntu 16.10 + -- 2.1.0
Re: [dpdk-dev] [PATCH 12/22] app/testpmd: add rte_flow item spec handler
Hi Adrien, I try to setup the following rule, but it seems that after set 'spec' param, can not set 'mask' param, is it an issue here or am I wrong to use it ? testpmd> flow create 0 ingress pattern eth dst spec 00:00:00:00:09:00 dst [TOKEN]: destination MAC src [TOKEN]: source MAC type [TOKEN]: EtherType / [TOKEN]: specify next pattern item Best Regards Yulong Pei -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Adrien Mazarguil Sent: Thursday, November 17, 2016 12:24 AM To: dev@dpdk.org Cc: Thomas Monjalon ; De Lara Guarch, Pablo ; Olivier Matz Subject: [dpdk-dev] [PATCH 12/22] app/testpmd: add rte_flow item spec handler Add parser code to fully set individual fields of pattern item specification structures, using the following operators: - fix: sets field and applies full bit-mask for perfect matching. - spec: sets field without modifying its bit-mask. - last: sets upper value of the spec => last range. - mask: sets bit-mask affecting both spec and last from arbitrary value. Signed-off-by: Adrien Mazarguil --- app/test-pmd/cmdline_flow.c | 110 +++ 1 file changed, 110 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index e70e8e2..790b4b8 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -89,6 +89,10 @@ enum index { /* Validate/create pattern. */ PATTERN, + ITEM_PARAM_FIX, + ITEM_PARAM_SPEC, + ITEM_PARAM_LAST, + ITEM_PARAM_MASK, ITEM_NEXT, ITEM_END, ITEM_VOID, @@ -121,6 +125,7 @@ struct context { uint16_t port; /**< Current port ID (for completions). */ uint32_t objdata; /**< Object-specific data. */ void *object; /**< Address of current object for relative offsets. */ + void *objmask; /**< Object a full mask must be written to. */ }; /** Token argument. */ @@ -267,6 +272,14 @@ static const enum index next_list_attr[] = { 0, }; +static const enum index item_param[] = { + ITEM_PARAM_FIX, + ITEM_PARAM_SPEC, + ITEM_PARAM_LAST, + ITEM_PARAM_MASK, + 0, +}; + static const enum index next_item[] = { ITEM_END, ITEM_VOID, @@ -287,6 +300,8 @@ static int parse_init(struct context *, const struct token *, static int parse_vc(struct context *, const struct token *, const char *, unsigned int, void *, unsigned int); +static int parse_vc_spec(struct context *, const struct token *, +const char *, unsigned int, void *, unsigned int); static int parse_destroy(struct context *, const struct token *, const char *, unsigned int, void *, unsigned int); @@ -492,6 +507,26 @@ static const struct token token_list[] = { .next = NEXT(next_item), .call = parse_vc, }, + [ITEM_PARAM_FIX] = { + .name = "fix", + .help = "match value perfectly (with full bit-mask)", + .call = parse_vc_spec, + }, + [ITEM_PARAM_SPEC] = { + .name = "spec", + .help = "match value according to configured bit-mask", + .call = parse_vc_spec, + }, + [ITEM_PARAM_LAST] = { + .name = "last", + .help = "specify upper bound to establish a range", + .call = parse_vc_spec, + }, + [ITEM_PARAM_MASK] = { + .name = "mask", + .help = "specify bit-mask with relevant bits set to one", + .call = parse_vc_spec, + }, [ITEM_NEXT] = { .name = "/", .help = "specify next pattern item", @@ -605,6 +640,7 @@ parse_init(struct context *ctx, const struct token *token, memset((uint8_t *)out + sizeof(*out), 0x22, size - sizeof(*out)); ctx->objdata = 0; ctx->object = out; + ctx->objmask = NULL; return len; } @@ -632,11 +668,13 @@ parse_vc(struct context *ctx, const struct token *token, out->command = ctx->curr; ctx->objdata = 0; ctx->object = out; + ctx->objmask = NULL; out->args.vc.data = (uint8_t *)out + size; return len; } ctx->objdata = 0; ctx->object = &out->args.vc.attr; + ctx->objmask = NULL; switch (ctx->curr) { case GROUP: case PRIORITY: @@ -652,6 +690,7 @@ parse_vc(struct context *ctx, const struct token *token, (void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1), sizeof(double)); ctx->object = out->args.vc.pattern; + ctx->objmask = NULL; return len; case ACTIONS: out->args.vc.actions = @@ -660,6 +699,7 @@ parse_vc(struct context *ctx, const struct toke
Re: [dpdk-dev] [PATCH v3 22/25] app/testpmd: add L4 items to flow command
Hi Adrien, For SCTP, it may need support to set 'tag' since in FDIR (--pkt-filter-mode=perfect) need set it when filter sctp flow. struct sctp_hdr { uint16_t src_port; /**< Source port. */ uint16_t dst_port; /**< Destin port. */ uint32_t tag; /**< Validation tag. */ uint32_t cksum;/**< Checksum. */ } __attribute__((__packed__)); testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.2 / sctp src [TOKEN]: SCTP source port dst [TOKEN]: SCTP destination port / [TOKEN]: specify next pattern item Best Regards Yulong Pei -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Adrien Mazarguil Sent: Tuesday, December 20, 2016 1:49 AM To: dev@dpdk.org Subject: [dpdk-dev] [PATCH v3 22/25] app/testpmd: add L4 items to flow command Add the ability to match a few properties of common L4[.5] protocol headers: - ICMP: type and code. - UDP: source and destination ports. - TCP: source and destination ports. - SCTP: source and destination ports. - VXLAN: network identifier. Signed-off-by: Adrien Mazarguil Acked-by: Olga Shern --- app/test-pmd/cmdline_flow.c | 163 +++ 1 file changed, 163 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index c2725a5..a340a75 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -132,6 +132,20 @@ enum index { ITEM_IPV6, ITEM_IPV6_SRC, ITEM_IPV6_DST, + ITEM_ICMP, + ITEM_ICMP_TYPE, + ITEM_ICMP_CODE, + ITEM_UDP, + ITEM_UDP_SRC, + ITEM_UDP_DST, + ITEM_TCP, + ITEM_TCP_SRC, + ITEM_TCP_DST, + ITEM_SCTP, + ITEM_SCTP_SRC, + ITEM_SCTP_DST, + ITEM_VXLAN, + ITEM_VXLAN_VNI, /* Validate/create actions. */ ACTIONS, @@ -359,6 +373,11 @@ static const enum index next_item[] = { ITEM_VLAN, ITEM_IPV4, ITEM_IPV6, + ITEM_ICMP, + ITEM_UDP, + ITEM_TCP, + ITEM_SCTP, + ITEM_VXLAN, ZERO, }; @@ -419,6 +438,40 @@ static const enum index item_ipv6[] = { ZERO, }; +static const enum index item_icmp[] = { + ITEM_ICMP_TYPE, + ITEM_ICMP_CODE, + ITEM_NEXT, + ZERO, +}; + +static const enum index item_udp[] = { + ITEM_UDP_SRC, + ITEM_UDP_DST, + ITEM_NEXT, + ZERO, +}; + +static const enum index item_tcp[] = { + ITEM_TCP_SRC, + ITEM_TCP_DST, + ITEM_NEXT, + ZERO, +}; + +static const enum index item_sctp[] = { + ITEM_SCTP_SRC, + ITEM_SCTP_DST, + ITEM_NEXT, + ZERO, +}; + +static const enum index item_vxlan[] = { + ITEM_VXLAN_VNI, + ITEM_NEXT, + ZERO, +}; + static const enum index next_action[] = { ACTION_END, ACTION_VOID, @@ -930,6 +983,103 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv6, hdr.dst_addr)), }, + [ITEM_ICMP] = { + .name = "icmp", + .help = "match ICMP header", + .priv = PRIV_ITEM(ICMP, sizeof(struct rte_flow_item_icmp)), + .next = NEXT(item_icmp), + .call = parse_vc, + }, + [ITEM_ICMP_TYPE] = { + .name = "type", + .help = "ICMP packet type", + .next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp, +hdr.icmp_type)), + }, + [ITEM_ICMP_CODE] = { + .name = "code", + .help = "ICMP packet code", + .next = NEXT(item_icmp, NEXT_ENTRY(UNSIGNED), item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp, +hdr.icmp_code)), + }, + [ITEM_UDP] = { + .name = "udp", + .help = "match UDP header", + .priv = PRIV_ITEM(UDP, sizeof(struct rte_flow_item_udp)), + .next = NEXT(item_udp), + .call = parse_vc, + }, + [ITEM_UDP_SRC] = { + .name = "src", + .help = "UDP source port", + .next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp, +hdr.src_port)), + }, + [ITEM_UDP_DST] = { + .name = "dst", + .help = "UDP destination port", + .next = NEXT(item_udp, NEXT_ENTRY(UNSIGNED), item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_udp, +hdr.dst_port)), + }, + [ITEM_TCP] = { + .name = "tcp", + .help = "match TCP header",
Re: [dpdk-dev] [PATCH v3 21/25] app/testpmd: add items ipv4/ipv6 to flow command
Hi adrien, Is it possible to support to set ipv4 TOS, ipv4 PROTO, ipv4 TTL and ipv6 tc, ipv6 next-header, ipv6 hop-limits since previous FDIR for i40e already support it. Best Regards Yulong Pei -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Adrien Mazarguil Sent: Tuesday, December 20, 2016 1:49 AM To: dev@dpdk.org Subject: [dpdk-dev] [PATCH v3 21/25] app/testpmd: add items ipv4/ipv6 to flow command Add the ability to match basic fields from IPv4 and IPv6 headers (source and destination addresses only). Signed-off-by: Adrien Mazarguil Acked-by: Olga Shern --- app/test-pmd/cmdline_flow.c | 177 +++ 1 file changed, 177 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 53709fe..c2725a5 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -61,6 +62,8 @@ enum index { BOOLEAN, STRING, MAC_ADDR, + IPV4_ADDR, + IPV6_ADDR, RULE_ID, PORT_ID, GROUP_ID, @@ -123,6 +126,12 @@ enum index { ITEM_VLAN, ITEM_VLAN_TPID, ITEM_VLAN_TCI, + ITEM_IPV4, + ITEM_IPV4_SRC, + ITEM_IPV4_DST, + ITEM_IPV6, + ITEM_IPV6_SRC, + ITEM_IPV6_DST, /* Validate/create actions. */ ACTIONS, @@ -348,6 +357,8 @@ static const enum index next_item[] = { ITEM_RAW, ITEM_ETH, ITEM_VLAN, + ITEM_IPV4, + ITEM_IPV6, ZERO, }; @@ -394,6 +405,20 @@ static const enum index item_vlan[] = { ZERO, }; +static const enum index item_ipv4[] = { + ITEM_IPV4_SRC, + ITEM_IPV4_DST, + ITEM_NEXT, + ZERO, +}; + +static const enum index item_ipv6[] = { + ITEM_IPV6_SRC, + ITEM_IPV6_DST, + ITEM_NEXT, + ZERO, +}; + static const enum index next_action[] = { ACTION_END, ACTION_VOID, @@ -439,6 +464,12 @@ static int parse_string(struct context *, const struct token *, static int parse_mac_addr(struct context *, const struct token *, const char *, unsigned int, void *, unsigned int); +static int parse_ipv4_addr(struct context *, const struct token *, + const char *, unsigned int, + void *, unsigned int); +static int parse_ipv6_addr(struct context *, const struct token *, + const char *, unsigned int, + void *, unsigned int); static int parse_port(struct context *, const struct token *, const char *, unsigned int, void *, unsigned int); @@ -509,6 +540,20 @@ static const struct token token_list[] = { .call = parse_mac_addr, .comp = comp_none, }, + [IPV4_ADDR] = { + .name = "{IPv4 address}", + .type = "IPV4 ADDRESS", + .help = "standard IPv4 address notation", + .call = parse_ipv4_addr, + .comp = comp_none, + }, + [IPV6_ADDR] = { + .name = "{IPv6 address}", + .type = "IPV6 ADDRESS", + .help = "standard IPv6 address notation", + .call = parse_ipv6_addr, + .comp = comp_none, + }, [RULE_ID] = { .name = "{rule id}", .type = "RULE ID", @@ -843,6 +888,48 @@ static const struct token token_list[] = { .next = NEXT(item_vlan, NEXT_ENTRY(UNSIGNED), item_param), .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vlan, tci)), }, + [ITEM_IPV4] = { + .name = "ipv4", + .help = "match IPv4 header", + .priv = PRIV_ITEM(IPV4, sizeof(struct rte_flow_item_ipv4)), + .next = NEXT(item_ipv4), + .call = parse_vc, + }, + [ITEM_IPV4_SRC] = { + .name = "src", + .help = "source address", + .next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4, +hdr.src_addr)), + }, + [ITEM_IPV4_DST] = { + .name = "dst", + .help = "destination address", + .next = NEXT(item_ipv4, NEXT_ENTRY(IPV4_ADDR), item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ipv4, +hdr.dst_addr)), + }, + [ITEM_IPV6] = { + .name = "ipv6", + .help = "match IPv6 header", + .priv = PRIV_ITEM(IPV6, sizeof(struct rte_flow_item_ipv6)), + .next = NEXT(item_ipv6), + .call = parse_vc, + }, + [ITEM_IPV6_SRC] = { + .name = "src", +
Re: [dpdk-dev] [PATCH] net/i40e: add packet prefetch
Hi All In Non-vector mode, without this patch, single core performance can reach 37.576Mpps with 64Byte packet, But after applied this patch , single core performance downgrade to 34.343Mpps with 64Byte packet. Best Regards Yulong Pei -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Vladyslav Buslov Sent: Wednesday, March 1, 2017 6:57 PM To: Zhang, Helin ; Wu, Jingjing ; Yigit, Ferruh Cc: dev@dpdk.org Subject: [dpdk-dev] [PATCH] net/i40e: add packet prefetch Prefetch both cache lines of mbuf and first cache line of payload if CONFIG_RTE_PMD_PACKET_PREFETCH is set. Signed-off-by: Vladyslav Buslov --- drivers/net/i40e/i40e_rxtx.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 48429cc..2b4e5c9 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -100,6 +100,12 @@ #define I40E_TX_OFFLOAD_NOTSUP_MASK \ (PKT_TX_OFFLOAD_MASK ^ I40E_TX_OFFLOAD_MASK) +#ifdef RTE_PMD_PACKET_PREFETCH +#define rte_packet_prefetch(p) rte_prefetch0(p) +#else +#define rte_packet_prefetch(p) do {} while (0) +#endif + static uint16_t i40e_xmit_pkts_simple(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts); @@ -495,6 +501,9 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq) /* Translate descriptor info to mbuf parameters */ for (j = 0; j < nb_dd; j++) { mb = rxep[j].mbuf; + rte_packet_prefetch( + RTE_PTR_ADD(mb->buf_addr, + RTE_PKTMBUF_HEADROOM)); qword1 = rte_le_to_cpu_64(\ rxdp[j].wb.qword1.status_error_len); pkt_len = ((qword1 & I40E_RXD_QW1_LENGTH_PBUF_MASK) >> @@ -578,9 +587,11 @@ i40e_rx_alloc_bufs(struct i40e_rx_queue *rxq) rxdp = &rxq->rx_ring[alloc_idx]; for (i = 0; i < rxq->rx_free_thresh; i++) { - if (likely(i < (rxq->rx_free_thresh - 1))) + if (likely(i < (rxq->rx_free_thresh - 1))) { /* Prefetch next mbuf */ - rte_prefetch0(rxep[i + 1].mbuf); + rte_packet_prefetch(rxep[i + 1].mbuf->cacheline0); + rte_packet_prefetch(rxep[i + 1].mbuf->cacheline1); + } mb = rxep[i].mbuf; rte_mbuf_refcnt_set(mb, 1); @@ -752,7 +763,8 @@ i40e_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) I40E_RXD_QW1_LENGTH_PBUF_SHIFT) - rxq->crc_len; rxm->data_off = RTE_PKTMBUF_HEADROOM; - rte_prefetch0(RTE_PTR_ADD(rxm->buf_addr, RTE_PKTMBUF_HEADROOM)); + rte_packet_prefetch(RTE_PTR_ADD(rxm->buf_addr, + RTE_PKTMBUF_HEADROOM)); rxm->nb_segs = 1; rxm->next = NULL; rxm->pkt_len = rx_packet_len; @@ -939,7 +951,7 @@ i40e_recv_scattered_pkts(void *rx_queue, first_seg->ol_flags |= pkt_flags; /* Prefetch data of first segment, if configured to do so. */ - rte_prefetch0(RTE_PTR_ADD(first_seg->buf_addr, + rte_packet_prefetch(RTE_PTR_ADD(first_seg->buf_addr, first_seg->data_off)); rx_pkts[nb_rx++] = first_seg; first_seg = NULL; -- 2.1.4
Re: [dpdk-dev] [PATCH] net/i40e: add more explanation for QoS APIs
testpmd> set vf tx max-bandwidth (port_id) (vf_id) (bandwidth) bandwidth(Mbps) I think that Mbps usually refer to physical layers. Bet Regards Yulong Pei -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Ferruh Yigit Sent: Thursday, April 13, 2017 6:26 PM To: Lu, Wenzhuo ; dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] net/i40e: add more explanation for QoS APIs On 4/13/2017 9:21 AM, Wenzhuo Lu wrote: > According to HW implementation, the bandwidth of QoS means the L2 > bandwidth, not count the bytes added by physical layer. > > Signed-off-by: Wenzhuo Lu Applied to dpdk-next-net/master, thanks.
Re: [dpdk-dev] [PATCH] app/testpmd: initalize port_numa and ring_numa
Hi Jingjing, Thanks for the review, already sent v4 patch and fixes line in it. Best Regards Yulong Pei -Original Message- From: Wu, Jingjing Sent: Friday, April 28, 2017 3:36 PM To: Pei, Yulong ; dev@dpdk.org Cc: Richardson, Bruce ; tho...@monjalon.net Subject: RE: [PATCH] app/testpmd: initalize port_numa and ring_numa > -Original Message- > From: Pei, Yulong > Sent: Monday, April 24, 2017 3:16 PM > To: dev@dpdk.org > Cc: Richardson, Bruce ; Wu, Jingjing > ; tho...@monjalon.net; Pei, Yulong > > Subject: [PATCH] app/testpmd: initalize port_numa and ring_numa > > Previous numa_support = 0 by default, it need to add --numa to testpmd > command line to enable numa, so port_numa and ring_numa were > initalized at function launch_args_parse(), now testpmd change > numa_support = 1 as default, so port_numa and ring_numa also need to > initalize by default, otherwise port->socket_id will be probed to wrong value. > > Signed-off-by: Yulong Pei Thanks! Patch is fine. Could you add Fixes line for this patch? I think should be this commit? commit 999b2ee0fe4511c44462b29566f264e8d9326e1b Author: Bruce Richardson Date: Fri Mar 24 17:00:38 2017 + app/testpmd: enable NUMA support by default There is little reason for NUMA support in testpmd to be off by default, so enable it, and add in a new commandline parameter to disable it, if that is wanted by users. Signed-off-by: Bruce Richardson
Re: [dpdk-dev] [PATCH] app/testpmd: add bus info when display port info
Hi Thomas, -Original Message- From: Thomas Monjalon [mailto:tho...@monjalon.net] Sent: Monday, May 1, 2017 9:56 PM To: Pei, Yulong Cc: dev@dpdk.org; Wu, Jingjing Subject: Re: [dpdk-dev] [PATCH] app/testpmd: add bus info when display port info 26/04/2017 06:31, Yulong Pei: > Display pci device bus info when show port info. > > Signed-off-by: Yulong Pei > --- > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -469,6 +469,14 @@ port_infos_display(portid_t port_id) > print_ethaddr("MAC address: ", &mac_addr); > printf("\nDriver name: %s", dev_info.driver_name); > printf("\nConnect to socket: %u", port->socket_id); > + if (dev_info.pci_dev) > + printf("\nBus-info: %04x:%02x:%02x:%x", > + dev_info.pci_dev->addr.domain, > + dev_info.pci_dev->addr.bus, > + dev_info.pci_dev->addr.devid, > + dev_info.pci_dev->addr.function); > + else > + printf("\nBus-info: N/A"); The bus information must be managed in a more generic way. The field pci_dev will probably be removed in a next release. Could you kind to tell me more information about what does "more generic way" mean ? Best Regards Yulong Pei
Re: [dpdk-dev] [PATCH v6 3/3] app/test-pmd: add CLI for TM nodes and hierarchy commit
Hi Jasvinder, -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Jasvinder Singh Sent: Tuesday, October 10, 2017 3:08 AM To: dev@dpdk.org Cc: Dumitrescu, Cristian ; Wu, Jingjing ; De Lara Guarch, Pablo Subject: [dpdk-dev] [PATCH v6 3/3] app/test-pmd: add CLI for TM nodes and hierarchy commit Add following CLIs in testpmd application for device traffic management; - commands to add TM hierarchy nodes (leaf and nonleaf). - command for runtime update of node weight. - command to commit the TM hierarchy Signed-off-by: Jasvinder Singh Acked-by: Cristian Dumitrescu --- v5 change: - add shaper related parameters to leaf node add command v4 change: - remove softnic specific checks to make it generic for the devices app/test-pmd/cmdline.c| 27 +++ app/test-pmd/cmdline_tm.c | 526 ++ app/test-pmd/cmdline_tm.h | 5 + 3 files changed, 558 insertions(+) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index d89583c..c6b35ba 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -683,6 +683,28 @@ static void cmd_help_long_parsed(void *parsed_result, "del port tm node wred profile (port_id) (wred_profile_id)\n" " Delete port tm node wred profile.\n\n" + "add port tm nonleaf node (port_id) (node_id) (parent_node_id)" + " (priority) (weight) (level_id) (shaper_profile_id)" + " (shared_shaper_id) (n_shared_shapers) (n_sp_priorities)" + " (stats_mask)\n" + " Add port tm nonleaf node.\n\n" + + "add port tm leaf node (port_id) (node_id) (parent_node_id)" + " (priority) (weight) (level_id) (shaper_profile_id)" + " (shared_shaper_id) (n_shared_shapers) (n_sp_priorities)" + " (cman_mode) (wred_profile_id) (stats_mask)\n" + " Add port tm leaf node.\n\n" + For leaf node , it should not have "n_sp_priorities" parameter. Best Regards Yulong Pei + "del port tm node (port_id) (node_id)\n" + " Delete port tm node.\n\n" + + "set port tm node parent (port_id) (node_id) (parent_node_id)" + " (priority) (weight)\n" + " Set port tm node parent.\n\n" + + "port tm hierarchy commit (port_id) (clean_on_fail)\n" + " Commit tm hierarchy.\n\n" + , list_pkt_forwarding_modes() ); } @@ -14872,6 +14894,11 @@ cmdline_parse_ctx_t main_ctx[] = { (cmdline_parse_inst_t *)&cmd_add_port_tm_node_wred_profile, (cmdline_parse_inst_t *)&cmd_del_port_tm_node_wred_profile, (cmdline_parse_inst_t *)&cmd_set_port_tm_node_shaper_profile, + (cmdline_parse_inst_t *)&cmd_add_port_tm_nonleaf_node, + (cmdline_parse_inst_t *)&cmd_add_port_tm_leaf_node, + (cmdline_parse_inst_t *)&cmd_del_port_tm_node, + (cmdline_parse_inst_t *)&cmd_set_port_tm_node_parent, + (cmdline_parse_inst_t *)&cmd_port_tm_hierarchy_commit, NULL, }; diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c index f1cd810..a8b7c20 100644 --- a/app/test-pmd/cmdline_tm.c +++ b/app/test-pmd/cmdline_tm.c @@ -1427,3 +1427,529 @@ cmdline_parse_inst_t cmd_set_port_tm_node_shaper_profile = { NULL, }, }; + +/* *** Add Port TM nonleaf node *** */ +struct cmd_add_port_tm_nonleaf_node_result { + cmdline_fixed_string_t add; + cmdline_fixed_string_t port; + cmdline_fixed_string_t tm; + cmdline_fixed_string_t nonleaf; + cmdline_fixed_string_t node; + uint16_t port_id; + uint32_t node_id; + int32_t parent_node_id; + uint32_t priority; + uint32_t weight; + uint32_t level_id; + uint32_t shaper_profile_id; + uint32_t shared_shaper_id; + uint32_t n_shared_shapers; + uint32_t n_sp_priorities; + uint64_t stats_mask; +}; + +cmdline_parse_token_string_t cmd_add_port_tm_nonleaf_node_add = + TOKEN_STRING_INITIALIZER( + struct cmd_add_port_tm_nonleaf_node_result, add, "add"); +cmdline_parse_token_string_t cmd_add_port_tm_nonleaf_node_port = + TOKEN_STRING_INITIALIZER( + struct cmd_add_port_tm_nonleaf_node_result, port, "port"); +cmdline_parse_token_string_t cmd_add_port_tm_nonleaf_node_tm = + TOKEN_STRING_INITIALIZER( + struct cmd_add_port_tm_nonleaf_node_result, tm, "tm"); +cmdline_parse_token_string_t cmd_add_port_tm_nonleaf_node_nonleaf = + TOKEN_STRING_INITIALIZER( + struct cmd_add_port_tm_nonleaf_node_result, nonleaf, "nonleaf"); +cmdline_parse_token_string_t cmd_add_port_tm_nonleaf_node_node = + TOKEN_STRING_INITIALIZER(
Re: [dpdk-dev] [PATCH] doc: add description of traffic management functions in testpmd
Hi Jasvinder, -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Jasvinder Singh Sent: Wednesday, October 11, 2017 3:18 AM To: dev@dpdk.org Cc: Dumitrescu, Cristian ; Yigit, Ferruh ; Mcnamara, John Subject: [dpdk-dev] [PATCH] doc: add description of traffic management functions in testpmd Add description of the traffic management functions in the testpmd. Signed-off-by: Jasvinder Singh --- doc/guides/testpmd_app_ug/run_app.rst | 1 + doc/guides/testpmd_app_ug/testpmd_funcs.rst | 262 2 files changed, 263 insertions(+) diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst index a60891a..4c0d2ce 100644 --- a/doc/guides/testpmd_app_ug/run_app.rst +++ b/doc/guides/testpmd_app_ug/run_app.rst @@ -362,6 +362,7 @@ The commandline options are: csum icmpecho ieee1588 + tm * ``--rss-ip`` diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index eb3cc66..7f37f91 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -347,6 +347,13 @@ The available information categories are: * ``ieee1588``: Demonstrate L2 IEEE1588 V2 PTP timestamping for RX and TX. Requires ``CONFIG_RTE_LIBRTE_IEEE1588=y``. +* ``tm``: Traffic Management forwarding mode + Demonstrates the use of ethdev traffic management APIs and softnic +PMD for + QoS traffic management. In this mode, 5-level hierarchical QoS +scheduler is + available as an default option that can be enabled through CLI. The +user can + also modify the default hierarchy or specify the new hierarchy +through CLI for + implementing QoS scheduler. Requires ``CONFIG_RTE_LIBRTE_PMD_SOFTNIC=y`` ``CONFIG_RTE_LIBRTE_SCHED=y``. + Note: TX timestamping is only available in the "Full Featured" TX path. To force ``testpmd`` into this mode set ``--txqflags=0``. Example:: @@ -2008,6 +2015,261 @@ For example, to set the high bit in the register from the example above:: port 0 PCI register at offset 0xEE00: 0x800A (2147483658) +Traffic Management +-- + +The following section shows functions for configuring traffic +management on on the ethernet device through the use of generic TM API. + +show port traffic management capability +~~~ + +Show traffic management capability of the port:: + + testpmd> show port tm cap (port_id) + +show port traffic management capability (hierarchy level) +~ + +Show traffic management hierarchy level capability of the port:: + + testpmd> show port tm cap (port_id) (level_id) + +show port traffic management capability (hierarchy node level) +~~ + +Show the traffic management hierarchy node capability of the port:: + + testpmd> show port tm cap (port_id) (node_id) + +show port traffic management hierarchy node type + + +Show the port traffic management hierarchy node type:: + + testpmd> show port tm node type (port_id) (node_id) + +show port traffic management hierarchy node stats +~ + +Show the port traffic management hierarchy node statistics:: + + testpmd> show port tm node stats (port_id) (node_id) (clear) + +where: + +* ``clear``: When this parameter has a non-zero value, the statistics +counters + are cleared (i.e. set to zero) immediately after they have been read, + otherwise the statistics counters are left untouched. + +Add port traffic management private shaper profile +~~ + +Add the port traffic management private shaper profile:: + + testpmd> add port tm node shaper profile (port_id) (shaper_profile_id) \ + (tb_rate) (tb_size) (packet_length_adjust) + +where: + +* ``shaper_profile id``: Shaper profile ID for the new profile. +* ``tb_rate``: Token bucket rate (bytes per second). +* ``tb_size``: Token bucket size (bytes). +* ``packet_length_adjust``: The value (bytes) to be added to the length +of + each packet for the purpose of shaping. This parameter value can be +used to + correct the packet length with the framing overhead bytes that are +consumed + on the wire. + +Delete port traffic management private shaper profile +~ + +Delete the port traffic management private shaper:: + + testpmd> del port tm node shaper profile (port_id) + (shaper_profile_id) + +where: + +* ``shaper_profile id``: Shaper profile ID that needs to be deleted. + +Add port traffic management shared shaper +~ + +Create the port traffic management shared shaper:: + + testpmd> add port tm node shared shaper (port_id) (shared_shaper_id) \ + (shaper_profile_id) + +where:
Re: [dpdk-dev] [PATCH v7 1/3] app/test-pmd: add CLI for TM capability and stats
Tested testpmd CLI for TM with ixgbe, i40e and softnic. Tested-by: Yulong Pei -Original Message- From: Singh, Jasvinder Sent: Wednesday, October 11, 2017 5:26 PM To: dev@dpdk.org Cc: Dumitrescu, Cristian ; Wu, Jingjing ; De Lara Guarch, Pablo ; Pei, Yulong Subject: [PATCH v7 1/3] app/test-pmd: add CLI for TM capability and stats Add following CLIs to testpmd application for device traffic management; - commands to display TM capability information. (per port, per hierarchy level and per hierarchy node) - command to display hiearchy node type - stats collection Signed-off-by: Jasvinder Singh Acked-by: Cristian Dumitrescu --- v6 change: - fix compilation warning - change port_id type to uint16_t v4 change: - remove softnic specific checks to make it generic for the devices v3 change: - Implements feedback from Pablo[1] - move TM API related CLIs into cmdline_tm.c - split patch into small patches - replace link status check with testpmd fn port_is_started() [1]http://dpdk.org/ml/archives/dev/2017-September/075748.html --- app/test-pmd/Makefile | 1 + app/test-pmd/cmdline.c| 20 ++ app/test-pmd/cmdline_tm.c | 681 ++ app/test-pmd/cmdline_tm.h | 44 +++ 4 files changed, 746 insertions(+) create mode 100644 app/test-pmd/cmdline_tm.c create mode 100644 app/test-pmd/cmdline_tm.h diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile index b6e80dd..b78c73a 100644 --- a/app/test-pmd/Makefile +++ b/app/test-pmd/Makefile @@ -48,6 +48,7 @@ SRCS-y := testpmd.c SRCS-y += parameters.c SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline.c SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_flow.c +SRCS-y += cmdline_tm.c SRCS-y += config.c SRCS-y += iofwd.c SRCS-y += macfwd.c diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 91766bc..2376f23 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -99,6 +99,7 @@ #include #endif #include "testpmd.h" +#include "cmdline_tm.h" static struct cmdline *testpmd_cl; @@ -234,6 +235,20 @@ static void cmd_help_long_parsed(void *parsed_result, "show port (port_id) pctype mapping\n" "Get flow ptype to pctype mapping on a port\n\n" + "show port tm cap (port_id)\n" + " Display the port TM capability.\n\n" + + "show port tm level cap (port_id) (level_id)\n" + " Display the port TM hierarchical level capability.\n\n" + + "show port tm node cap (port_id) (node_id)\n" + " Display the port TM node capability.\n\n" + + "show port tm node type (port_id) (node_id)\n" + " Display the port TM node type.\n\n" + + "show port tm node stats (port_id) (node_id) (clear)\n" + " Display the port TM node stats.\n\n" ); } @@ -14818,6 +14833,11 @@ cmdline_parse_ctx_t main_ctx[] = { (cmdline_parse_inst_t *)&cmd_pctype_mapping_get, (cmdline_parse_inst_t *)&cmd_pctype_mapping_reset, (cmdline_parse_inst_t *)&cmd_pctype_mapping_update, + (cmdline_parse_inst_t *)&cmd_show_port_tm_cap, + (cmdline_parse_inst_t *)&cmd_show_port_tm_level_cap, + (cmdline_parse_inst_t *)&cmd_show_port_tm_node_cap, + (cmdline_parse_inst_t *)&cmd_show_port_tm_node_type, + (cmdline_parse_inst_t *)&cmd_show_port_tm_node_stats, NULL, }; diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c new file mode 100644 index 000..f024372 --- /dev/null +++ b/app/test-pmd/cmdline_tm.c @@ -0,0 +1,681 @@ +/*- + * BSD LICENSE + * + * Copyright(c) 2017 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE
[dpdk-dev] [PATCH 0/3] support setting i40e VF MAC address from DPDK host side
Tested-by: yulong.pei at intel.com -Original Message- From: Zhang, Helin Sent: Thursday, January 28, 2016 4:40 PM To: dev at dpdk.org Cc: Pei, Yulong ; Wu, Jingjing ; Tao, Zhe ; Xu, Qian Q ; Zhang, Helin Subject: [PATCH 0/3] support setting i40e VF MAC address from DPDK host side It adds pre-setting i40e VF MAC addresses from DPDK PF host side, during host port initialization, by introduing a new port configuration element. It then can pre-set VF MAC addresses before any launching VFs, and the VF MAC addresses will not be random each time launching a VF. There should be no ABI broken, as ABI changes in 'struct rte_eth_conf' has already been announced in R2.2. Helin Zhang (3): i40e: add setting VF MAC address in DPDK PF host i40evf: use ether interface for validating MAC address app/testpmd: set default MAC addresses for each VF app/test-pmd/testpmd.c | 19 +++ doc/guides/rel_notes/release_2_3.rst | 9 + drivers/net/i40e/i40e_ethdev.c | 21 + drivers/net/i40e/i40e_ethdev.h | 1 + drivers/net/i40e/i40e_ethdev_vf.c| 14 +++--- drivers/net/i40e/i40e_pf.c | 2 ++ lib/librte_ether/rte_ethdev.h| 10 ++ 7 files changed, 69 insertions(+), 7 deletions(-) -- 2.5.0
[dpdk-dev] [PATCH] i40e: remove redundant compiler warning disablers
This patch caused build error with i686-native-linuxapp-gcc (gcc version is 4.8.3) > > i686-native-linuxapp-gcc compile error info: > > > > INSTALL-LIB librte_pmd_vmxnet3_uio.a > > /root/dpdk/drivers/net/i40e/base/i40e_common.c: In function > > ?i40e_aq_set_lldp_mib?: > > /root/dpdk/drivers/net/i40e/base/i40e_common.c:3772:32: error: cast > > from pointer to integer of different size [-Werror=pointer-to-int-cast] > > cmd->address_high = CPU_TO_LE32(I40E_HI_WORD((u64)buff)); > > ^ > > /root/dpdk/drivers/net/i40e/base/i40e_common.c:3773:30: error: cast > > from pointer to integer of different size [-Werror=pointer-to-int-cast] > > cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((u64)buff)); > > ^ > > /root/dpdk/drivers/net/i40e/base/i40e_common.c: In function > > ?i40e_aq_set_arp_proxy_config?: > > /root/dpdk/drivers/net/i40e/base/i40e_common.c:5817:33: error: cast > > from pointer to integer of different size [-Werror=pointer-to-int-cast] > > cmd->address_high = CPU_TO_LE32(I40E_HI_DWORD((u64)proxy_config)); > > ^ > > /root/dpdk/drivers/net/i40e/base/i40e_common.c:5818:30: error: cast > > from pointer to integer of different size [-Werror=pointer-to-int-cast] > > cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((u64)proxy_config)); > > ^ > > /root/dpdk/drivers/net/i40e/base/i40e_common.c: In function > > ?i40e_aq_set_ns_proxy_table_entry?: > > /root/dpdk/drivers/net/i40e/base/i40e_common.c:5852:14: error: cast > > from pointer to integer of different size [-Werror=pointer-to-int-cast] > >CPU_TO_LE32(I40E_HI_DWORD((u64)ns_proxy_table_entry)); > > ^ > > /root/dpdk/drivers/net/i40e/base/i40e_common.c:5854:12: error: cast > > from pointer to integer of different size [-Werror=pointer-to-int-cast] > >CPU_TO_LE32(I40E_LO_DWORD((u64)ns_proxy_table_entry)); > > ^ > > /root/dpdk/drivers/net/i40e/base/i40e_common.c: In function > > ?i40e_aq_set_clear_wol_filter?: > > /root/dpdk/drivers/net/i40e/base/i40e_common.c:5914:33: error: cast > > from pointer to integer of different size [-Werror=pointer-to-int-cast] > > cmd->address_high = CPU_TO_LE32(I40E_HI_DWORD((u64)filter)); > > ^ > > /root/dpdk/drivers/net/i40e/base/i40e_common.c:5915:30: error: cast > > from pointer to integer of different size [-Werror=pointer-to-int-cast] > > cmd->address_low = CPU_TO_LE32(I40E_LO_DWORD((u64)filter)); > > ^ > > cc1: all warnings being treated as errors > > make[6]: *** [i40e_common.o] Error 1 > > make[5]: *** [i40e] Error 2 > > make[5]: *** Waiting for unfinished jobs > > INSTALL-LIB librte_pmd_ixgbe.a > > AR librte_pmd_e1000.a > > INSTALL-LIB librte_pmd_e1000.a > > make[4]: *** [net] Error 2 > > make[3]: *** [drivers] Error 2 > > make[2]: *** [all] Error 2 > > make[1]: *** [pre_install] Error 2 > > make: *** [install] Error 2 -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Panu Matilainen Sent: Monday, December 7, 2015 8:37 PM To: dev at dpdk.org Subject: [dpdk-dev] [PATCH] i40e: remove redundant compiler warning disablers These may have been required at some point but current i40e base driver compiles cleanly without them, at least with clang 3.7.0 and gcc 5.1.1. Signed-off-by: Panu Matilainen --- drivers/net/i40e/Makefile | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/net/i40e/Makefile b/drivers/net/i40e/Makefile index 033ee4a..4ffaf0d 100644 --- a/drivers/net/i40e/Makefile +++ b/drivers/net/i40e/Makefile @@ -53,23 +53,10 @@ CFLAGS_BASE_DRIVER = -wd593 -wd188 else ifeq ($(CC), clang) CFLAGS_BASE_DRIVER += -Wno-sign-compare CFLAGS_BASE_DRIVER += -Wno-unused-value -CFLAGS_BASE_DRIVER += -Wno-unused-parameter -CFLAGS_BASE_DRIVER += -Wno-strict-aliasing -CFLAGS_BASE_DRIVER += -Wno-format -CFLAGS_BASE_DRIVER += -Wno-missing-field-initializers -CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast -CFLAGS_BASE_DRIVER += -Wno-format-nonliteral CFLAGS_BASE_DRIVER += -Wno-unused-variable else CFLAGS_BASE_DRIVER = -Wno-sign-compare CFLAGS_BASE_DRIVER += -Wno-unused-value -CFLAGS_BASE_DRIVER += -Wno-unused-parameter -CFLAGS_BASE_DRIVER += -Wno-strict-aliasing -CFLAGS_BASE_DRIVER += -Wno-format -CFLAGS_BASE_DRIVER += -Wno-missing-field-initializers -CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast -CFLAGS_BASE_DRIVER += -Wno-format-nonliteral -CFLAGS_BASE_DRIVER += -Wno-format-security CFLAGS_BASE_DRIVER += -Wno-unused-variable ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1) -- 2.5.0
[dpdk-dev] [PATCH] i40e: fix vlan filtering
It works as expected, thanks. Tested-by Yulong.pei at intel.com Best Regards Yulong Pei -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Julien Meunier Sent: Tuesday, January 19, 2016 1:19 AM To: Zhang, Helin Cc: dev at dpdk.org Subject: [dpdk-dev] [PATCH] i40e: fix vlan filtering VLAN filtering was always performed, even if hw_vlan_filter was disabled. During device initialization, default filter RTE_MACVLAN_PERFECT_MATCH was applied. In this situation, all incoming VLAN frames were dropped by the card (increase of the register RUPP - Rx Unsupported Protocol). In order to restore default behavior, if HW VLAN filtering is activated, set a filter to match MAC and VLAN. If not, set a filter to only match MAC. Signed-off-by: Julien Meunier Signed-off-by: David Marchand --- drivers/net/i40e/i40e_ethdev.c | 39 ++- drivers/net/i40e/i40e_ethdev.h | 1 + 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index bf6220d..ef9d578 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -2332,6 +2332,13 @@ i40e_vlan_offload_set(struct rte_eth_dev *dev, int mask) struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private); struct i40e_vsi *vsi = pf->main_vsi; + if (mask & ETH_VLAN_FILTER_MASK) { + if (dev->data->dev_conf.rxmode.hw_vlan_filter) + i40e_vsi_config_vlan_filter(vsi, TRUE); + else + i40e_vsi_config_vlan_filter(vsi, FALSE); + } + if (mask & ETH_VLAN_STRIP_MASK) { /* Enable or disable VLAN stripping */ if (dev->data->dev_conf.rxmode.hw_vlan_strip) @@ -4156,6 +4163,34 @@ fail_mem: return NULL; } +/* Configure vlan filter on or off */ +int +i40e_vsi_config_vlan_filter(struct i40e_vsi *vsi, bool on) { + struct i40e_hw *hw = I40E_VSI_TO_HW(vsi); + struct i40e_mac_filter_info filter; + int ret; + + rte_memcpy(&filter.mac_addr, + (struct ether_addr *)(hw->mac.perm_addr), ETH_ADDR_LEN); + ret = i40e_vsi_delete_mac(vsi, &filter.mac_addr); + + if (on) { + /* Filter to match MAC and VLAN */ + filter.filter_type = RTE_MACVLAN_PERFECT_MATCH; + } else { + /* Filter to match only MAC */ + filter.filter_type = RTE_MAC_PERFECT_MATCH; + } + + ret |= i40e_vsi_add_mac(vsi, &filter); + + if (ret) + PMD_DRV_LOG(INFO, "Update VSI failed to %s vlan filter", + on ? "enable" : "disable"); + return ret; +} + /* Configure vlan stripping on or off */ int i40e_vsi_config_vlan_stripping(struct i40e_vsi *vsi, bool on) @@ -4203,9 +4238,11 @@ i40e_dev_init_vlan(struct rte_eth_dev *dev) { struct rte_eth_dev_data *data = dev->data; int ret; + int mask = 0; /* Apply vlan offload setting */ - i40e_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK); + mask = ETH_VLAN_STRIP_MASK | ETH_VLAN_FILTER_MASK; + i40e_vlan_offload_set(dev, mask); /* Apply double-vlan setting, not implemented yet */ diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h index 1f9792b..5505d72 100644 --- a/drivers/net/i40e/i40e_ethdev.h +++ b/drivers/net/i40e/i40e_ethdev.h @@ -551,6 +551,7 @@ void i40e_vsi_queues_unbind_intr(struct i40e_vsi *vsi); int i40e_vsi_vlan_pvid_set(struct i40e_vsi *vsi, struct i40e_vsi_vlan_pvid_info *info); int i40e_vsi_config_vlan_stripping(struct i40e_vsi *vsi, bool on); +int i40e_vsi_config_vlan_filter(struct i40e_vsi *vsi, bool on); uint64_t i40e_config_hena(uint64_t flags); uint64_t i40e_parse_hena(uint64_t flags); enum i40e_status_code i40e_fdir_setup_tx_resources(struct i40e_pf *pf); -- 2.1.4
[dpdk-dev] [PATCH v5] eal: fix allocating all free hugepages
Tested-by: Yulong Pei 1. Run dpdk app with multiple mount points, it works as expected. 2. Create new cgroup with limited hugepages like the following, and Run dpdk app with the newly created cgroup, it works as expected. #cgcreate -g hugetlb:/test-subgroup # cgset -r hugetlb.1GB.limit_in_bytes=2147483648 test-subgroup # cgexec -g hugetlb:test-subgroup ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x3 -n 4 -- -i Best Regards Yulong Pei -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Jianfeng Tan Sent: Tuesday, May 31, 2016 11:37 AM To: dev at dpdk.org Cc: Gonzalez Monroy, Sergio ; nhorman at tuxdriver.com; david.marchand at 6wind.com; thomas.monjalon at 6wind.com; Tan, Jianfeng Subject: [dpdk-dev] [PATCH v5] eal: fix allocating all free hugepages EAL memory init allocates all free hugepages of the whole system, which seen from sysfs, even when applications do not ask so many. When there is a limitation on how many hugepages an application can use (such as cgroup.hugetlb), or hugetlbfs is specified with an option of size (exceeding the quota of the fs), it just fails to start even there are enough hugepages allocated. To fix above issue, this patch: - Changes the logic to continue memory init to see if hugetlb requirement of application can be addressed by already allocated hugepages. - To make sure each hugepage is allocated successfully, we add a recover mechanism, which relies on a mem access to fault-in hugepages, and if it fails with SIGBUS, recover to previously saved stack environment with siglongjmp(). For the case of CONFIG_RTE_EAL_SINGLE_FILE_SEGMENTS (enabled by default when compiling IVSHMEM target), it's indispensable to mapp all free hugepages in the system. Under this case, it fails to start when allocating fails. Test example: a. cgcreate -g hugetlb:/test-subgroup b. cgset -r hugetlb.1GB.limit_in_bytes=2147483648 test-subgroup c. cgexec -g hugetlb:test-subgroup \ ./examples/helloworld/build/helloworld -c 0x2 -n 4 Fixes: af75078fece ("first public release") Signed-off-by: Jianfeng Tan Acked-by: Neil Horman --- v5: - Make this method as default instead of using an option. - When SIGBUS is triggered in the case of RTE_EAL_SINGLE_FILE_SEGMENTS, just return error. - Add prefix "huge_" to newly added function and static variables. - Move the internal_config.memory assignment after the page allocations. v4: - Change map_all_hugepages to return unsigned instead of int. v3: - Reword commit message to include it fixes the hugetlbfs quota issue. - setjmp -> sigsetjmp. - Fix RTE_LOG complaint from ERR to DEBUG as it does not mean init error so far. - Fix the second map_all_hugepages's return value check. v2: - Address the compiling error by move setjmp into a wrap method. lib/librte_eal/linuxapp/eal/eal.c| 20 - lib/librte_eal/linuxapp/eal/eal_memory.c | 138 --- 2 files changed, 125 insertions(+), 33 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 8aafd51..4a8dfbd 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -465,24 +465,6 @@ eal_parse_vfio_intr(const char *mode) return -1; } -static inline size_t -eal_get_hugepage_mem_size(void) -{ - uint64_t size = 0; - unsigned i, j; - - for (i = 0; i < internal_config.num_hugepage_sizes; i++) { - struct hugepage_info *hpi = &internal_config.hugepage_info[i]; - if (hpi->hugedir != NULL) { - for (j = 0; j < RTE_MAX_NUMA_NODES; j++) { - size += hpi->hugepage_sz * hpi->num_pages[j]; - } - } - } - - return (size < SIZE_MAX) ? (size_t)(size) : SIZE_MAX; -} - /* Parse the arguments for --log-level only */ static void eal_log_level_parse(int argc, char **argv) @@ -766,8 +748,6 @@ rte_eal_init(int argc, char **argv) if (internal_config.memory == 0 && internal_config.force_sockets == 0) { if (internal_config.no_hugetlbfs) internal_config.memory = MEMSIZE_IF_NO_HUGE_PAGE; - else - internal_config.memory = eal_get_hugepage_mem_size(); } if (internal_config.vmware_tsc_map == 1) { diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c index 5b9132c..dc6f49b 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memory.c +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c @@ -80,6 +80,8 @@ #include #include #include +#include +#include #include #include @@ -309,6 +311,21 @@ get_virtual_area(size_t *size, size_t hugepage_sz) return addr; } +static sigjmp_buf huge_jmpenv; + +static void huge_sigbus_handler(int signo __rte_unused) { + siglongjmp(huge_jmpenv, 1); +} + +/* Put setjmp into a wrap method to avoid compiling error.
[dpdk-dev] [PATCH] i40e: fix the issue dcb cannot be configured when FW version is 5.x
Tested-by: Yulong Pei -Original Message- From: Wu, Jingjing Sent: Monday, November 16, 2015 4:57 PM To: dev at dpdk.org Cc: Wu, Jingjing ; Zhang, Helin ; Pei, Yulong Subject: [PATCH] i40e: fix the issue dcb cannot be configured when FW version is 5.x When NVM version is updated to 5.x, DCB can not be configured. This issue is because of the FW version validation is not correct. This patch fixed this issue. Fixes: c8b9a3e3fe1b (i40e: support DCB mode) Signed-off-by: Jingjing Wu --- drivers/net/i40e/i40e_ethdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 2c51a0b..9003488 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -8316,7 +8316,8 @@ i40e_dcb_hw_configure(struct i40e_pf *pf, uint32_t val; /* Use the FW API if FW > v4.4*/ - if (!((hw->aq.fw_maj_ver == 4) && (hw->aq.fw_min_ver >= 4))) { + if (!(((hw->aq.fw_maj_ver == 4) && (hw->aq.fw_min_ver >= 4)) || + (hw->aq.fw_maj_ver >= 5))) { PMD_INIT_LOG(ERR, "FW < v4.4, can not use FW LLDP API" " to configure DCB"); return I40E_ERR_FIRMWARE_API_VERSION; -- 2.4.0
[dpdk-dev] [PATCH 1/2] mbuf: new NSH packet type
Test-by: Yulong.pei at intel.com ether+nsh ether+nsh+ip ether+nsh+ip+icmp ether+nsh+ip_frag ether+nsh+ip+tcp ether+nsh+ip+udp ether+nsh+ip+sctp ether+nsh+ipv6 ether+nsh+ipv6+icmp ether+nsh+ipv6_frag ether+nsh+ipv6+tcp ether+nsh+ipv6+udp ether+nsh+ipv6+sctp Above combos can be recognized correctly. -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Jingjing Wu Sent: Tuesday, May 3, 2016 1:51 PM To: Zhang, Helin Cc: Wu, Jingjing ; dev at dpdk.org Subject: [dpdk-dev] [PATCH 1/2] mbuf: new NSH packet type Signed-off-by: Jingjing Wu --- lib/librte_mbuf/rte_mbuf.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 529debb..79edae3 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -274,6 +274,13 @@ extern "C" { */ #define RTE_PTYPE_L2_ETHER_LLDP 0x0004 /** + * NSH (Network Service Header) packet type. + * + * Packet format: + * <'ether type'=0x894F> + */ +#define RTE_PTYPE_L2_ETHER_NSH 0x0005 +/** * Mask of layer 2 packet types. * It is used for outer packet for tunneling cases. */ -- 2.4.0
[dpdk-dev] [PATCH 00/22] Generic flow API (rte_flow)
Hi Adrien, I think that you already did test for your patchset, do you have any automated test scripts can be shared for validation since there did not have testpmd flow command documentation yet? Best Regards Yulong Pei -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Adrien Mazarguil Sent: Thursday, November 17, 2016 12:23 AM To: dev at dpdk.org Cc: Thomas Monjalon ; De Lara Guarch, Pablo ; Olivier Matz Subject: [dpdk-dev] [PATCH 00/22] Generic flow API (rte_flow) As previously discussed in RFC v1 [1], RFC v2 [2], with changes described in [3] (also pasted below), here is the first non-draft series for this new API. Its capabilities are so generic that its name had to be vague, it may be called "Generic flow API", "Generic flow interface" (possibly shortened as "GFI") to refer to the name of the new filter type, or "rte_flow" from the prefix used for its public symbols. I personally favor the latter. While it is currently meant to supersede existing filter types in order for all PMDs to expose a common filtering/classification interface, it may eventually evolve to cover the following ideas as well: - Rx/Tx offloads configuration through automatic offloads for specific packets, e.g. performing checksum on TCP packets could be expressed with an egress rule with a TCP pattern and a kind of checksum action. - RSS configuration (already defined actually). Could be global or per rule depending on hardware capabilities. - Switching configuration for devices with many physical ports; rules doing both ingress and egress could even be used to completely bypass software if supported by hardware. [1] http://dpdk.org/ml/archives/dev/2016-July/043365.html [2] http://dpdk.org/ml/archives/dev/2016-August/045383.html [3] http://dpdk.org/ml/archives/dev/2016-November/050044.html Changes since RFC v2: - New separate VLAN pattern item (previously part of the ETH definition), found to be much more convenient. - Removed useless "any" field from VF pattern item, the same effect can be achieved by not providing a specification structure. - Replaced bit-fields from the VXLAN pattern item to avoid endianness conversion issues on 24-bit fields. - Updated struct rte_flow_item with a new "last" field to create inclusive ranges. They are defined as the interval between (spec & mask) and (last & mask). All three parameters are optional. - Renamed ID action MARK. - Renamed "queue" fields in actions QUEUE and DUP to "index". - "rss_conf" field in RSS action is now const. - VF action now uses a 32 bit ID like its pattern item counterpart. - Removed redundant struct rte_flow_pattern, API functions now expect struct rte_flow_item lists terminated by END items. - Replaced struct rte_flow_actions for the same reason, with struct rte_flow_action lists terminated by END actions. - Error types (enum rte_flow_error_type) have been updated and the cause pointer in struct rte_flow_error is now const. - Function prototypes (rte_flow_create, rte_flow_validate) have also been updated for clarity. Additions: - Public wrapper functions rte_flow_{validate|create|destroy|flush|query} are now implemented in rte_flow.c, with their symbols exported and versioned. Related filter type RTE_ETH_FILTER_GENERIC has been added. - A separate header (rte_flow_driver.h) has been added for driver-side functionality, in particular struct rte_flow_ops which contains PMD callbacks returned by RTE_ETH_FILTER_GENERIC query. - testpmd now exposes most of this API through the new "flow" command. What remains to be done: - Using endian-aware integer types (rte_beX_t) where necessary for clarity. - API documentation (based on RFC). - testpmd flow command documentation (although context-aware command completion should already help quite a bit in this regard). - A few pattern item / action properties cannot be configured yet (e.g. rss_conf parameter for RSS action) and a few completions (e.g. possible queue IDs) should be added. Adrien Mazarguil (22): ethdev: introduce generic flow API cmdline: add support for dynamic tokens cmdline: add alignment constraint app/testpmd: implement basic support for rte_flow app/testpmd: add flow command app/testpmd: add rte_flow integer support app/testpmd: add flow list command app/testpmd: add flow flush command app/testpmd: add flow destroy command app/testpmd: add flow validate/create commands app/testpmd: add flow query command app/testpmd: add rte_flow item spec handler app/testpmd: add rte_flow item spec prefix length app/testpmd: add rte_flow bit-field support app/testpmd: add item any to flow command app/testpmd: add various items to flow command app/testpmd: add item raw to flow command app/testpmd: add items eth/vlan to flow command app/testpmd: add items ipv4/ipv6 to flow command app/testpmd: add L4 items to flow command app/testpmd: add various actions to flow command