struct rte_eth_tunnel_filter_conf tunnel_filter_conf;
int ret = 0;
- tunnel_filter_conf.outer_mac = &res->outer_mac;
- tunnel_filter_conf.inner_mac = &res->inner_mac;
+ ether_addr_copy(&res->outer_mac, &tunnel_filter_conf.outer_mac);
+ ether_addr_copy(&res->inner_mac, &tunnel_filter_conf.inner_mac);
tunnel_filter_conf.inner_vlan = res->inner_vlan;
if (res->ip_value.family == AF_INET) {
RTE_ETH_FLOW_MAX. The release 2.2 does not contain these ABI changes,
but release 2.3 will.
-* ABI changes are planned for rte_eth_tunnel_filter_conf. Change the fields
- of outer_mac and inner_mac from pointer to struct in order to keep the
- code's readability. The release 2.2 does not contain these ABI changes, but
- release 2.3 will, and no backwards compatibility is planned.
-
* The scheduler statistics structure will change to allow keeping track of
RED actions.
have been renamed into ``rte_eth_dev_udp_tunnel_port_add`` and
``rte_eth_dev_udp_tunnel_port_delete``.
+* The ``outer_mac`` and ``inner_mac`` fields in structure
+ ``rte_eth_tunnel_filter_conf`` are changed from pointer to struct in order
+ to keep code's readability.
+
* The fields in ethdev structure ``rte_eth_fdir_masks`` were changed
to be in big endian.
}
pfilter = cld_filter;
- (void)rte_memcpy(&pfilter->outer_mac, tunnel_filter->outer_mac,
- sizeof(struct ether_addr));
- (void)rte_memcpy(&pfilter->inner_mac, tunnel_filter->inner_mac,
- sizeof(struct ether_addr));
+ ether_addr_copy(&tunnel_filter->outer_mac, (struct ether_addr*)&pfilter->outer_mac);
+ ether_addr_copy(&tunnel_filter->inner_mac, (struct ether_addr*)&pfilter->inner_mac);
pfilter->inner_vlan = tunnel_filter->inner_vlan;
if (tunnel_filter->ip_type == RTE_TUNNEL_IPTYPE_IPV4) {
}
if ((filter->filter_type & ETH_TUNNEL_FILTER_OMAC) &&
- (is_zero_ether_addr(filter->outer_mac))) {
+ (is_zero_ether_addr(&filter->outer_mac))) {
PMD_DRV_LOG(ERR, "Cannot add NULL outer MAC address");
return -EINVAL;
}
if ((filter->filter_type & ETH_TUNNEL_FILTER_IMAC) &&
- (is_zero_ether_addr(filter->inner_mac))) {
+ (is_zero_ether_addr(&filter->inner_mac))) {
PMD_DRV_LOG(ERR, "Cannot add NULL inner MAC address");
return -EINVAL;
}
memset(&tunnel_filter_conf, 0,
sizeof(struct rte_eth_tunnel_filter_conf));
- tunnel_filter_conf.outer_mac = &ports_eth_addr[0];
+ ether_addr_copy(&ports_eth_addr[0], &tunnel_filter_conf.outer_mac);
tunnel_filter_conf.filter_type = tep_filter_type[filter_idx];
/* inner MAC */
- tunnel_filter_conf.inner_mac = &vdev->mac_address;
+ ether_addr_copy(&vdev->mac_address, &tunnel_filter_conf.inner_mac);
tunnel_filter_conf.queue_id = vdev->rx_q;
tunnel_filter_conf.tenant_id = tenant_id_conf[vdev->rx_q];
memset(&tunnel_filter_conf, 0,
sizeof(struct rte_eth_tunnel_filter_conf));
- tunnel_filter_conf.outer_mac = &ports_eth_addr[0];
- tunnel_filter_conf.inner_mac = &vdev->mac_address;
+ ether_addr_copy(&ports_eth_addr[0], &tunnel_filter_conf.outer_mac);
+ ether_addr_copy(&vdev->mac_address, &tunnel_filter_conf.inner_mac);
tunnel_filter_conf.tenant_id = tenant_id_conf[vdev->rx_q];
tunnel_filter_conf.filter_type = tep_filter_type[filter_idx];
* Tunneling Packet filter configuration.
*/
struct rte_eth_tunnel_filter_conf {
- struct ether_addr *outer_mac; /**< Outer MAC address filter. */
- struct ether_addr *inner_mac; /**< Inner MAC address filter. */
+ struct ether_addr outer_mac; /**< Outer MAC address filter. */
+ struct ether_addr inner_mac; /**< Inner MAC address filter. */
uint16_t inner_vlan; /**< Inner VLAN filter. */
enum rte_tunnel_iptype ip_type; /**< IP address type. */
union {