[dpdk-dev] [PATCH v5 0/2] i40e setting ether type of VLANs
It adds setting ether type of both single VLAN(inner VLAN) and outer VLAN for i40e. For ixgbe and e1000/igb, it supports setting single VLAN(inner VLAN) only, and can be extended in the future. The patch set was branched off rel_16_04 of repo dpdk-next-net, on below commit. commit 5721e6447b5c20208a32c919a509e89d78c3e68d Author: Robin Jarry Date: Thu Mar 3 15:27:40 2016 +0100 mlx4: ensure number of RX queues is a power of 2 v5: - Removed the versioning mechanism, as ABI broken is already there allowed. v4: - Updated the doc of testpmd guide. v3: - Used versioning mechanism to avoid ABI issue. - Re-organized the patch set. v2: - Used RTE_NEXT_ABI to avoid ABI change issue. - Reworked the announcement of ABI change for release 16.07. - Fixed a i40e overflow issue. Helin Zhang (2): ethdev: add vlan type for setting ether type i40e: fix the overflow issue app/test-pmd/cmdline.c | 30 +++ app/test-pmd/config.c | 9 ++-- app/test-pmd/testpmd.h | 3 +- doc/guides/rel_notes/release_16_04.rst | 5 ++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 11 +--- drivers/net/e1000/igb_ethdev.c | 27 +++--- drivers/net/i40e/i40e_ethdev.c | 79 +++-- drivers/net/i40e/i40e_rxtx.c| 4 +- drivers/net/ixgbe/ixgbe_ethdev.c| 25 +++-- lib/librte_ether/rte_ethdev.c | 7 +-- lib/librte_ether/rte_ethdev.h | 21 ++-- lib/librte_ether/rte_ether_version.map | 7 +++ 12 files changed, 181 insertions(+), 47 deletions(-) -- 2.5.0
[dpdk-dev] [PATCH v5 1/2] ethdev: add vlan type for setting ether type
In order to set ether type of VLAN for single VLAN, inner and outer VLAN, the VLAN type as an input parameter is added to 'rte_eth_dev_set_vlan_ether_type()'. In addition, corresponding changes in e1000, ixgbe and i40e are also added. Signed-off-by: Helin Zhang Acked-by: Wenzhuo Lu --- app/test-pmd/cmdline.c | 30 +++ app/test-pmd/config.c | 9 ++-- app/test-pmd/testpmd.h | 3 +- doc/guides/rel_notes/release_16_04.rst | 5 ++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 11 +--- drivers/net/e1000/igb_ethdev.c | 27 +++--- drivers/net/i40e/i40e_ethdev.c | 79 +++-- drivers/net/ixgbe/ixgbe_ethdev.c| 25 +++-- lib/librte_ether/rte_ethdev.c | 7 +-- lib/librte_ether/rte_ethdev.h | 21 ++-- lib/librte_ether/rte_ether_version.map | 7 +++ 11 files changed, 179 insertions(+), 45 deletions(-) v5: - Removed the versioning mechanism, as ABI broken is already there allowed. v4: - Updated the doc of testpmd guide. v3: - Used versioning mechanism to avoid ABI issue. - Re-organized the patch set. v2: - Used RTE_NEXT_ABI to avoid ABI change issue. - Reworked the announcement of ABI change for release 16.07. diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 52e9f5f..1eeb8a8 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -277,8 +277,8 @@ static void cmd_help_long_parsed(void *parsed_result, "Set the VLAN QinQ (extended queue in queue)" " on a port.\n\n" - "vlan set tpid (value) (port_id)\n" - "Set the outer VLAN TPID for Packet Filtering on" + "vlan set (inner|outer) tpid (value) (port_id)\n" + "Set the VLAN TPID for Packet Filtering on" " a port\n\n" "rx_vlan add (vlan_id|all) (port_id)\n" @@ -297,10 +297,6 @@ static void cmd_help_long_parsed(void *parsed_result, "Remove a vlan_id, to the set of VLAN identifiers" "filtered for VF(s) from port_id.\n\n" - "rx_vlan set tpid (value) (port_id)\n" - "Set the outer VLAN TPID for Packet Filtering on" - " a port\n\n" - "tunnel_filter add (port_id) (outer_mac) (inner_mac) (ip_addr) " "(inner_vlan) (vxlan|nvgre) (filter_type) (tenant_id) (queue_id)\n" " add a tunnel filter of a port.\n\n" @@ -2747,6 +2743,7 @@ cmdline_parse_inst_t cmd_rx_vlan_filter_all = { struct cmd_vlan_offload_result { cmdline_fixed_string_t vlan; cmdline_fixed_string_t set; + cmdline_fixed_string_t vlan_type; cmdline_fixed_string_t what; cmdline_fixed_string_t on; cmdline_fixed_string_t port_id; @@ -2847,6 +2844,7 @@ cmdline_parse_inst_t cmd_vlan_offload = { struct cmd_vlan_tpid_result { cmdline_fixed_string_t vlan; cmdline_fixed_string_t set; + cmdline_fixed_string_t vlan_type; cmdline_fixed_string_t what; uint16_t tp_id; uint8_t port_id; @@ -2858,8 +2856,17 @@ cmd_vlan_tpid_parsed(void *parsed_result, __attribute__((unused)) void *data) { struct cmd_vlan_tpid_result *res = parsed_result; - vlan_tpid_set(res->port_id, res->tp_id); - return; + enum rte_vlan_type vlan_type; + + if (!strcmp(res->vlan_type, "inner")) + vlan_type = ETH_VLAN_TYPE_INNER; + else if (!strcmp(res->vlan_type, "outer")) + vlan_type = ETH_VLAN_TYPE_OUTER; + else { + printf("Unknown vlan type\n"); + return; + } + vlan_tpid_set(res->port_id, vlan_type, res->tp_id); } cmdline_parse_token_string_t cmd_vlan_tpid_vlan = @@ -2868,6 +2875,9 @@ cmdline_parse_token_string_t cmd_vlan_tpid_vlan = cmdline_parse_token_string_t cmd_vlan_tpid_set = TOKEN_STRING_INITIALIZER(struct cmd_vlan_tpid_result, set, "set"); +cmdline_parse_token_string_t cmd_vlan_type = + TOKEN_STRING_INITIALIZER(struct cmd_vlan_tpid_result, +vlan_type, "inner#outer"); cmdline_parse_token_string_t cmd_vlan_tpid_what = TOKEN_STRING_INITIALIZER(struct cmd_vlan_tpid_result, what, "tpid"); @@ -2881,10 +2891,12 @@ cmdline_parse_token_num_t cmd_vlan_tpid_portid = cmdline_parse_inst_t cmd_vlan_tpid = { .f = cmd_vlan_tpid_parsed, .data = NULL, - .help_str = "set tpid tp_id port_id, set the Outer VLAN Ether type", + .help_str = "set inner|outer tpid tp_id port_id, set the VLAN " + "Ether type", .tokens = { (void *)&cmd_vlan_tpid_vlan,
[dpdk-dev] [PATCH v5 2/2] i40e: fix the overflow issue
The array 'ptype_table' was defined in depth of 'UINT8_MAX' which is 255, while the querying index could be from 0 to 255. The issue can be fixed with expanding the array to one more element. Fixes: 9571ea028489 ("i40e: replace some offload flags with unified packet type") Signed-off-by: Helin Zhang Acked-by: Wenzhuo Lu --- drivers/net/i40e/i40e_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index f8efdce..e0c9bb6 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -198,7 +198,7 @@ i40e_get_iee15888_flags(struct rte_mbuf *mb, uint64_t qword) static inline uint32_t i40e_rxd_pkt_type_mapping(uint8_t ptype) { - static const uint32_t ptype_table[UINT8_MAX] __rte_cache_aligned = { + static const uint32_t type_table[UINT8_MAX + 1] __rte_cache_aligned = { /* L2 types */ /* [0] reserved */ [1] = RTE_PTYPE_L2_ETHER, @@ -724,7 +724,7 @@ i40e_rxd_pkt_type_mapping(uint8_t ptype) /* All others reserved */ }; - return ptype_table[ptype]; + return type_table[ptype]; } #define I40E_RX_DESC_EXT_STATUS_FLEXBH_MASK 0x03 -- 2.5.0
[dpdk-dev] [PATCH v9 1/5] lib/librte_ether: change function name of tunnel port config
2016-03-10 10:42, Wenzhuo Lu: > The names of function for tunnel port configuration are not > accurate. They're tunnel_add/del, better change them to > tunnel_port_add/del. > As it may be an ABI change if change the names directly, the > new functions are added but not remove the old ones. The old > ones will be removed in the next release after an ABI change > announcement. As the API/ABI compatibility is already broken in this release, I suggest to just rename the functions without keeping the old ones. Then this patch should be merge with the next one. I plan do it before applying.
[dpdk-dev] mailing list configuration
Hi all, Please find an information notice about mailman running this mailing list. You can change your settings at this URL: http://dpdk.org/ml/options/dev/ There is an option "nodupes": " Avoid duplicate copies of messages? When you are listed explicitly in the To: or Cc: headers of a list message, you can opt to not receive another copy from the mailing list. " It is enabled most of the time (default). It may be helpful to disable "nodupes", i.e. receive copies, to filter whole threads from the mailing list (List-Id) in a folder while keeping a copy of the messages addressed to you in your inbox. It is a way to avoid missing important messages. For those who want to keep "nodupes" enabled, i.e. receive only one copy, mailman will not send them the messages where they are explicit recipients. So they will receive only the message directly from the sender' SMTP (untouched by mailman). But it is not the full story. The other members of the mailing list will receive the message from mailman with a modified CC header. Indeed, members having enabled "nodupes" are dropped from CC list. Some members were complaining about this weird bug-haviour. That's why this patch has been applied to keep CC list untouched: --- mailman-2.1.15/Handlers/AvoidDuplicates.py +++ mailman-2.1.15/Handlers/AvoidDuplicates.py @@ -51,12 +51,8 @@ for addr in listaddrs: explicit_recips[addr.lower()] = True # Figure out the set of explicit recipients -ccaddrs = {} for header in ('to', 'cc', 'resent-to', 'resent-cc'): addrs = getaddresses(msg.get_all(header, [])) -if header == 'cc': -for name, addr in addrs: -ccaddrs[addr.lower()] = name, addr for name, addr in addrs: if not addr: continue @@ -85,8 +81,6 @@ if send_duplicate: msgdata.setdefault('add-dup-header', {})[r] = True newrecips.append(r) -elif ccaddrs.has_key(r.lower()): -del ccaddrs[r.lower()] else: # Otherwise, this is the first time they've been in the recips # list. Add them to the newrecips list and flag them as having @@ -94,7 +88,3 @@ newrecips.append(r) # Set the new list of recipients msgdata['recips'] = newrecips -# RFC 2822 specifies zero or one CC header -del msg['cc'] -if ccaddrs: -msg['Cc'] = COMMASPACE.join([formataddr(i) for i in ccaddrs.values()]) Thanks to Olivier for helping. If anyone is volunteer to work with mailman community, a configuration option could be introduced.