summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorOlivier Matz <olivier.matz@6wind.com>2019-05-21 18:13:03 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2019-05-24 13:34:45 +0200
commit6d13ea8e8e49ab957deae2bba5ecf4a4bfe747d1 (patch)
tree0108d8e1701d235beebca6d96c4af03426f594ff /drivers/net
parente482e0fa6a106c548afe9c52e71abf3a70848d46 (diff)
downloaddpdk-6d13ea8e8e49ab957deae2bba5ecf4a4bfe747d1.zip
dpdk-6d13ea8e8e49ab957deae2bba5ecf4a4bfe747d1.tar.gz
dpdk-6d13ea8e8e49ab957deae2bba5ecf4a4bfe747d1.tar.xz
net: add rte prefix to ether structures
Add 'rte_' prefix to structures: - rename struct ether_addr as struct rte_ether_addr. - rename struct ether_hdr as struct rte_ether_hdr. - rename struct vlan_hdr as struct rte_vlan_hdr. - rename struct vxlan_hdr as struct rte_vxlan_hdr. - rename struct vxlan_gpe_hdr as struct rte_vxlan_gpe_hdr. Do not update the command line library to avoid adding a dependency to librte_net. Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/af_packet/rte_eth_af_packet.c2
-rw-r--r--drivers/net/af_xdp/rte_eth_af_xdp.c4
-rw-r--r--drivers/net/ark/ark_ethdev.c14
-rw-r--r--drivers/net/ark/ark_ext.h4
-rw-r--r--drivers/net/ark/ark_global.h5
-rw-r--r--drivers/net/atlantic/atl_ethdev.c12
-rw-r--r--drivers/net/atlantic/hw_atl/hw_atl_utils.c8
-rw-r--r--drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c4
-rw-r--r--drivers/net/avp/avp_ethdev.c6
-rw-r--r--drivers/net/axgbe/axgbe_ethdev.h2
-rw-r--r--drivers/net/bnx2x/bnx2x.c8
-rw-r--r--drivers/net/bnx2x/bnx2x_ethdev.c5
-rw-r--r--drivers/net/bnx2x/bnx2x_ethdev.h3
-rw-r--r--drivers/net/bnx2x/bnx2x_vfpf.c2
-rw-r--r--drivers/net/bnx2x/bnx2x_vfpf.h2
-rw-r--r--drivers/net/bnxt/bnxt_ethdev.c7
-rw-r--r--drivers/net/bnxt/bnxt_hwrm.c4
-rw-r--r--drivers/net/bnxt/bnxt_hwrm.h2
-rw-r--r--drivers/net/bnxt/rte_pmd_bnxt.c6
-rw-r--r--drivers/net/bnxt/rte_pmd_bnxt.h4
-rw-r--r--drivers/net/bonding/rte_eth_bond.h2
-rw-r--r--drivers/net/bonding/rte_eth_bond_8023ad.c6
-rw-r--r--drivers/net/bonding/rte_eth_bond_8023ad.h10
-rw-r--r--drivers/net/bonding/rte_eth_bond_8023ad_private.h2
-rw-r--r--drivers/net/bonding/rte_eth_bond_alb.c28
-rw-r--r--drivers/net/bonding/rte_eth_bond_alb.h10
-rw-r--r--drivers/net/bonding/rte_eth_bond_api.c2
-rw-r--r--drivers/net/bonding/rte_eth_bond_args.c2
-rw-r--r--drivers/net/bonding/rte_eth_bond_pmd.c93
-rw-r--r--drivers/net/bonding/rte_eth_bond_private.h8
-rw-r--r--drivers/net/cxgbe/base/adapter.h2
-rw-r--r--drivers/net/cxgbe/cxgbe_ethdev.c2
-rw-r--r--drivers/net/cxgbe/cxgbe_pfvf.h2
-rw-r--r--drivers/net/dpaa/dpaa_ethdev.c4
-rw-r--r--drivers/net/dpaa/dpaa_rxtx.c3
-rw-r--r--drivers/net/dpaa2/dpaa2_ethdev.c19
-rw-r--r--drivers/net/dpaa2/dpaa2_flow.c18
-rw-r--r--drivers/net/e1000/em_ethdev.c17
-rw-r--r--drivers/net/e1000/igb_ethdev.c26
-rw-r--r--drivers/net/e1000/igb_pf.c4
-rw-r--r--drivers/net/ena/ena_ethdev.c8
-rw-r--r--drivers/net/enetc/enetc_ethdev.c2
-rw-r--r--drivers/net/enic/enic.h2
-rw-r--r--drivers/net/enic/enic_ethdev.c12
-rw-r--r--drivers/net/enic/enic_flow.c34
-rw-r--r--drivers/net/enic/enic_main.c4
-rw-r--r--drivers/net/failsafe/failsafe.c2
-rw-r--r--drivers/net/failsafe/failsafe_args.c2
-rw-r--r--drivers/net/failsafe/failsafe_ether.c2
-rw-r--r--drivers/net/failsafe/failsafe_ops.c6
-rw-r--r--drivers/net/failsafe/failsafe_private.h4
-rw-r--r--drivers/net/fm10k/fm10k_ethdev.c8
-rw-r--r--drivers/net/i40e/i40e_ethdev.c58
-rw-r--r--drivers/net/i40e/i40e_ethdev.h21
-rw-r--r--drivers/net/i40e/i40e_ethdev_vf.c32
-rw-r--r--drivers/net/i40e/i40e_fdir.c8
-rw-r--r--drivers/net/i40e/i40e_flow.c8
-rw-r--r--drivers/net/i40e/i40e_pf.c10
-rw-r--r--drivers/net/i40e/i40e_vf_representor.c2
-rw-r--r--drivers/net/i40e/rte_pmd_i40e.c15
-rw-r--r--drivers/net/i40e/rte_pmd_i40e.h8
-rw-r--r--drivers/net/iavf/iavf.h2
-rw-r--r--drivers/net/iavf/iavf_ethdev.c23
-rw-r--r--drivers/net/iavf/iavf_vchnl.c4
-rw-r--r--drivers/net/ice/ice_ethdev.c31
-rw-r--r--drivers/net/ice/ice_ethdev.h4
-rw-r--r--drivers/net/ipn3ke/ipn3ke_ethdev.h4
-rw-r--r--drivers/net/ipn3ke/ipn3ke_representor.c4
-rw-r--r--drivers/net/ixgbe/ixgbe_ethdev.c52
-rw-r--r--drivers/net/ixgbe/ixgbe_pf.c2
-rw-r--r--drivers/net/ixgbe/ixgbe_vf_representor.c4
-rw-r--r--drivers/net/ixgbe/rte_pmd_ixgbe.c4
-rw-r--r--drivers/net/ixgbe/rte_pmd_ixgbe.h2
-rw-r--r--drivers/net/kni/rte_eth_kni.c2
-rw-r--r--drivers/net/liquidio/lio_ethdev.c3
-rw-r--r--drivers/net/mlx4/mlx4.c2
-rw-r--r--drivers/net/mlx4/mlx4.h8
-rw-r--r--drivers/net/mlx4/mlx4_ethdev.c6
-rw-r--r--drivers/net/mlx4/mlx4_flow.c4
-rw-r--r--drivers/net/mlx5/mlx5.c2
-rw-r--r--drivers/net/mlx5/mlx5.h13
-rw-r--r--drivers/net/mlx5/mlx5_flow_dv.c16
-rw-r--r--drivers/net/mlx5/mlx5_flow_tcf.c10
-rw-r--r--drivers/net/mlx5/mlx5_mac.c10
-rw-r--r--drivers/net/mlx5/mlx5_nl.c14
-rw-r--r--drivers/net/mlx5/mlx5_rxtx.h2
-rw-r--r--drivers/net/mlx5/mlx5_trigger.c4
-rw-r--r--drivers/net/mvneta/mvneta_ethdev.c4
-rw-r--r--drivers/net/mvpp2/mrvl_ethdev.c4
-rw-r--r--drivers/net/mvpp2/mrvl_flow.c2
-rw-r--r--drivers/net/netvsc/hn_ethdev.c2
-rw-r--r--drivers/net/netvsc/hn_rxtx.c4
-rw-r--r--drivers/net/netvsc/hn_var.h4
-rw-r--r--drivers/net/netvsc/hn_vf.c6
-rw-r--r--drivers/net/nfb/nfb_ethdev.c8
-rw-r--r--drivers/net/nfp/nfp_net.c9
-rw-r--r--drivers/net/null/rte_eth_null.c4
-rw-r--r--drivers/net/octeontx/octeontx_ethdev.c2
-rw-r--r--drivers/net/pcap/rte_eth_pcap.c4
-rw-r--r--drivers/net/qede/qede_ethdev.c34
-rw-r--r--drivers/net/qede/qede_ethdev.h6
-rw-r--r--drivers/net/qede/qede_filter.c4
-rw-r--r--drivers/net/qede/qede_if.h2
-rw-r--r--drivers/net/qede/qede_rxtx.c14
-rw-r--r--drivers/net/ring/rte_eth_ring.c4
-rw-r--r--drivers/net/sfc/sfc.h2
-rw-r--r--drivers/net/sfc/sfc_ethdev.c12
-rw-r--r--drivers/net/sfc/sfc_port.c6
-rw-r--r--drivers/net/softnic/parser.c12
-rw-r--r--drivers/net/softnic/parser.h2
-rw-r--r--drivers/net/softnic/rte_eth_softnic.c2
-rw-r--r--drivers/net/szedata2/rte_eth_szedata2.c6
-rw-r--r--drivers/net/tap/rte_eth_tap.c21
-rw-r--r--drivers/net/tap/rte_eth_tap.h4
-rw-r--r--drivers/net/tap/tap_bpf_program.c8
-rw-r--r--drivers/net/thunderx/base/nicvf_plat.h3
-rw-r--r--drivers/net/thunderx/nicvf_ethdev.c4
-rw-r--r--drivers/net/vdev_netvsc/vdev_netvsc.c12
-rw-r--r--drivers/net/vhost/rte_eth_vhost.c8
-rw-r--r--drivers/net/virtio/virtio_ethdev.c18
-rw-r--r--drivers/net/virtio/virtio_rxtx.c4
-rw-r--r--drivers/net/vmxnet3/vmxnet3_ethdev.c8
-rw-r--r--drivers/net/vmxnet3/vmxnet3_rxtx.c6
123 files changed, 572 insertions, 527 deletions
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 99e13fe..b5c4bef 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -73,7 +73,7 @@ struct pmd_internals {
int if_index;
char *if_name;
- struct ether_addr eth_addr;
+ struct rte_ether_addr eth_addr;
struct tpacket_req req;
diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 35c7227..893c9ed 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -109,7 +109,7 @@ struct pmd_internals {
int if_index;
char if_name[IFNAMSIZ];
uint16_t queue_idx;
- struct ether_addr eth_addr;
+ struct rte_ether_addr eth_addr;
struct xsk_umem_info *umem;
struct rte_mempool *mb_pool_share;
@@ -798,7 +798,7 @@ free_kvlist:
static int
get_iface_info(const char *if_name,
- struct ether_addr *eth_addr,
+ struct rte_ether_addr *eth_addr,
int *if_index)
{
struct ifreq ifr;
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index 4f52e2b..6a1530a 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -41,9 +41,9 @@ static int eth_ark_dev_stats_get(struct rte_eth_dev *dev,
struct rte_eth_stats *stats);
static void eth_ark_dev_stats_reset(struct rte_eth_dev *dev);
static int eth_ark_set_default_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr);
+ struct rte_ether_addr *mac_addr);
static int eth_ark_macaddr_add(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr,
+ struct rte_ether_addr *mac_addr,
uint32_t index,
uint32_t pool);
static void eth_ark_macaddr_remove(struct rte_eth_dev *dev,
@@ -220,14 +220,14 @@ check_for_ext(struct ark_adapter *ark)
(void (*)(struct rte_eth_dev *, void *))
dlsym(ark->d_handle, "stats_reset");
ark->user_ext.mac_addr_add =
- (void (*)(struct rte_eth_dev *, struct ether_addr *, uint32_t,
- uint32_t, void *))
+ (void (*)(struct rte_eth_dev *, struct rte_ether_addr *,
+ uint32_t, uint32_t, void *))
dlsym(ark->d_handle, "mac_addr_add");
ark->user_ext.mac_addr_remove =
(void (*)(struct rte_eth_dev *, uint32_t, void *))
dlsym(ark->d_handle, "mac_addr_remove");
ark->user_ext.mac_addr_set =
- (void (*)(struct rte_eth_dev *, struct ether_addr *,
+ (void (*)(struct rte_eth_dev *, struct rte_ether_addr *,
void *))
dlsym(ark->d_handle, "mac_addr_set");
ark->user_ext.set_mtu =
@@ -833,7 +833,7 @@ eth_ark_dev_stats_reset(struct rte_eth_dev *dev)
static int
eth_ark_macaddr_add(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr,
+ struct rte_ether_addr *mac_addr,
uint32_t index,
uint32_t pool)
{
@@ -864,7 +864,7 @@ eth_ark_macaddr_remove(struct rte_eth_dev *dev, uint32_t index)
static int
eth_ark_set_default_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr)
+ struct rte_ether_addr *mac_addr)
{
struct ark_adapter *ark =
(struct ark_adapter *)dev->data->dev_private;
diff --git a/drivers/net/ark/ark_ext.h b/drivers/net/ark/ark_ext.h
index f5af215..5a987e4 100644
--- a/drivers/net/ark/ark_ext.h
+++ b/drivers/net/ark/ark_ext.h
@@ -70,7 +70,7 @@ void stats_reset(struct rte_eth_dev *dev,
void *user_data);
void mac_addr_add(struct rte_eth_dev *dev,
- struct ether_addr *macadr,
+ struct rte_ether_addr *macadr,
uint32_t index,
uint32_t pool,
void *user_data);
@@ -80,7 +80,7 @@ void mac_addr_remove(struct rte_eth_dev *dev,
void *user_data);
void mac_addr_set(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr,
+ struct rte_ether_addr *mac_addr,
void *user_data);
int set_mtu(struct rte_eth_dev *dev,
diff --git a/drivers/net/ark/ark_global.h b/drivers/net/ark/ark_global.h
index f820091..403df59 100644
--- a/drivers/net/ark/ark_global.h
+++ b/drivers/net/ark/ark_global.h
@@ -71,12 +71,13 @@ struct ark_user_ext {
int (*stats_get)(struct rte_eth_dev *, struct rte_eth_stats *, void *);
void (*stats_reset)(struct rte_eth_dev *, void *);
void (*mac_addr_add)(struct rte_eth_dev *,
- struct ether_addr *,
+ struct rte_ether_addr *,
uint32_t,
uint32_t,
void *);
void (*mac_addr_remove)(struct rte_eth_dev *, uint32_t, void *);
- void (*mac_addr_set)(struct rte_eth_dev *, struct ether_addr *, void *);
+ void (*mac_addr_set)(struct rte_eth_dev *, struct rte_ether_addr *,
+ void *);
int (*set_mtu)(struct rte_eth_dev *, uint16_t, void *);
};
diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index c9c1795..9460318 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -93,14 +93,14 @@ static void atl_dev_interrupt_handler(void *param);
static int atl_add_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr,
+ struct rte_ether_addr *mac_addr,
uint32_t index, uint32_t pool);
static void atl_remove_mac_addr(struct rte_eth_dev *dev, uint32_t index);
static int atl_set_default_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr);
+ struct rte_ether_addr *mac_addr);
static int atl_dev_set_mc_addr_list(struct rte_eth_dev *dev,
- struct ether_addr *mc_addr_set,
+ struct rte_ether_addr *mc_addr_set,
uint32_t nb_mc_addr);
/* RSS */
@@ -1575,7 +1575,7 @@ atl_update_mac_addr(struct rte_eth_dev *dev, uint32_t index,
}
static int
-atl_add_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
+atl_add_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
uint32_t index __rte_unused, uint32_t pool __rte_unused)
{
if (is_zero_ether_addr(mac_addr)) {
@@ -1593,7 +1593,7 @@ atl_remove_mac_addr(struct rte_eth_dev *dev, uint32_t index)
}
static int
-atl_set_default_mac_addr(struct rte_eth_dev *dev, struct ether_addr *addr)
+atl_set_default_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *addr)
{
atl_remove_mac_addr(dev, 0);
atl_add_mac_addr(dev, addr, 0, 0);
@@ -1760,7 +1760,7 @@ atl_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue_id, int on)
static int
atl_dev_set_mc_addr_list(struct rte_eth_dev *dev,
- struct ether_addr *mc_addr_set,
+ struct rte_ether_addr *mc_addr_set,
uint32_t nb_mc_addr)
{
struct aq_hw_s *hw = ATL_DEV_PRIVATE_TO_HW(dev->data->dev_private);
diff --git a/drivers/net/atlantic/hw_atl/hw_atl_utils.c b/drivers/net/atlantic/hw_atl/hw_atl_utils.c
index b399ae3..26a53a2 100644
--- a/drivers/net/atlantic/hw_atl/hw_atl_utils.c
+++ b/drivers/net/atlantic/hw_atl/hw_atl_utils.c
@@ -657,8 +657,8 @@ static int hw_atl_utils_get_mac_permanent(struct aq_hw_s *self,
mac_addr[1] = rte_constant_bswap32(mac_addr[1]);
}
- ether_addr_copy((struct ether_addr *)mac_addr,
- (struct ether_addr *)mac);
+ ether_addr_copy((struct rte_ether_addr *)mac_addr,
+ (struct rte_ether_addr *)mac);
if ((mac[0] & 0x01U) || ((mac[0] | mac[1] | mac[2]) == 0x00U)) {
/* chip revision */
@@ -868,8 +868,8 @@ static int aq_fw1x_set_wol(struct aq_hw_s *self, bool wol_enabled, u8 *mac)
prpc->msg_wol.pattern_id = 1U;
prpc->msg_wol.wol_packet_type = 2U; /* Magic Packet */
- ether_addr_copy((struct ether_addr *)mac,
- (struct ether_addr *)&prpc->msg_wol.wol_pattern);
+ ether_addr_copy((struct rte_ether_addr *)mac,
+ (struct rte_ether_addr *)&prpc->msg_wol.wol_pattern);
} else {
rpc_size = sizeof(prpc->msg_id) + sizeof(prpc->msg_del_id);
diff --git a/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c b/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c
index 5927d90..55b5ce3 100644
--- a/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c
+++ b/drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c
@@ -228,8 +228,8 @@ int aq_fw2x_get_mac_permanent(struct aq_hw_s *self, u8 *mac)
mac_addr[1] = rte_constant_bswap32(mac_addr[1]);
}
- ether_addr_copy((struct ether_addr *)mac_addr,
- (struct ether_addr *)mac);
+ ether_addr_copy((struct rte_ether_addr *)mac_addr,
+ (struct rte_ether_addr *)mac);
if ((mac[0] & 0x01U) || ((mac[0] | mac[1] | mac[2]) == 0x00U)) {
unsigned int rnd = (uint32_t)rte_rand();
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index 09388d0..69a70d2 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -159,7 +159,7 @@ static const struct eth_dev_ops avp_eth_dev_ops = {
struct avp_dev {
uint32_t magic; /**< Memory validation marker */
uint64_t device_id; /**< Unique system identifier */
- struct ether_addr ethaddr; /**< Host specified MAC address */
+ struct rte_ether_addr ethaddr; /**< Host specified MAC address */
struct rte_eth_dev_data *dev_data;
/**< Back pointer to ethernet device data */
volatile uint32_t flags; /**< Device operational flags */
@@ -1199,7 +1199,7 @@ avp_dev_tx_queue_setup(struct rte_eth_dev *eth_dev,
}
static inline int
-_avp_cmp_ether_addr(struct ether_addr *a, struct ether_addr *b)
+_avp_cmp_ether_addr(struct rte_ether_addr *a, struct rte_ether_addr *b)
{
uint16_t *_a = (uint16_t *)&a->addr_bytes[0];
uint16_t *_b = (uint16_t *)&b->addr_bytes[0];
@@ -1209,7 +1209,7 @@ _avp_cmp_ether_addr(struct ether_addr *a, struct ether_addr *b)
static inline int
_avp_mac_filter(struct avp_dev *avp, struct rte_mbuf *m)
{
- struct ether_hdr *eth = rte_pktmbuf_mtod(m, struct ether_hdr *);
+ struct rte_ether_hdr *eth = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
if (likely(_avp_cmp_ether_addr(&avp->ethaddr, &eth->d_addr) == 0)) {
/* allow all packets destined to our address */
diff --git a/drivers/net/axgbe/axgbe_ethdev.h b/drivers/net/axgbe/axgbe_ethdev.h
index b1cd298..810ac4a 100644
--- a/drivers/net/axgbe/axgbe_ethdev.h
+++ b/drivers/net/axgbe/axgbe_ethdev.h
@@ -539,7 +539,7 @@ struct axgbe_port {
/* Hardware features of the device */
struct axgbe_hw_features hw_feat;
- struct ether_addr mac_addr;
+ struct rte_ether_addr mac_addr;
/* Software Tx/Rx structure pointers*/
void **rx_queues;
diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 3e705c7..17b6817 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -2197,8 +2197,8 @@ int bnx2x_tx_encap(struct bnx2x_tx_queue *txq, struct rte_mbuf *m0)
tx_start_bd->vlan_or_ethertype =
rte_cpu_to_le_16(pkt_prod);
else {
- struct ether_hdr *eh =
- rte_pktmbuf_mtod(m0, struct ether_hdr *);
+ struct rte_ether_hdr *eh =
+ rte_pktmbuf_mtod(m0, struct rte_ether_hdr *);
tx_start_bd->vlan_or_ethertype =
rte_cpu_to_le_16(rte_be_to_cpu_16(eh->ether_type));
@@ -2208,8 +2208,8 @@ int bnx2x_tx_encap(struct bnx2x_tx_queue *txq, struct rte_mbuf *m0)
bd_prod = NEXT_TX_BD(bd_prod);
if (IS_VF(sc)) {
struct eth_tx_parse_bd_e2 *tx_parse_bd;
- const struct ether_hdr *eh =
- rte_pktmbuf_mtod(m0, struct ether_hdr *);
+ const struct rte_ether_hdr *eh =
+ rte_pktmbuf_mtod(m0, struct rte_ether_hdr *);
uint8_t mac_type = UNICAST_ADDRESS;
tx_parse_bd =
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 3063aea..567dc55 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -501,7 +501,7 @@ bnx2x_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
}
static int
-bnx2x_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
+bnx2x_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
uint32_t index, uint32_t pool)
{
struct bnx2x_softc *sc = dev->data->dev_private;
@@ -654,7 +654,8 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
}
}
- eth_dev->data->mac_addrs = (struct ether_addr *)sc->link_params.mac_addr;
+ eth_dev->data->mac_addrs =
+ (struct rte_ether_addr *)sc->link_params.mac_addr;
if (IS_VF(sc)) {
rte_spinlock_init(&sc->vf2pf_lock);
diff --git a/drivers/net/bnx2x/bnx2x_ethdev.h b/drivers/net/bnx2x/bnx2x_ethdev.h
index 45958db..bd3ef14 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.h
+++ b/drivers/net/bnx2x/bnx2x_ethdev.h
@@ -75,7 +75,8 @@ typedef int bool;
/* MAC address operations */
struct bnx2x_mac_ops {
- void (*mac_addr_add)(struct rte_eth_dev *dev, struct ether_addr *addr,
+ void (*mac_addr_add)(struct rte_eth_dev *dev,
+ struct rte_ether_addr *addr,
uint16_t index, uint32_t pool); /* not implemented yet */
void (*mac_addr_remove)(struct rte_eth_dev *dev, uint16_t index); /* not implemented yet */
};
diff --git a/drivers/net/bnx2x/bnx2x_vfpf.c b/drivers/net/bnx2x/bnx2x_vfpf.c
index 048bf12..cd5522d 100644
--- a/drivers/net/bnx2x/bnx2x_vfpf.c
+++ b/drivers/net/bnx2x/bnx2x_vfpf.c
@@ -302,7 +302,7 @@ int bnx2x_vf_get_resources(struct bnx2x_softc *sc, uint8_t tx_count, uint8_t rx_
if (is_valid_assigned_ether_addr(&sc_resp.resc.current_mac_addr))
ether_addr_copy(&sc_resp.resc.current_mac_addr,
- (struct ether_addr *)sc->link_params.mac_addr);
+ (struct rte_ether_addr *)sc->link_params.mac_addr);
else
eth_random_addr(sc->link_params.mac_addr);
diff --git a/drivers/net/bnx2x/bnx2x_vfpf.h b/drivers/net/bnx2x/bnx2x_vfpf.h
index cc6fef9..6964c9d 100644
--- a/drivers/net/bnx2x/bnx2x_vfpf.h
+++ b/drivers/net/bnx2x/bnx2x_vfpf.h
@@ -115,7 +115,7 @@ struct vf_resc {
uint8_t num_vlan_filters;
uint8_t num_mc_filters;
uint8_t permanent_mac_addr[ETH_ALEN];
- struct ether_addr current_mac_addr;
+ struct rte_ether_addr current_mac_addr;
uint16_t pf_link_speed;
uint32_t pf_link_supported;
};
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index da0de21..c643150 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -760,7 +760,7 @@ static void bnxt_mac_addr_remove_op(struct rte_eth_dev *eth_dev,
}
static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
- struct ether_addr *mac_addr,
+ struct rte_ether_addr *mac_addr,
uint32_t index, uint32_t pool)
{
struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
@@ -1451,7 +1451,8 @@ bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask)
}
static int
-bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev, struct ether_addr *addr)
+bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev,
+ struct rte_ether_addr *addr)
{
struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
/* Default Filter is tied to VNIC 0 */
@@ -1489,7 +1490,7 @@ bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev, struct ether_addr *addr)
static int
bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
- struct ether_addr *mc_addr_set,
+ struct rte_ether_addr *mc_addr_set,
uint32_t nb_mc_addr)
{
struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index eb5c41e..59e75b0 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -2578,7 +2578,7 @@ static void add_random_mac_if_needed(struct bnxt *bp,
struct hwrm_func_cfg_input *cfg_req,
int vf)
{
- struct ether_addr mac;
+ struct rte_ether_addr mac;
if (bnxt_hwrm_func_qcfg_vf_default_mac(bp, vf, &mac))
return;
@@ -3112,7 +3112,7 @@ int bnxt_hwrm_reject_fwd_resp(struct bnxt *bp, uint16_t target_id,
}
int bnxt_hwrm_func_qcfg_vf_default_mac(struct bnxt *bp, uint16_t vf,
- struct ether_addr *mac)
+ struct rte_ether_addr *mac)
{
struct hwrm_func_qcfg_input req = {0};
struct hwrm_func_qcfg_output *resp = bp->hwrm_cmd_resp_addr;
diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h
index ec9b3e0..53d79f0 100644
--- a/drivers/net/bnxt/bnxt_hwrm.h
+++ b/drivers/net/bnxt/bnxt_hwrm.h
@@ -130,7 +130,7 @@ int bnxt_hwrm_func_bw_cfg(struct bnxt *bp, uint16_t vf,
uint16_t max_bw, uint16_t enables);
int bnxt_hwrm_set_vf_vlan(struct bnxt *bp, int vf);
int bnxt_hwrm_func_qcfg_vf_default_mac(struct bnxt *bp, uint16_t vf,
- struct ether_addr *mac);
+ struct rte_ether_addr *mac);
int bnxt_hwrm_func_qcfg_current_vf_vlan(struct bnxt *bp, int vf);
int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, uint16_t port,
uint8_t tunnel_type);
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index c298de8..5e3d1bf 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -132,7 +132,7 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint16_t port, uint8_t on)
}
int rte_pmd_bnxt_set_vf_mac_addr(uint16_t port, uint16_t vf,
- struct ether_addr *mac_addr)
+ struct rte_ether_addr *mac_addr)
{
struct rte_eth_dev *dev;
struct rte_eth_dev_info dev_info;
@@ -647,7 +647,7 @@ int rte_pmd_bnxt_get_vf_tx_drop_count(uint16_t port, uint16_t vf_id,
count);
}
-int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct ether_addr *addr,
+int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct rte_ether_addr *addr,
uint32_t vf_id)
{
struct rte_eth_dev *dev;
@@ -655,7 +655,7 @@ int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct ether_addr *addr,
struct bnxt *bp;
struct bnxt_filter_info *filter;
struct bnxt_vnic_info vnic;
- struct ether_addr dflt_mac;
+ struct rte_ether_addr dflt_mac;
int rc;
dev = &rte_eth_devices[port];
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.h b/drivers/net/bnxt/rte_pmd_bnxt.h
index 68fbe34..2e893cc 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.h
+++ b/drivers/net/bnxt/rte_pmd_bnxt.h
@@ -67,7 +67,7 @@ int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on);
* - (-EINVAL) if *vf* or *mac_addr* is invalid.
*/
int rte_pmd_bnxt_set_vf_mac_addr(uint16_t port, uint16_t vf,
- struct ether_addr *mac_addr);
+ struct rte_ether_addr *mac_addr);
/**
* Enable/Disable vf vlan strip for all queues in a pool
@@ -303,7 +303,7 @@ int rte_pmd_bnxt_get_vf_tx_drop_count(uint16_t port, uint16_t vf_id,
* - (-ENOTSUP) Ethernet device is not a PF
* - (-ENOMEM) on an allocation failure
*/
-int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct ether_addr *mac_addr,
+int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct rte_ether_addr *mac_addr,
uint32_t vf_id);
/**
diff --git a/drivers/net/bonding/rte_eth_bond.h b/drivers/net/bonding/rte_eth_bond.h
index b668ff9..874aa91 100644
--- a/drivers/net/bonding/rte_eth_bond.h
+++ b/drivers/net/bonding/rte_eth_bond.h
@@ -225,7 +225,7 @@ rte_eth_bond_active_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
*/
int
rte_eth_bond_mac_address_set(uint16_t bonded_port_id,
- struct ether_addr *mac_addr);
+ struct rte_ether_addr *mac_addr);
/**
* Reset bonded device to use MAC from primary slave on bonded device and it's
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 1e6a3fc..51bf3f5 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -126,7 +126,7 @@ bond_print_lacp(struct lacpdu *l)
#define MODE4_DEBUG(fmt, ...) do { } while (0)
#endif
-static const struct ether_addr lacp_mac_addr = {
+static const struct rte_ether_addr lacp_mac_addr = {
.addr_bytes = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x02 }
};
@@ -810,7 +810,7 @@ bond_mode_8023ad_periodic_cb(void *arg)
struct bond_dev_private *internals = bond_dev->data->dev_private;
struct port *port;
struct rte_eth_link link_info;
- struct ether_addr slave_addr;
+ struct rte_ether_addr slave_addr;
struct rte_mbuf *lacp_pkt = NULL;
uint16_t slave_id;
uint16_t i;
@@ -1044,7 +1044,7 @@ void
bond_mode_8023ad_mac_address_update(struct rte_eth_dev *bond_dev)
{
struct bond_dev_private *internals = bond_dev->data->dev_private;
- struct ether_addr slave_addr;
+ struct rte_ether_addr slave_addr;
struct port *slave, *agg_slave;
uint16_t slave_id, i, j;
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.h b/drivers/net/bonding/rte_eth_bond_8023ad.h
index d8b5dbc..cbad59a 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.h
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.h
@@ -58,14 +58,14 @@ struct slow_protocol {
/** Generic slow protocol frame type structure */
struct slow_protocol_frame {
- struct ether_hdr eth_hdr;
+ struct rte_ether_hdr eth_hdr;
struct slow_protocol slow_protocol;
} __attribute__((__packed__));
struct port_params {
uint16_t system_priority;
/**< System priority (unused in current implementation) */
- struct ether_addr system;
+ struct rte_ether_addr system;
/**< System ID - Slave MAC address, same as bonding MAC address */
uint16_t key;
/**< Speed information (implementation dependednt) and duplex. */
@@ -103,7 +103,7 @@ struct lacpdu {
/** LACPDU frame: Contains ethernet header and LACPDU. */
struct lacpdu_header {
- struct ether_hdr eth_hdr;
+ struct rte_ether_hdr eth_hdr;
struct lacpdu lacpdu;
} __attribute__((__packed__));
@@ -114,7 +114,7 @@ struct marker {
uint8_t tlv_type_marker;
uint8_t info_length;
uint16_t requester_port;
- struct ether_addr requester_system;
+ struct rte_ether_addr requester_system;
uint32_t requester_transaction_id;
uint8_t reserved_2[2];
@@ -124,7 +124,7 @@ struct marker {
} __attribute__((__packed__));
struct marker_header {
- struct ether_hdr eth_hdr;
+ struct rte_ether_hdr eth_hdr;
struct marker marker;
} __attribute__((__packed__));
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad_private.h b/drivers/net/bonding/rte_eth_bond_8023ad_private.h
index f91902e..d905de4 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad_private.h
+++ b/drivers/net/bonding/rte_eth_bond_8023ad_private.h
@@ -150,7 +150,7 @@ struct mode8023ad_private {
uint64_t update_timeout_us;
rte_eth_bond_8023ad_ext_slowrx_fn slowrx_cb;
uint8_t external_sm;
- struct ether_addr mac_addr;
+ struct rte_ether_addr mac_addr;
struct rte_eth_link slave_link;
/***< slave link properties */
diff --git a/drivers/net/bonding/rte_eth_bond_alb.c b/drivers/net/bonding/rte_eth_bond_alb.c
index f16ae8f..da0b062 100644
--- a/drivers/net/bonding/rte_eth_bond_alb.c
+++ b/drivers/net/bonding/rte_eth_bond_alb.c
@@ -72,8 +72,9 @@ mempool_alloc_error:
return -ENOMEM;
}
-void bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
- struct bond_dev_private *internals) {
+void bond_mode_alb_arp_recv(struct rte_ether_hdr *eth_h, uint16_t offset,
+ struct bond_dev_private *internals)
+{
struct rte_arp_hdr *arp;
struct client_data *hash_table = internals->mode6.client_table;
@@ -102,7 +103,7 @@ void bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
client_info->app_ip != arp->arp_data.arp_tip ||
client_info->cli_ip != arp->arp_data.arp_sip ||
!is_same_ether_addr(&client_info->cli_mac, &arp->arp_data.arp_sha) ||
- client_info->vlan_count != offset / sizeof(struct vlan_hdr) ||
+ client_info->vlan_count != offset / sizeof(struct rte_vlan_hdr) ||
memcmp(client_info->vlan, eth_h + 1, offset) != 0
) {
client_info->in_use = 1;
@@ -113,14 +114,14 @@ void bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
rte_eth_macaddr_get(client_info->slave_idx, &client_info->app_mac);
ether_addr_copy(&client_info->app_mac, &arp->arp_data.arp_tha);
memcpy(client_info->vlan, eth_h + 1, offset);
- client_info->vlan_count = offset / sizeof(struct vlan_hdr);
+ client_info->vlan_count = offset / sizeof(struct rte_vlan_hdr);
}
internals->mode6.ntt = 1;
rte_spinlock_unlock(&internals->mode6.lock);
}
uint16_t
-bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
+bond_mode_alb_arp_xmit(struct rte_ether_hdr *eth_h, uint16_t offset,
struct bond_dev_private *internals)
{
struct rte_arp_hdr *arp;
@@ -130,7 +131,7 @@ bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
uint8_t hash_index;
- struct ether_addr bonding_mac;
+ struct rte_ether_addr bonding_mac;
arp = (struct rte_arp_hdr *)((char *)(eth_h + 1) + offset);
@@ -163,7 +164,7 @@ bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
&client_info->app_mac);
ether_addr_copy(&client_info->app_mac, &arp->arp_data.arp_sha);
memcpy(client_info->vlan, eth_h + 1, offset);
- client_info->vlan_count = offset / sizeof(struct vlan_hdr);
+ client_info->vlan_count = offset / sizeof(struct rte_vlan_hdr);
rte_spinlock_unlock(&internals->mode6.lock);
return client_info->slave_idx;
}
@@ -179,7 +180,7 @@ bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
rte_eth_macaddr_get(client_info->slave_idx, &client_info->app_mac);
ether_addr_copy(&client_info->app_mac, &arp->arp_data.arp_sha);
memcpy(client_info->vlan, eth_h + 1, offset);
- client_info->vlan_count = offset / sizeof(struct vlan_hdr);
+ client_info->vlan_count = offset / sizeof(struct rte_vlan_hdr);
rte_spinlock_unlock(&internals->mode6.lock);
return client_info->slave_idx;
}
@@ -195,12 +196,12 @@ uint16_t
bond_mode_alb_arp_upd(struct client_data *client_info,
struct rte_mbuf *pkt, struct bond_dev_private *internals)
{
- struct ether_hdr *eth_h;
+ struct rte_ether_hdr *eth_h;
struct rte_arp_hdr *arp_h;
uint16_t slave_idx;
rte_spinlock_lock(&internals->mode6.lock);
- eth_h = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
+ eth_h = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
ether_addr_copy(&client_info->app_mac, &eth_h->s_addr);
ether_addr_copy(&client_info->cli_mac, &eth_h->d_addr);
@@ -209,11 +210,12 @@ bond_mode_alb_arp_upd(struct client_data *client_info,
else
eth_h->ether_type = rte_cpu_to_be_16(ETHER_TYPE_ARP);
- arp_h = (struct rte_arp_hdr *)((char *)eth_h + sizeof(struct ether_hdr)
- + client_info->vlan_count * sizeof(struct vlan_hdr));
+ arp_h = (struct rte_arp_hdr *)(
+ (char *)eth_h + sizeof(struct rte_ether_hdr)
+ + client_info->vlan_count * sizeof(struct rte_vlan_hdr));
memcpy(eth_h + 1, client_info->vlan,
- client_info->vlan_count * sizeof(struct vlan_hdr));
+ client_info->vlan_count * sizeof(struct rte_vlan_hdr));
ether_addr_copy(&client_info->app_mac, &arp_h->arp_data.arp_sha);
arp_h->arp_data.arp_sip = client_info->app_ip;
diff --git a/drivers/net/bonding/rte_eth_bond_alb.h b/drivers/net/bonding/rte_eth_bond_alb.h
index 4640fd2..386e70c 100644
--- a/drivers/net/bonding/rte_eth_bond_alb.h
+++ b/drivers/net/bonding/rte_eth_bond_alb.h
@@ -13,11 +13,11 @@
struct client_data {
/** ARP data of single client */
- struct ether_addr app_mac;
+ struct rte_ether_addr app_mac;
/**< MAC address of application running DPDK */
uint32_t app_ip;
/**< IP address of application running DPDK */
- struct ether_addr cli_mac;
+ struct rte_ether_addr cli_mac;
/**< Client MAC address */
uint32_t cli_ip;
/**< Client IP address */
@@ -29,7 +29,7 @@ struct client_data {
uint8_t ntt;
/**< Flag indicating if we need to send update to this client on next tx */
- struct vlan_hdr vlan[2];
+ struct rte_vlan_hdr vlan[2];
/**< Content of vlan headers */
uint8_t vlan_count;
/**< Number of nested vlan headers */
@@ -68,7 +68,7 @@ bond_mode_alb_enable(struct rte_eth_dev *bond_dev);
* @param internals Bonding data.
*/
void
-bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
+bond_mode_alb_arp_recv(struct rte_ether_hdr *eth_h, uint16_t offset,
struct bond_dev_private *internals);
/**
@@ -85,7 +85,7 @@ bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
* Index of slave on which packet should be sent.
*/
uint16_t
-bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
+bond_mode_alb_arp_xmit(struct rte_ether_hdr *eth_h, uint16_t offset,
struct bond_dev_private *internals);
/**
diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index a23988d..0fc4c5e 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -840,7 +840,7 @@ rte_eth_bond_active_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
int
rte_eth_bond_mac_address_set(uint16_t bonded_port_id,
- struct ether_addr *mac_addr)
+ struct rte_ether_addr *mac_addr)
{
struct rte_eth_dev *bonded_eth_dev;
struct bond_dev_private *internals;
diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index b60fde6..01bbb06 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -282,7 +282,7 @@ bond_ethdev_parse_bond_mac_addr_kvarg(const char *key __rte_unused,
/* Parse MAC */
return cmdline_parse_etheraddr(NULL, value, extra_args,
- sizeof(struct ether_addr));
+ sizeof(struct rte_ether_addr));
}
int
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index f04719e..9950635 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -33,21 +33,22 @@
static uint64_t tlb_last_obytets[RTE_MAX_ETHPORTS];
static inline size_t
-get_vlan_offset(struct ether_hdr *eth_hdr, uint16_t *proto)
+get_vlan_offset(struct rte_ether_hdr *eth_hdr, uint16_t *proto)
{
size_t vlan_offset = 0;
if (rte_cpu_to_be_16(ETHER_TYPE_VLAN) == *proto ||
rte_cpu_to_be_16(ETHER_TYPE_QINQ) == *proto) {
- struct vlan_hdr *vlan_hdr = (struct vlan_hdr *)(eth_hdr + 1);
+ struct rte_vlan_hdr *vlan_hdr =
+ (struct rte_vlan_hdr *)(eth_hdr + 1);
- vlan_offset = sizeof(struct vlan_hdr);
+ vlan_offset = sizeof(struct rte_vlan_hdr);
*proto = vlan_hdr->eth_proto;
if (rte_cpu_to_be_16(ETHER_TYPE_VLAN) == *proto) {
vlan_hdr = vlan_hdr + 1;
*proto = vlan_hdr->eth_proto;
- vlan_offset += sizeof(struct vlan_hdr);
+ vlan_offset += sizeof(struct rte_vlan_hdr);
}
}
return vlan_offset;
@@ -394,8 +395,8 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
struct bond_dev_private *internals = bd_rx_q->dev_private;
struct rte_eth_dev *bonded_eth_dev =
&rte_eth_devices[internals->port_id];
- struct ether_addr *bond_mac = bonded_eth_dev->data->mac_addrs;
- struct ether_hdr *hdr;
+ struct rte_ether_addr *bond_mac = bonded_eth_dev->data->mac_addrs;
+ struct rte_ether_hdr *hdr;
const uint16_t ether_type_slow_be = rte_be_to_cpu_16(ETHER_TYPE_SLOW);
uint16_t num_rx_total = 0; /* Total number of received packets */
@@ -444,7 +445,7 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
if (j + 3 < num_rx_total)
rte_prefetch0(rte_pktmbuf_mtod(bufs[j + 3], void *));
- hdr = rte_pktmbuf_mtod(bufs[j], struct ether_hdr *);
+ hdr = rte_pktmbuf_mtod(bufs[j], struct rte_ether_hdr *);
subtype = ((struct slow_protocol_frame *)hdr)->slow_protocol.subtype;
/* Remove packet from array if it is slow packet or slave is not
@@ -584,8 +585,9 @@ update_client_stats(uint32_t addr, uint16_t port, uint32_t *TXorRXindicator)
#endif
static void
-mode6_debug(const char __attribute__((unused)) *info, struct ether_hdr *eth_h,
- uint16_t port, uint32_t __attribute__((unused)) *burstnumber)
+mode6_debug(const char __attribute__((unused)) *info,
+ struct rte_ether_hdr *eth_h, uint16_t port,
+ uint32_t __attribute__((unused)) *burstnumber)
{
struct ipv4_hdr *ipv4_h;
#ifdef RTE_LIBRTE_BOND_DEBUG_ALB
@@ -630,7 +632,7 @@ bond_ethdev_rx_burst_alb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
{
struct bond_tx_queue *bd_tx_q = (struct bond_tx_queue *)queue;
struct bond_dev_private *internals = bd_tx_q->dev_private;
- struct ether_hdr *eth_h;
+ struct rte_ether_hdr *eth_h;
uint16_t ether_type, offset;
uint16_t nb_recv_pkts;
int i;
@@ -638,7 +640,7 @@ bond_ethdev_rx_burst_alb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
nb_recv_pkts = bond_ethdev_rx_burst(queue, bufs, nb_pkts);
for (i = 0; i < nb_recv_pkts; i++) {
- eth_h = rte_pktmbuf_mtod(bufs[i], struct ether_hdr *);
+ eth_h = rte_pktmbuf_mtod(bufs[i], struct rte_ether_hdr *);
ether_type = eth_h->ether_type;
offset = get_vlan_offset(eth_h, &ether_type);
@@ -738,7 +740,7 @@ bond_ethdev_tx_burst_active_backup(void *queue,
}
static inline uint16_t
-ether_hash(struct ether_hdr *eth_hdr)
+ether_hash(struct rte_ether_hdr *eth_hdr)
{
unaligned_uint16_t *word_src_addr =
(unaligned_uint16_t *)eth_hdr->s_addr.addr_bytes;
@@ -775,12 +777,12 @@ void
burst_xmit_l2_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
uint16_t slave_count, uint16_t *slaves)
{
- struct ether_hdr *eth_hdr;
+ struct rte_ether_hdr *eth_hdr;
uint32_t hash;
int i;
for (i = 0; i < nb_pkts; i++) {
- eth_hdr = rte_pktmbuf_mtod(buf[i], struct ether_hdr *);
+ eth_hdr = rte_pktmbuf_mtod(buf[i], struct rte_ether_hdr *);
hash = ether_hash(eth_hdr);
@@ -793,13 +795,13 @@ burst_xmit_l23_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
uint16_t slave_count, uint16_t *slaves)
{
uint16_t i;
- struct ether_hdr *eth_hdr;
+ struct rte_ether_hdr *eth_hdr;
uint16_t proto;
size_t vlan_offset;
uint32_t hash, l3hash;
for (i = 0; i < nb_pkts; i++) {
- eth_hdr = rte_pktmbuf_mtod(buf[i], struct ether_hdr *);
+ eth_hdr = rte_pktmbuf_mtod(buf[i], struct rte_ether_hdr *);
l3hash = 0;
proto = eth_hdr->ether_type;
@@ -830,7 +832,7 @@ void
burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
uint16_t slave_count, uint16_t *slaves)
{
- struct ether_hdr *eth_hdr;
+ struct rte_ether_hdr *eth_hdr;
uint16_t proto;
size_t vlan_offset;
int i;
@@ -840,7 +842,7 @@ burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
uint32_t hash, l3hash, l4hash;
for (i = 0; i < nb_pkts; i++) {
- eth_hdr = rte_pktmbuf_mtod(buf[i], struct ether_hdr *);
+ eth_hdr = rte_pktmbuf_mtod(buf[i], struct rte_ether_hdr *);
size_t pkt_end = (size_t)eth_hdr + rte_pktmbuf_data_len(buf[i]);
proto = eth_hdr->ether_type;
vlan_offset = get_vlan_offset(eth_hdr, &proto);
@@ -1008,9 +1010,9 @@ bond_ethdev_tx_burst_tlb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
uint16_t num_of_slaves = internals->active_slave_count;
uint16_t slaves[RTE_MAX_ETHPORTS];
- struct ether_hdr *ether_hdr;
- struct ether_addr primary_slave_addr;
- struct ether_addr active_slave_addr;
+ struct rte_ether_hdr *ether_hdr;
+ struct rte_ether_addr primary_slave_addr;
+ struct rte_ether_addr active_slave_addr;
if (num_of_slaves < 1)
return num_tx_total;
@@ -1032,7 +1034,8 @@ bond_ethdev_tx_burst_tlb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
if (j + 3 < nb_pkts)
rte_prefetch0(rte_pktmbuf_mtod(bufs[j+3], void*));
- ether_hdr = rte_pktmbuf_mtod(bufs[j], struct ether_hdr *);
+ ether_hdr = rte_pktmbuf_mtod(bufs[j],
+ struct rte_ether_hdr *);
if (is_same_ether_addr(&ether_hdr->s_addr, &primary_slave_addr))
ether_addr_copy(&active_slave_addr, &ether_hdr->s_addr);
#if defined(RTE_LIBRTE_BOND_DEBUG_ALB) || defined(RTE_LIBRTE_BOND_DEBUG_ALB_L1)
@@ -1068,7 +1071,7 @@ bond_ethdev_tx_burst_alb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
struct bond_tx_queue *bd_tx_q = (struct bond_tx_queue *)queue;
struct bond_dev_private *internals = bd_tx_q->dev_private;
- struct ether_hdr *eth_h;
+ struct rte_ether_hdr *eth_h;
uint16_t ether_type, offset;
struct client_data *client_info;
@@ -1098,7 +1101,7 @@ bond_ethdev_tx_burst_alb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
/* Search tx buffer for ARP packets and forward them to alb */
for (i = 0; i < nb_pkts; i++) {
- eth_h = rte_pktmbuf_mtod(bufs[i], struct ether_hdr *);
+ eth_h = rte_pktmbuf_mtod(bufs[i], struct rte_ether_hdr *);
ether_type = eth_h->ether_type;
offset = get_vlan_offset(eth_h, &ether_type);
@@ -1132,10 +1135,10 @@ bond_ethdev_tx_burst_alb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
"Failed to allocate ARP packet from pool");
continue;
}
- pkt_size = sizeof(struct ether_hdr) +
+ pkt_size = sizeof(struct rte_ether_hdr) +
sizeof(struct rte_arp_hdr) +
client_info->vlan_count *
- sizeof(struct vlan_hdr);
+ sizeof(struct rte_vlan_hdr);
upd_pkt->data_len = pkt_size;
upd_pkt->pkt_len = pkt_size;
@@ -1166,7 +1169,8 @@ bond_ethdev_tx_burst_alb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
#if defined(RTE_LIBRTE_BOND_DEBUG_ALB) || defined(RTE_LIBRTE_BOND_DEBUG_ALB_L1)
/* Print TX stats including update packets */
for (j = 0; j < slave_bufs_pkts[i]; j++) {
- eth_h = rte_pktmbuf_mtod(slave_bufs[i][j], struct ether_hdr *);
+ eth_h = rte_pktmbuf_mtod(slave_bufs[i][j],
+ struct rte_ether_hdr *);
mode6_debug("TX ARP:", eth_h, i, &burstnumberTX);
}
#endif
@@ -1183,7 +1187,8 @@ bond_ethdev_tx_burst_alb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
}
#if defined(RTE_LIBRTE_BOND_DEBUG_ALB) || defined(RTE_LIBRTE_BOND_DEBUG_ALB_L1)
for (j = 0; j < update_bufs_pkts[i]; j++) {
- eth_h = rte_pktmbuf_mtod(update_bufs[i][j], struct ether_hdr *);
+ eth_h = rte_pktmbuf_mtod(update_bufs[i][j],
+ struct rte_ether_hdr *);
mode6_debug("TX ARPupd:", eth_h, i, &burstnumberTX);
}
#endif
@@ -1501,9 +1506,10 @@ link_properties_valid(struct rte_eth_dev *ethdev,
}
int
-mac_address_get(struct rte_eth_dev *eth_dev, struct ether_addr *dst_mac_addr)
+mac_address_get(struct rte_eth_dev *eth_dev,
+ struct rte_ether_addr *dst_mac_addr)
{
- struct ether_addr *mac_addr;
+ struct rte_ether_addr *mac_addr;
if (eth_dev == NULL) {
RTE_BOND_LOG(ERR, "NULL pointer eth_dev specified");
@@ -1522,9 +1528,10 @@ mac_address_get(struct rte_eth_dev *eth_dev, struct ether_addr *dst_mac_addr)
}
int
-mac_address_set(struct rte_eth_dev *eth_dev, struct ether_addr *new_mac_addr)
+mac_address_set(struct rte_eth_dev *eth_dev,
+ struct rte_ether_addr *new_mac_addr)
{
- struct ether_addr *mac_addr;
+ struct rte_ether_addr *mac_addr;
if (eth_dev == NULL) {
RTE_BOND_LOG(ERR, "NULL pointer eth_dev specified");
@@ -1545,7 +1552,7 @@ mac_address_set(struct rte_eth_dev *eth_dev, struct ether_addr *new_mac_addr)
return 0;
}
-static const struct ether_addr null_mac_addr;
+static const struct rte_ether_addr null_mac_addr;
/*
* Add additional MAC addresses to the slave
@@ -1555,7 +1562,7 @@ slave_add_mac_addresses(struct rte_eth_dev *bonded_eth_dev,
uint16_t slave_port_id)
{
int i, ret;
- struct ether_addr *mac_addr;
+ struct rte_ether_addr *mac_addr;
for (i = 1; i < BOND_MAX_MAC_ADDRS; i++) {
mac_addr = &bonded_eth_dev->data->mac_addrs[i];
@@ -1583,7 +1590,7 @@ slave_remove_mac_addresses(struct rte_eth_dev *bonded_eth_dev,
uint16_t slave_port_id)
{
int i, rc, ret;
- struct ether_addr *mac_addr;
+ struct rte_ether_addr *mac_addr;
rc = 0;
for (i = 1; i < BOND_MAX_MAC_ADDRS; i++) {
@@ -2006,7 +2013,7 @@ slave_add(struct bond_dev_private *internals,
slave_details->link_status_wait_to_complete = 0;
/* clean tlb_last_obytes when adding port for bonding device */
memcpy(&(slave_details->persisted_mac_addr), slave_eth_dev->data->mac_addrs,
- sizeof(struct ether_addr));
+ sizeof(struct rte_ether_addr));
}
void
@@ -2052,7 +2059,7 @@ bond_ethdev_start(struct rte_eth_dev *eth_dev)
}
if (internals->user_defined_mac == 0) {
- struct ether_addr *new_mac_addr = NULL;
+ struct rte_ether_addr *new_mac_addr = NULL;
for (i = 0; i < internals->slave_count; i++)
if (internals->slaves[i].port_id == internals->primary_port)
@@ -2938,7 +2945,8 @@ bond_ethdev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
}
static int
-bond_ethdev_mac_address_set(struct rte_eth_dev *dev, struct ether_addr *addr)
+bond_ethdev_mac_address_set(struct rte_eth_dev *dev,
+ struct rte_ether_addr *addr)
{
if (mac_address_set(dev, addr)) {
RTE_BOND_LOG(ERR, "Failed to update MAC address");
@@ -2960,8 +2968,9 @@ bond_filter_ctrl(struct rte_eth_dev *dev __rte_unused,
}
static int
-bond_ethdev_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
- __rte_unused uint32_t index, uint32_t vmdq)
+bond_ethdev_mac_addr_add(struct rte_eth_dev *dev,
+ struct rte_ether_addr *mac_addr,
+ __rte_unused uint32_t index, uint32_t vmdq)
{
struct rte_eth_dev *slave_eth_dev;
struct bond_dev_private *internals = dev->data->dev_private;
@@ -3011,7 +3020,7 @@ bond_ethdev_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
goto end;
}
- struct ether_addr *mac_addr = &dev->data->mac_addrs[index];
+ struct rte_ether_addr *mac_addr = &dev->data->mac_addrs[index];
for (i = 0; i < internals->slave_count; i++)
rte_eth_dev_mac_addr_remove(internals->slaves[i].port_id,
@@ -3389,7 +3398,7 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
/* Parse MAC address for bonded device */
arg_count = rte_kvargs_count(kvlist, PMD_BOND_MAC_ADDR_KVARG);
if (arg_count == 1) {
- struct ether_addr bond_mac;
+ struct rte_ether_addr bond_mac;
if (rte_kvargs_process(kvlist, PMD_BOND_MAC_ADDR_KVARG,
&bond_ethdev_parse_bond_mac_addr_kvarg, &bond_mac) < 0) {
diff --git a/drivers/net/bonding/rte_eth_bond_private.h b/drivers/net/bonding/rte_eth_bond_private.h
index 8afef39..55c0b22 100644
--- a/drivers/net/bonding/rte_eth_bond_private.h
+++ b/drivers/net/bonding/rte_eth_bond_private.h
@@ -85,7 +85,7 @@ struct bond_slave_details {
uint8_t link_status_wait_to_complete;
uint8_t last_link_status;
/**< Port Id of slave eth_dev */
- struct ether_addr persisted_mac_addr;
+ struct rte_ether_addr persisted_mac_addr;
uint16_t reta_size;
};
@@ -223,10 +223,12 @@ void
activate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id);
int
-mac_address_set(struct rte_eth_dev *eth_dev, struct ether_addr *new_mac_addr);
+mac_address_set(struct rte_eth_dev *eth_dev,
+ struct rte_ether_addr *new_mac_addr);
int
-mac_address_get(struct rte_eth_dev *eth_dev, struct ether_addr *dst_mac_addr);
+mac_address_get(struct rte_eth_dev *eth_dev,
+ struct rte_ether_addr *dst_mac_addr);
int
mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev);
diff --git a/drivers/net/cxgbe/base/adapter.h b/drivers/net/cxgbe/base/adapter.h
index fb8af52..b54f75e 100644
--- a/drivers/net/cxgbe/base/adapter.h
+++ b/drivers/net/cxgbe/base/adapter.h
@@ -671,7 +671,7 @@ static inline void t4_os_set_hw_addr(struct adapter *adapter, int port_idx,
{
struct port_info *pi = adap2pinfo(adapter, port_idx);
- ether_addr_copy((struct ether_addr *)hw_addr,
+ ether_addr_copy((struct rte_ether_addr *)hw_addr,
&pi->eth_dev->data->mac_addrs[0]);
}
diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c
index 01d256d..e369369 100644
--- a/drivers/net/cxgbe/cxgbe_ethdev.c
+++ b/drivers/net/cxgbe/cxgbe_ethdev.c
@@ -1056,7 +1056,7 @@ static int cxgbe_get_regs(struct rte_eth_dev *eth_dev,
return 0;
}
-int cxgbe_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *addr)
+int cxgbe_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *addr)
{
struct port_info *pi = (struct port_info *)(dev->data->dev_private);
int ret;
diff --git a/drivers/net/cxgbe/cxgbe_pfvf.h b/drivers/net/cxgbe/cxgbe_pfvf.h
index 8d0a105..03145ce 100644
--- a/drivers/net/cxgbe/cxgbe_pfvf.h
+++ b/drivers/net/cxgbe/cxgbe_pfvf.h
@@ -16,7 +16,7 @@ void cxgbe_dev_promiscuous_enable(struct rte_eth_dev *eth_dev);
void cxgbe_dev_promiscuous_disable(struct rte_eth_dev *eth_dev);
void cxgbe_dev_allmulticast_enable(struct rte_eth_dev *eth_dev);
void cxgbe_dev_allmulticast_disable(struct rte_eth_dev *eth_dev);
-int cxgbe_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *addr);
+int cxgbe_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *addr);
int cxgbe_dev_configure(struct rte_eth_dev *eth_dev);
int cxgbe_dev_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t queue_idx,
uint16_t nb_desc, unsigned int socket_id,
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index 2e043fe..0e1dc1a 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -934,7 +934,7 @@ dpaa_flow_ctrl_get(struct rte_eth_dev *dev,
static int
dpaa_dev_add_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *addr,
+ struct rte_ether_addr *addr,
uint32_t index,
__rte_unused uint32_t pool)
{
@@ -964,7 +964,7 @@ dpaa_dev_remove_mac_addr(struct rte_eth_dev *dev,
static int
dpaa_dev_set_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *addr)
+ struct rte_ether_addr *addr)
{
int ret;
struct dpaa_if *dpaa_intf = dev->data->dev_private;
diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index a4085f4..7f174f7 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -198,7 +198,8 @@ static inline void dpaa_eth_packet_info(struct rte_mbuf *m, void *fd_virt_addr)
static inline void dpaa_checksum(struct rte_mbuf *mbuf)
{
- struct ether_hdr *eth_hdr = rte_pktmbuf_mtod(mbuf, struct ether_hdr *);
+ struct rte_ether_hdr *eth_hdr =
+ rte_pktmbuf_mtod(mbuf, struct rte_ether_hdr *);
char *l3_hdr = (char *)eth_hdr + mbuf->l2_len;
struct ipv4_hdr *ipv4_hdr = (struct ipv4_hdr *)l3_hdr;
struct ipv6_hdr *ipv6_hdr = (struct ipv6_hdr *)l3_hdr;
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 900182f..ae4d7e1 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -1124,7 +1124,7 @@ dpaa2_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
static int
dpaa2_dev_add_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *addr,
+ struct rte_ether_addr *addr,
__rte_unused uint32_t index,
__rte_unused uint32_t pool)
{
@@ -1155,7 +1155,7 @@ dpaa2_dev_remove_mac_addr(struct rte_eth_dev *dev,
struct dpaa2_dev_priv *priv = dev->data->dev_private;
struct fsl_mc_io *dpni = (struct fsl_mc_io *)priv->hw;
struct rte_eth_dev_data *data = dev->data;
- struct ether_addr *macaddr;
+ struct rte_ether_addr *macaddr;
PMD_INIT_FUNC_TRACE();
@@ -1175,7 +1175,7 @@ dpaa2_dev_remove_mac_addr(struct rte_eth_dev *dev,
static int
dpaa2_dev_set_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *addr)
+ struct rte_ether_addr *addr)
{
int ret;
struct dpaa2_dev_priv *priv = dev->data->dev_private;
@@ -1992,13 +1992,13 @@ static struct eth_dev_ops dpaa2_ethdev_ops = {
*/
static int
populate_mac_addr(struct fsl_mc_io *dpni_dev, struct dpaa2_dev_priv *priv,
- struct ether_addr *mac_entry)
+ struct rte_ether_addr *mac_entry)
{
int ret;
- struct ether_addr phy_mac, prime_mac;
+ struct rte_ether_addr phy_mac, prime_mac;
- memset(&phy_mac, 0, sizeof(struct ether_addr));
- memset(&prime_mac, 0, sizeof(struct ether_addr));
+ memset(&phy_mac, 0, sizeof(struct rte_ether_addr));
+ memset(&prime_mac, 0, sizeof(struct rte_ether_addr));
/* Get the physical device MAC address */
ret = dpni_get_port_mac_addr(dpni_dev, CMD_PRI_LOW, priv->token,
@@ -2032,7 +2032,8 @@ populate_mac_addr(struct fsl_mc_io *dpni_dev, struct dpaa2_dev_priv *priv,
ret);
goto cleanup;
}
- memcpy(&prime_mac, &phy_mac, sizeof(struct ether_addr));
+ memcpy(&prime_mac, &phy_mac,
+ sizeof(struct rte_ether_addr));
}
} else if (is_zero_ether_addr(&prime_mac)) {
/* In case phys and prime, both are zero, create random MAC */
@@ -2047,7 +2048,7 @@ populate_mac_addr(struct fsl_mc_io *dpni_dev, struct dpaa2_dev_priv *priv,
}
/* prime_mac the final MAC address */
- memcpy(mac_entry, &prime_mac, sizeof(struct ether_addr));
+ memcpy(mac_entry, &prime_mac, sizeof(struct rte_ether_addr));
return 0;
cleanup:
diff --git a/drivers/net/dpaa2/dpaa2_flow.c b/drivers/net/dpaa2/dpaa2_flow.c
index 9ef46d4..572eb84 100644
--- a/drivers/net/dpaa2/dpaa2_flow.c
+++ b/drivers/net/dpaa2/dpaa2_flow.c
@@ -214,27 +214,27 @@ dpaa2_configure_flow_eth(struct rte_flow *flow,
/* Key rule */
key_iova = flow->rule.key_iova + DPAA2_CLS_RULE_OFFSET_ETH;
memcpy((void *)key_iova, (const void *)(spec->src.addr_bytes),
- sizeof(struct ether_addr));
- key_iova += sizeof(struct ether_addr);
+ sizeof(struct rte_ether_addr));
+ key_iova += sizeof(struct rte_ether_addr);
memcpy((void *)key_iova, (const void *)(spec->dst.addr_bytes),
- sizeof(struct ether_addr));
- key_iova += sizeof(struct ether_addr);
+ sizeof(struct rte_ether_addr));
+ key_iova += sizeof(struct rte_ether_addr);
memcpy((void *)key_iova, (const void *)(&spec->type),
sizeof(rte_be16_t));
/* Key mask */
mask_iova = flow->rule.mask_iova + DPAA2_CLS_RULE_OFFSET_ETH;
memcpy((void *)mask_iova, (const void *)(mask->src.addr_bytes),
- sizeof(struct ether_addr));
- mask_iova += sizeof(struct ether_addr);
+ sizeof(struct rte_ether_addr));
+ mask_iova += sizeof(struct rte_ether_addr);
memcpy((void *)mask_iova, (const void *)(mask->dst.addr_bytes),
- sizeof(struct ether_addr));
- mask_iova += sizeof(struct ether_addr);
+ sizeof(struct rte_ether_addr));
+ mask_iova += sizeof(struct rte_ether_addr);
memcpy((void *)mask_iova, (const void *)(&mask->type),
sizeof(rte_be16_t));
flow->rule.key_size = (DPAA2_CLS_RULE_OFFSET_ETH +
- ((2 * sizeof(struct ether_addr)) +
+ ((2 * sizeof(struct rte_ether_addr)) +
sizeof(rte_be16_t)));
return device_configured;
}
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 8230824..b2fdb5e 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -89,14 +89,15 @@ static int eth_em_led_on(struct rte_eth_dev *dev);
static int eth_em_led_off(struct rte_eth_dev *dev);
static int em_get_rx_buffer_size(struct e1000_hw *hw);
-static int eth_em_rar_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
- uint32_t index, uint32_t pool);
+static int eth_em_rar_set(struct rte_eth_dev *dev,
+ struct rte_ether_addr *mac_addr,
+ uint32_t index, uint32_t pool);
static void eth_em_rar_clear(struct rte_eth_dev *dev, uint32_t index);
static int eth_em_default_mac_addr_set(struct rte_eth_dev *dev,
- struct ether_addr *addr);
+ struct rte_ether_addr *addr);
static int eth_em_set_mc_addr_list(struct rte_eth_dev *dev,
- struct ether_addr *mc_addr_set,
+ struct rte_ether_addr *mc_addr_set,
uint32_t nb_mc_addr);
#define EM_FC_PAUSE_TIME 0x0680
@@ -293,7 +294,7 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
}
/* Copy the permanent MAC address */
- ether_addr_copy((struct ether_addr *) hw->mac.addr,
+ ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
eth_dev->data->mac_addrs);
/* initialize the vfta */
@@ -1735,7 +1736,7 @@ eth_em_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
}
static int
-eth_em_rar_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
+eth_em_rar_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
uint32_t index, __rte_unused uint32_t pool)
{
struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -1756,7 +1757,7 @@ eth_em_rar_clear(struct rte_eth_dev *dev, uint32_t index)
static int
eth_em_default_mac_addr_set(struct rte_eth_dev *dev,
- struct ether_addr *addr)
+ struct rte_ether_addr *addr)
{
eth_em_rar_clear(dev, 0);
@@ -1806,7 +1807,7 @@ eth_em_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
static int
eth_em_set_mc_addr_list(struct rte_eth_dev *dev,
- struct ether_addr *mc_addr_set,
+ struct rte_ether_addr *mc_addr_set,
uint32_t nb_mc_addr)
{
struct e1000_hw *hw;
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index d3a8f5b..e21a772 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -145,11 +145,11 @@ static int eth_igb_led_off(struct rte_eth_dev *dev);
static void igb_intr_disable(struct rte_eth_dev *dev);
static int igb_get_rx_buffer_size(struct e1000_hw *hw);
static int eth_igb_rar_set(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr,
+ struct rte_ether_addr *mac_addr,
uint32_t index, uint32_t pool);
static void eth_igb_rar_clear(struct rte_eth_dev *dev, uint32_t index);
static int eth_igb_default_mac_addr_set(struct rte_eth_dev *dev,
- struct ether_addr *addr);
+ struct rte_ether_addr *addr);
static void igbvf_intr_disable(struct e1000_hw *hw);
static int igbvf_dev_configure(struct rte_eth_dev *dev);
@@ -174,7 +174,7 @@ static int igbvf_vlan_filter_set(struct rte_eth_dev *dev,
static int igbvf_set_vfta(struct e1000_hw *hw, uint16_t vid, bool on);
static void igbvf_set_vfta_all(struct rte_eth_dev *dev, bool on);
static int igbvf_default_mac_addr_set(struct rte_eth_dev *dev,
- struct ether_addr *addr);
+ struct rte_ether_addr *addr);
static int igbvf_get_reg_length(struct rte_eth_dev *dev);
static int igbvf_get_regs(struct rte_eth_dev *dev,
struct rte_dev_reg_info *regs);
@@ -231,7 +231,7 @@ static int eth_igb_get_module_info(struct rte_eth_dev *dev,
static int eth_igb_get_module_eeprom(struct rte_eth_dev *dev,
struct rte_dev_eeprom_info *info);
static int eth_igb_set_mc_addr_list(struct rte_eth_dev *dev,
- struct ether_addr *mc_addr_set,
+ struct rte_ether_addr *mc_addr_set,
uint32_t nb_mc_addr);
static int igb_timesync_enable(struct rte_eth_dev *dev);
static int igb_timesync_disable(struct rte_eth_dev *dev);
@@ -840,7 +840,8 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
}
/* Copy the permanent MAC address */
- ether_addr_copy((struct ether_addr *)hw->mac.addr, &eth_dev->data->mac_addrs[0]);
+ ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
+ &eth_dev->data->mac_addrs[0]);
/* initialize the vfta */
memset(shadow_vfta, 0, sizeof(*shadow_vfta));
@@ -983,7 +984,8 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
struct e1000_hw *hw =
E1000_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private);
int diag;
- struct ether_addr *perm_addr = (struct ether_addr *)hw->mac.perm_addr;
+ struct rte_ether_addr *perm_addr =
+ (struct rte_ether_addr *)hw->mac.perm_addr;
PMD_INIT_FUNC_TRACE();
@@ -1057,7 +1059,7 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
return diag;
}
/* Copy the permanent MAC address */
- ether_addr_copy((struct ether_addr *) hw->mac.perm_addr,
+ ether_addr_copy((struct rte_ether_addr *)hw->mac.perm_addr,
&eth_dev->data->mac_addrs[0]);
PMD_INIT_LOG(DEBUG, "port %d vendorID=0x%x deviceID=0x%x "
@@ -3119,7 +3121,7 @@ eth_igb_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf)
#define E1000_RAH_POOLSEL_SHIFT (18)
static int
-eth_igb_rar_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
+eth_igb_rar_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
uint32_t index, uint32_t pool)
{
struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -3145,7 +3147,7 @@ eth_igb_rar_clear(struct rte_eth_dev *dev, uint32_t index)
static int
eth_igb_default_mac_addr_set(struct rte_eth_dev *dev,
- struct ether_addr *addr)
+ struct rte_ether_addr *addr)
{
eth_igb_rar_clear(dev, 0);
eth_igb_rar_set(dev, (void *)addr, 0, 0);
@@ -3358,7 +3360,7 @@ igbvf_dev_close(struct rte_eth_dev *dev)
struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct e1000_adapter *adapter =
E1000_DEV_PRIVATE(dev->data->dev_private);
- struct ether_addr addr;
+ struct rte_ether_addr addr;
PMD_INIT_FUNC_TRACE();
@@ -3503,7 +3505,7 @@ igbvf_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
}
static int
-igbvf_default_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *addr)
+igbvf_default_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *addr)
{
struct e1000_hw *hw =
E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -4905,7 +4907,7 @@ eth_igb_filter_ctrl(struct rte_eth_dev *dev,
static int
eth_igb_set_mc_addr_list(struct rte_eth_dev *dev,
- struct ether_addr *mc_addr_set,
+ struct rte_ether_addr *mc_addr_set,
uint32_t nb_mc_addr)
{
struct e1000_hw *hw;
diff --git a/drivers/net/e1000/igb_pf.c b/drivers/net/e1000/igb_pf.c
index b9f2e53..9f15213 100644
--- a/drivers/net/e1000/igb_pf.c
+++ b/drivers/net/e1000/igb_pf.c
@@ -306,8 +306,8 @@ igb_vf_set_mac_addr(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
uint8_t *new_mac = (uint8_t *)(&msgbuf[1]);
int rah;
- if (is_unicast_ether_addr((struct ether_addr *)new_mac)) {
- if (!is_zero_ether_addr((struct ether_addr *)new_mac))
+ if (is_unicast_ether_addr((struct rte_ether_addr *)new_mac)) {
+ if (!is_zero_ether_addr((struct rte_ether_addr *)new_mac))
rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac,
sizeof(vfinfo[vf].vf_mac_addresses));
hw->mac.ops.rar_set(hw, new_mac, rar_entry);
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 3eb3816..1d832f9 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1813,9 +1813,9 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
ENA_ADMIN_FEATURE_OFFLOAD_DESC_RX_L4_IPV4_CSUM_MASK) != 0;
/* Copy MAC address and point DPDK to it */
- eth_dev->data->mac_addrs = (struct ether_addr *)adapter->mac_addr;
- ether_addr_copy((struct ether_addr *)get_feat_ctx.dev_attr.mac_addr,
- (struct ether_addr *)adapter->mac_addr);
+ eth_dev->data->mac_addrs = (struct rte_ether_addr *)adapter->mac_addr;
+ ether_addr_copy((struct rte_ether_addr *)get_feat_ctx.dev_attr.mac_addr,
+ (struct rte_ether_addr *)adapter->mac_addr);
/*
* Pass the information to the rte_eth_dev_close() that it should also
@@ -2151,7 +2151,7 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
* length of the ethernet header.
*/
if (unlikely(m->l2_len == 0))
- m->l2_len = sizeof(struct ether_hdr);
+ m->l2_len = sizeof(struct rte_ether_hdr);
ip_hdr = rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *,
m->l2_len);
diff --git a/drivers/net/enetc/enetc_ethdev.c b/drivers/net/enetc/enetc_ethdev.c
index 362e074..2f47335 100644
--- a/drivers/net/enetc/enetc_ethdev.c
+++ b/drivers/net/enetc/enetc_ethdev.c
@@ -840,7 +840,7 @@ enetc_dev_init(struct rte_eth_dev *eth_dev)
}
/* Copy the permanent MAC address */
- ether_addr_copy((struct ether_addr *)hw->mac.addr,
+ ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
&eth_dev->data->mac_addrs[0]);
/* Set MTU */
diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h
index 9193fb0..20080af 100644
--- a/drivers/net/enic/enic.h
+++ b/drivers/net/enic/enic.h
@@ -197,7 +197,7 @@ struct enic {
/* Multicast MAC addresses added to the NIC */
uint32_t mc_count;
- struct ether_addr mc_addrs[ENIC_MULTICAST_PERFECT_FILTERS];
+ struct rte_ether_addr mc_addrs[ENIC_MULTICAST_PERFECT_FILTERS];
};
/* Compute ethdev's max packet size from MTU */
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 8d14d8a..71e1b9c 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -604,7 +604,7 @@ static void enicpmd_dev_allmulticast_disable(struct rte_eth_dev *eth_dev)
}
static int enicpmd_add_mac_addr(struct rte_eth_dev *eth_dev,
- struct ether_addr *mac_addr,
+ struct rte_ether_addr *mac_addr,
__rte_unused uint32_t index, __rte_unused uint32_t pool)
{
struct enic *enic = pmd_priv(eth_dev);
@@ -629,7 +629,7 @@ static void enicpmd_remove_mac_addr(struct rte_eth_dev *eth_dev, uint32_t index)
}
static int enicpmd_set_mac_addr(struct rte_eth_dev *eth_dev,
- struct ether_addr *addr)
+ struct rte_ether_addr *addr)
{
struct enic *enic = pmd_priv(eth_dev);
int ret;
@@ -644,7 +644,7 @@ static int enicpmd_set_mac_addr(struct rte_eth_dev *eth_dev,
return enic_set_mac_address(enic, addr->addr_bytes);
}
-static void debug_log_add_del_addr(struct ether_addr *addr, bool add)
+static void debug_log_add_del_addr(struct rte_ether_addr *addr, bool add)
{
char mac_str[ETHER_ADDR_FMT_SIZE];
@@ -654,12 +654,12 @@ static void debug_log_add_del_addr(struct ether_addr *addr, bool add)
}
static int enicpmd_set_mc_addr_list(struct rte_eth_dev *eth_dev,
- struct ether_addr *mc_addr_set,
+ struct rte_ether_addr *mc_addr_set,
uint32_t nb_mc_addr)
{
struct enic *enic = pmd_priv(eth_dev);
char mac_str[ETHER_ADDR_FMT_SIZE];
- struct ether_addr *addr;
+ struct rte_ether_addr *addr;
uint32_t i, j;
int ret;
@@ -730,7 +730,7 @@ static int enicpmd_set_mc_addr_list(struct rte_eth_dev *eth_dev,
}
/* Keep a copy so we can flush/apply later on.. */
memcpy(enic->mc_addrs, mc_addr_set,
- nb_mc_addr * sizeof(struct ether_addr));
+ nb_mc_addr * sizeof(struct rte_ether_addr));
enic->mc_count = nb_mc_addr;
return 0;
}
diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c
index 511c177..9bddfb9 100644
--- a/drivers/net/enic/enic_flow.c
+++ b/drivers/net/enic/enic_flow.c
@@ -572,9 +572,9 @@ enic_copy_item_inner_eth_v2(struct copy_item_args *arg)
FLOW_TRACE();
if (!mask)
mask = &rte_flow_item_eth_mask;
- arg->l2_proto_off = *off + offsetof(struct ether_hdr, ether_type);
+ arg->l2_proto_off = *off + offsetof(struct rte_ether_hdr, ether_type);
return copy_inner_common(&arg->filter->u.generic_1, off,
- arg->item->spec, mask, sizeof(struct ether_hdr),
+ arg->item->spec, mask, sizeof(struct rte_ether_hdr),
0 /* no previous protocol */, 0, 0);
}
@@ -590,9 +590,9 @@ enic_copy_item_inner_vlan_v2(struct copy_item_args *arg)
mask = &rte_flow_item_vlan_mask;
/* Append vlan header to L5 and set ether type = TPID */
eth_type_off = arg->l2_proto_off;
- arg->l2_proto_off = *off + offsetof(struct vlan_hdr, eth_proto);
+ arg->l2_proto_off = *off + offsetof(struct rte_vlan_hdr, eth_proto);
return copy_inner_common(&arg->filter->u.generic_1, off,
- arg->item->spec, mask, sizeof(struct vlan_hdr),
+ arg->item->spec, mask, sizeof(struct rte_vlan_hdr),
eth_type_off, rte_cpu_to_be_16(ETHER_TYPE_VLAN), 2);
}
@@ -663,8 +663,8 @@ enic_copy_item_eth_v2(struct copy_item_args *arg)
{
const struct rte_flow_item *item = arg->item;
struct filter_v2 *enic_filter = arg->filter;
- struct ether_hdr enic_spec;
- struct ether_hdr enic_mask;
+ struct rte_ether_hdr enic_spec;
+ struct rte_ether_hdr enic_mask;
const struct rte_flow_item_eth *spec = item->spec;
const struct rte_flow_item_eth *mask = item->mask;
struct filter_generic_1 *gp = &enic_filter->u.generic_1;
@@ -692,9 +692,9 @@ enic_copy_item_eth_v2(struct copy_item_args *arg)
/* outer header */
memcpy(gp->layer[FILTER_GENERIC_1_L2].mask, &enic_mask,
- sizeof(struct ether_hdr));
+ sizeof(struct rte_ether_hdr));
memcpy(gp->layer[FILTER_GENERIC_1_L2].val, &enic_spec,
- sizeof(struct ether_hdr));
+ sizeof(struct rte_ether_hdr));
return 0;
}
@@ -706,8 +706,8 @@ enic_copy_item_vlan_v2(struct copy_item_args *arg)
const struct rte_flow_item_vlan *spec = item->spec;
const struct rte_flow_item_vlan *mask = item->mask;
struct filter_generic_1 *gp = &enic_filter->u.generic_1;
- struct ether_hdr *eth_mask;
- struct ether_hdr *eth_val;
+ struct rte_ether_hdr *eth_mask;
+ struct rte_ether_hdr *eth_val;
FLOW_TRACE();
@@ -734,11 +734,11 @@ enic_copy_item_vlan_v2(struct copy_item_args *arg)
* vlan tag remains in the L2 buffer.
*/
if (!arg->enic->vxlan && !arg->enic->ig_vlan_strip_en) {
- struct vlan_hdr *vlan;
+ struct rte_vlan_hdr *vlan;
- vlan = (struct vlan_hdr *)(eth_mask + 1);
+ vlan = (struct rte_vlan_hdr *)(eth_mask + 1);
vlan->eth_proto = mask->inner_type;
- vlan = (struct vlan_hdr *)(eth_val + 1);
+ vlan = (struct rte_vlan_hdr *)(eth_val + 1);
vlan->eth_proto = spec->inner_type;
} else {
eth_mask->ether_type = mask->inner_type;
@@ -947,11 +947,11 @@ enic_copy_item_vxlan_v2(struct copy_item_args *arg)
mask = &rte_flow_item_vxlan_mask;
memcpy(gp->layer[FILTER_GENERIC_1_L5].mask, mask,
- sizeof(struct vxlan_hdr));
+ sizeof(struct rte_vxlan_hdr));
memcpy(gp->layer[FILTER_GENERIC_1_L5].val, spec,
- sizeof(struct vxlan_hdr));
+ sizeof(struct rte_vxlan_hdr));
- *inner_ofst = sizeof(struct vxlan_hdr);
+ *inner_ofst = sizeof(struct rte_vxlan_hdr);
return 0;
}
@@ -1051,7 +1051,7 @@ fixup_l5_layer(struct enic *enic, struct filter_generic_1 *gp,
if (!(inner_ofst > 0 && enic->vxlan))
return;
FLOW_TRACE();
- vxlan = sizeof(struct vxlan_hdr);
+ vxlan = sizeof(struct rte_vxlan_hdr);
memcpy(gp->layer[FILTER_GENERIC_1_L4].mask + sizeof(struct udp_hdr),
gp->layer[FILTER_GENERIC_1_L5].mask, vxlan);
memcpy(gp->layer[FILTER_GENERIC_1_L4].val + sizeof(struct udp_hdr),
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index ea9eb2e..6b76839 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1667,13 +1667,13 @@ static int enic_dev_init(struct enic *enic)
enic_fdir_info(enic);
eth_dev->data->mac_addrs = rte_zmalloc("enic_mac_addr",
- sizeof(struct ether_addr) *
+ sizeof(struct rte_ether_addr) *
ENIC_UNICAST_PERFECT_FILTERS, 0);
if (!eth_dev->data->mac_addrs) {
dev_err(enic, "mac addr storage alloc failed, aborting.\n");
return -1;
}
- ether_addr_copy((struct ether_addr *) enic->mac_addr,
+ ether_addr_copy((struct rte_ether_addr *)enic->mac_addr,
eth_dev->data->mac_addrs);
vnic_dev_set_reset_flag(enic->vdev, 0);
diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c
index 42dfaca..8f7d911 100644
--- a/drivers/net/failsafe/failsafe.c
+++ b/drivers/net/failsafe/failsafe.c
@@ -166,7 +166,7 @@ static int
fs_eth_dev_create(struct rte_vdev_device *vdev)
{
struct rte_eth_dev *dev;
- struct ether_addr *mac;
+ struct rte_ether_addr *mac;
struct fs_priv *priv;
struct sub_device *sdev;
const char *params;
diff --git a/drivers/net/failsafe/failsafe_args.c b/drivers/net/failsafe/failsafe_args.c
index 3351c5b..5fc6be4 100644
--- a/drivers/net/failsafe/failsafe_args.c
+++ b/drivers/net/failsafe/failsafe_args.c
@@ -367,7 +367,7 @@ static int
fs_get_mac_addr_arg(const char *key __rte_unused,
const char *value, void *out)
{
- struct ether_addr *ea = out;
+ struct rte_ether_addr *ea = out;
int ret;
if ((value == NULL) || (out == NULL))
diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c
index 7ac23d4..549ee6b 100644
--- a/drivers/net/failsafe/failsafe_ether.c
+++ b/drivers/net/failsafe/failsafe_ether.c
@@ -166,7 +166,7 @@ fs_eth_dev_conf_apply(struct rte_eth_dev *dev,
DEBUG("Configure additional MAC address%s",
(PRIV(dev)->nb_mac_addr > 2 ? "es" : ""));
for (i = 1; i < PRIV(dev)->nb_mac_addr; i++) {
- struct ether_addr *ea;
+ struct rte_ether_addr *ea;
ea = &dev->data->mac_addrs[i];
ret = rte_eth_dev_mac_addr_add(PORT_ID(sdev), ea,
diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c
index 43d6a82..c900ecc 100644
--- a/drivers/net/failsafe/failsafe_ops.c
+++ b/drivers/net/failsafe/failsafe_ops.c
@@ -1082,7 +1082,7 @@ fs_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
static int
fs_mac_addr_add(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr,
+ struct rte_ether_addr *mac_addr,
uint32_t index,
uint32_t vmdq)
{
@@ -1111,7 +1111,7 @@ fs_mac_addr_add(struct rte_eth_dev *dev,
}
static int
-fs_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
+fs_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
{
struct sub_device *sdev;
uint8_t i;
@@ -1135,7 +1135,7 @@ fs_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
static int
fs_set_mc_addr_list(struct rte_eth_dev *dev,
- struct ether_addr *mc_addr_set, uint32_t nb_mc_addr)
+ struct rte_ether_addr *mc_addr_set, uint32_t nb_mc_addr)
{
struct sub_device *sdev;
uint8_t i;
diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h
index 4f58a5c..231b89e 100644
--- a/drivers/net/failsafe/failsafe_private.h
+++ b/drivers/net/failsafe/failsafe_private.h
@@ -152,10 +152,10 @@ struct fs_priv {
TAILQ_HEAD(sub_flows, rte_flow) flow_list;
/* current number of mac_addr slots allocated. */
uint32_t nb_mac_addr;
- struct ether_addr mac_addrs[FAILSAFE_MAX_ETHADDR];
+ struct rte_ether_addr mac_addrs[FAILSAFE_MAX_ETHADDR];
uint32_t mac_addr_pool[FAILSAFE_MAX_ETHADDR];
uint32_t nb_mcast_addr;
- struct ether_addr *mcast_addrs;
+ struct rte_ether_addr *mcast_addrs;
/* current capabilities */
struct rte_eth_dev_info infos;
struct rte_eth_dev_owner my_owner; /* Unique owner. */
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index d24c4c5..e4f9f93 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -614,7 +614,7 @@ fm10k_dev_mq_rx_configure(struct rte_eth_dev *dev)
/* reset MAC/VLAN as it's based on VMDQ or PF main VSI */
memset(dev->data->mac_addrs, 0,
ETHER_ADDR_LEN * FM10K_MAX_MACADDR_NUM);
- ether_addr_copy((const struct ether_addr *)hw->mac.addr,
+ ether_addr_copy((const struct rte_ether_addr *)hw->mac.addr,
&dev->data->mac_addrs[0]);
memset(macvlan, 0, sizeof(*macvlan));
macvlan->nb_queue_pools = nb_queue_pools;
@@ -1673,7 +1673,7 @@ static void fm10k_MAC_filter_set(struct rte_eth_dev *dev,
/* Add a MAC address, and update filters */
static int
fm10k_macaddr_add(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr,
+ struct rte_ether_addr *mac_addr,
uint32_t index,
uint32_t pool)
{
@@ -3090,7 +3090,7 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
diag = fm10k_read_mac_addr(hw);
- ether_addr_copy((const struct ether_addr *)hw->mac.addr,
+ ether_addr_copy((const struct rte_ether_addr *)hw->mac.addr,
&dev->data->mac_addrs[0]);
if (diag != FM10K_SUCCESS ||
@@ -3099,7 +3099,7 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
/* Generate a random addr */
eth_random_addr(hw->mac.addr);
memcpy(hw->mac.perm_addr, hw->mac.addr, ETH_ALEN);
- ether_addr_copy((const struct ether_addr *)hw->mac.addr,
+ ether_addr_copy((const struct rte_ether_addr *)hw->mac.addr,
&dev->data->mac_addrs[0]);
}
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 815baa1..85fdf35 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -265,7 +265,7 @@ static int i40e_flow_ctrl_set(struct rte_eth_dev *dev,
static int i40e_priority_flow_ctrl_set(struct rte_eth_dev *dev,
struct rte_eth_pfc_conf *pfc_conf);
static int i40e_macaddr_add(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr,
+ struct rte_ether_addr *mac_addr,
uint32_t index,
uint32_t pool);
static void i40e_macaddr_remove(struct rte_eth_dev *dev, uint32_t index);
@@ -379,7 +379,7 @@ static int i40e_get_module_eeprom(struct rte_eth_dev *dev,
struct rte_dev_eeprom_info *info);
static int i40e_set_default_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr);
+ struct rte_ether_addr *mac_addr);
static int i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
@@ -1469,8 +1469,8 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
goto err_get_mac_addr;
}
/* Copy the permanent MAC address */
- ether_addr_copy((struct ether_addr *) hw->mac.addr,
- (struct ether_addr *) hw->mac.perm_addr);
+ ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
+ (struct rte_ether_addr *)hw->mac.perm_addr);
/* Disable flow control */
hw->fc.requested_mode = I40E_FC_NONE;
@@ -1521,7 +1521,7 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
"Failed to allocated memory for storing mac address");
goto err_mac_alloc;
}
- ether_addr_copy((struct ether_addr *)hw->mac.perm_addr,
+ ether_addr_copy((struct rte_ether_addr *)hw->mac.perm_addr,
&dev->data->mac_addrs[0]);
/* Init dcb to sw mode by default */
@@ -4012,7 +4012,7 @@ i40e_priority_flow_ctrl_set(__rte_unused struct rte_eth_dev *dev,
/* Add a MAC address, and update filters */
static int
i40e_macaddr_add(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr,
+ struct rte_ether_addr *mac_addr,
__rte_unused uint32_t index,
uint32_t pool)
{
@@ -4063,7 +4063,7 @@ i40e_macaddr_remove(struct rte_eth_dev *dev, uint32_t index)
struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
struct i40e_vsi *vsi;
struct rte_eth_dev_data *data = dev->data;
- struct ether_addr *macaddr;
+ struct rte_ether_addr *macaddr;
int ret;
uint32_t i;
uint64_t pool_sel;
@@ -4104,8 +4104,8 @@ i40e_vf_mac_filter_set(struct i40e_pf *pf,
{
struct i40e_hw *hw;
struct i40e_mac_filter_info mac_filter;
- struct ether_addr old_mac;
- struct ether_addr *new_mac;
+ struct rte_ether_addr old_mac;
+ struct rte_ether_addr *new_mac;
struct i40e_pf_vf *vf = NULL;
uint16_t vf_id;
int ret;
@@ -4166,7 +4166,7 @@ i40e_vf_mac_filter_set(struct i40e_pf *pf,
/* Clear device address as it has been removed */
if (is_same_ether_addr(&(pf->dev_addr), new_mac))
- memset(&pf->dev_addr, 0, sizeof(struct ether_addr));
+ memset(&pf->dev_addr, 0, sizeof(struct rte_ether_addr));
}
return 0;
@@ -5343,7 +5343,7 @@ i40e_update_default_filter_setting(struct i40e_vsi *vsi)
ret = i40e_aq_remove_macvlan(hw, vsi->seid, &def_filter, 1, NULL);
if (ret != I40E_SUCCESS) {
struct i40e_mac_filter *f;
- struct ether_addr *mac;
+ struct rte_ether_addr *mac;
PMD_DRV_LOG(DEBUG,
"Cannot remove the default macvlan filter");
@@ -5363,7 +5363,7 @@ i40e_update_default_filter_setting(struct i40e_vsi *vsi)
return ret;
}
rte_memcpy(&filter.mac_addr,
- (struct ether_addr *)(hw->mac.perm_addr), ETH_ADDR_LEN);
+ (struct rte_ether_addr *)(hw->mac.perm_addr), ETH_ADDR_LEN);
filter.filter_type = RTE_MACVLAN_PERFECT_MATCH;
return i40e_vsi_add_mac(vsi, &filter);
}
@@ -5481,7 +5481,7 @@ i40e_vsi_setup(struct i40e_pf *pf,
struct i40e_mac_filter_info filter;
int ret;
struct i40e_vsi_context ctxt;
- struct ether_addr broadcast =
+ struct rte_ether_addr broadcast =
{.addr_bytes = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}};
if (type != I40E_VSI_MAIN && type != I40E_VSI_SRIOV &&
@@ -6908,7 +6908,7 @@ DONE:
/* Find out specific MAC filter */
static struct i40e_mac_filter *
i40e_find_mac_filter(struct i40e_vsi *vsi,
- struct ether_addr *macaddr)
+ struct rte_ether_addr *macaddr)
{
struct i40e_mac_filter *f;
@@ -6992,7 +6992,7 @@ i40e_set_vlan_filter(struct i40e_vsi *vsi,
int
i40e_find_all_vlan_for_mac(struct i40e_vsi *vsi,
struct i40e_macvlan_filter *mv_f,
- int num, struct ether_addr *addr)
+ int num, struct rte_ether_addr *addr)
{
int i;
uint32_t j, k;
@@ -7286,7 +7286,7 @@ DONE:
}
int
-i40e_vsi_delete_mac(struct i40e_vsi *vsi, struct ether_addr *addr)
+i40e_vsi_delete_mac(struct i40e_vsi *vsi, struct rte_ether_addr *addr)
{
struct i40e_mac_filter *f;
struct i40e_macvlan_filter *mv_f;
@@ -7586,10 +7586,10 @@ i40e_tunnel_filter_convert(
struct i40e_aqc_cloud_filters_element_bb *cld_filter,
struct i40e_tunnel_filter *tunnel_filter)
{
- ether_addr_copy((struct ether_addr *)&cld_filter->element.outer_mac,
- (struct ether_addr *)&tunnel_filter->input.outer_mac);
- ether_addr_copy((struct ether_addr *)&cld_filter->element.inner_mac,
- (struct ether_addr *)&tunnel_filter->input.inner_mac);
+ ether_addr_copy((struct rte_ether_addr *)&cld_filter->element.outer_mac,
+ (struct rte_ether_addr *)&tunnel_filter->input.outer_mac);
+ ether_addr_copy((struct rte_ether_addr *)&cld_filter->element.inner_mac,
+ (struct rte_ether_addr *)&tunnel_filter->input.inner_mac);
tunnel_filter->input.inner_vlan = cld_filter->element.inner_vlan;
if ((rte_le_to_cpu_16(cld_filter->element.flags) &
I40E_AQC_ADD_CLOUD_FLAGS_IPV6) ==
@@ -7698,9 +7698,9 @@ i40e_dev_tunnel_filter_set(struct i40e_pf *pf,
pfilter = cld_filter;
ether_addr_copy(&tunnel_filter->outer_mac,
- (struct ether_addr *)&pfilter->element.outer_mac);
+ (struct rte_ether_addr *)&pfilter->element.outer_mac);
ether_addr_copy(&tunnel_filter->inner_mac,
- (struct ether_addr *)&pfilter->element.inner_mac);
+ (struct rte_ether_addr *)&pfilter->element.inner_mac);
pfilter->element.inner_vlan =
rte_cpu_to_le_16(tunnel_filter->inner_vlan);
@@ -8145,9 +8145,9 @@ i40e_dev_consistent_tunnel_filter_set(struct i40e_pf *pf,
pfilter = cld_filter;
ether_addr_copy(&tunnel_filter->outer_mac,
- (struct ether_addr *)&pfilter->element.outer_mac);
+ (struct rte_ether_addr *)&pfilter->element.outer_mac);
ether_addr_copy(&tunnel_filter->inner_mac,
- (struct ether_addr *)&pfilter->element.inner_mac);
+ (struct rte_ether_addr *)&pfilter->element.inner_mac);
pfilter->element.inner_vlan =
rte_cpu_to_le_16(tunnel_filter->inner_vlan);
@@ -11951,7 +11951,7 @@ static int i40e_get_module_eeprom(struct rte_eth_dev *dev,
}
static int i40e_set_default_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr)
+ struct rte_ether_addr *mac_addr)
{
struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
@@ -12084,10 +12084,10 @@ i40e_tunnel_filter_restore(struct i40e_pf *pf)
vsi = vf->vsi;
}
memset(&cld_filter, 0, sizeof(cld_filter));
- ether_addr_copy((struct ether_addr *)&f->input.outer_mac,
- (struct ether_addr *)&cld_filter.element.outer_mac);
- ether_addr_copy((struct ether_addr *)&f->input.inner_mac,
- (struct ether_addr *)&cld_filter.element.inner_mac);
+ ether_addr_copy((struct rte_ether_addr *)&f->input.outer_mac,
+ (struct rte_ether_addr *)&cld_filter.element.outer_mac);
+ ether_addr_copy((struct rte_ether_addr *)&f->input.inner_mac,
+ (struct rte_ether_addr *)&cld_filter.element.inner_mac);
cld_filter.element.inner_vlan = f->input.inner_vlan;
cld_filter.element.flags = f->input.flags;
cld_filter.element.tenant_id = f->input.tenant_id;
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 9855038..ffaa7b9 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -277,7 +277,7 @@ struct i40e_adapter;
*/
struct i40e_mac_filter_info {
enum rte_mac_filter_type filter_type;
- struct ether_addr mac_addr;
+ struct rte_ether_addr mac_addr;
};
TAILQ_HEAD(i40e_mac_filter_list, i40e_mac_filter);
@@ -330,7 +330,7 @@ struct i40e_veb {
/* i40e MACVLAN filter structure */
struct i40e_macvlan_filter {
- struct ether_addr macaddr;
+ struct rte_ether_addr macaddr;
enum rte_mac_filter_type filter_type;
uint16_t vlan_id;
};
@@ -421,7 +421,7 @@ struct i40e_pf_vf {
uint16_t vf_idx; /* VF index in pf->vfs */
uint16_t lan_nb_qps; /* Actual queues allocated */
uint16_t reset_cnt; /* Total vf reset times */
- struct ether_addr mac_addr; /* Default MAC address */
+ struct rte_ether_addr mac_addr; /* Default MAC address */
/* version of the virtchnl from VF */
struct virtchnl_version_info version;
uint32_t request_caps; /* offload caps requested from VF */
@@ -641,7 +641,7 @@ struct i40e_fdir_info {
/* Ethertype filter struct */
struct i40e_ethertype_filter_input {
- struct ether_addr mac_addr; /* Mac address to match */
+ struct rte_ether_addr mac_addr; /* Mac address to match */
uint16_t ether_type; /* Ether type to match */
};
@@ -759,8 +759,8 @@ enum i40e_tunnel_type {
* Tunneling Packet filter configuration.
*/
struct i40e_tunnel_filter_conf {
- struct ether_addr outer_mac; /**< Outer MAC address to match. */
- struct ether_addr inner_mac; /**< Inner MAC address to match. */
+ struct rte_ether_addr outer_mac; /**< Outer MAC address to match. */
+ struct rte_ether_addr inner_mac; /**< Inner MAC address to match. */
uint16_t inner_vlan; /**< Inner VLAN to match. */
uint32_t outer_vlan; /**< Outer VLAN to match */
enum i40e_tunnel_iptype ip_type; /**< IP address type. */
@@ -919,7 +919,7 @@ struct i40e_pf {
bool offset_loaded;
struct rte_eth_dev_data *dev_data; /* Pointer to the device data */
- struct ether_addr dev_addr; /* PF device mac address */
+ struct rte_ether_addr dev_addr; /* PF device mac address */
uint64_t flags; /* PF feature flags */
/* All kinds of queue pair setting for different VSIs */
struct i40e_pf_vf *vfs;
@@ -1023,7 +1023,8 @@ struct i40e_vf {
uint16_t promisc_flags; /* Promiscuous setting */
uint32_t vlan[I40E_VFTA_SIZE]; /* VLAN bit map */
- struct ether_addr mc_addrs[I40E_NUM_MACADDR_MAX]; /* Multicast addrs */
+ /* Multicast addrs */
+ struct rte_ether_addr mc_addrs[I40E_NUM_MACADDR_MAX];
uint16_t mc_addrs_num; /* Multicast mac addresses number */
/* Event from pf */
@@ -1131,7 +1132,7 @@ int i40e_switch_tx_queue(struct i40e_hw *hw, uint16_t q_idx, bool on);
int i40e_vsi_add_vlan(struct i40e_vsi *vsi, uint16_t vlan);
int i40e_vsi_delete_vlan(struct i40e_vsi *vsi, uint16_t vlan);
int i40e_vsi_add_mac(struct i40e_vsi *vsi, struct i40e_mac_filter_info *filter);
-int i40e_vsi_delete_mac(struct i40e_vsi *vsi, struct ether_addr *addr);
+int i40e_vsi_delete_mac(struct i40e_vsi *vsi, struct rte_ether_addr *addr);
void i40e_update_vsi_stats(struct i40e_vsi *vsi);
void i40e_pf_disable_irq0(struct i40e_hw *hw);
void i40e_pf_enable_irq0(struct i40e_hw *hw);
@@ -1206,7 +1207,7 @@ int i40e_dev_consistent_tunnel_filter_set(struct i40e_pf *pf,
int i40e_fdir_flush(struct rte_eth_dev *dev);
int i40e_find_all_vlan_for_mac(struct i40e_vsi *vsi,
struct i40e_macvlan_filter *mv_f,
- int num, struct ether_addr *addr);
+ int num, struct rte_ether_addr *addr);
int i40e_remove_macvlan_filters(struct i40e_vsi *vsi,
struct i40e_macvlan_filter *filter,
int total);
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index a348972..0b05ddb 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -106,7 +106,7 @@ static int i40evf_dev_tx_queue_start(struct rte_eth_dev *dev,
static int i40evf_dev_tx_queue_stop(struct rte_eth_dev *dev,
uint16_t tx_queue_id);
static int i40evf_add_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *addr,
+ struct rte_ether_addr *addr,
uint32_t index,
uint32_t pool);
static void i40evf_del_mac_addr(struct rte_eth_dev *dev, uint32_t index);
@@ -123,7 +123,7 @@ static int i40evf_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
struct rte_eth_rss_conf *rss_conf);
static int i40evf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
static int i40evf_set_default_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr);
+ struct rte_ether_addr *mac_addr);
static int
i40evf_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id);
static int
@@ -134,10 +134,11 @@ static void i40evf_handle_pf_event(struct rte_eth_dev *dev,
static int
i40evf_add_del_mc_addr_list(struct rte_eth_dev *dev,
- struct ether_addr *mc_addr_set,
+ struct rte_ether_addr *mc_addr_set,
uint32_t nb_mc_addr, bool add);
static int
-i40evf_set_mc_addr_list(struct rte_eth_dev *dev, struct ether_addr *mc_addr_set,
+i40evf_set_mc_addr_list(struct rte_eth_dev *dev,
+ struct rte_ether_addr *mc_addr_set,
uint32_t nb_mc_addr);
/* Default hash key buffer for RSS */
@@ -776,7 +777,7 @@ i40evf_stop_queues(struct rte_eth_dev *dev)
static int
i40evf_add_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *addr,
+ struct rte_ether_addr *addr,
__rte_unused uint32_t index,
__rte_unused uint32_t pool)
{
@@ -818,7 +819,7 @@ i40evf_add_mac_addr(struct rte_eth_dev *dev,
static void
i40evf_del_mac_addr_by_addr(struct rte_eth_dev *dev,
- struct ether_addr *addr)
+ struct rte_ether_addr *addr)
{
struct virtchnl_ether_addr_list *list;
struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
@@ -859,7 +860,7 @@ static void
i40evf_del_mac_addr(struct rte_eth_dev *dev, uint32_t index)
{
struct rte_eth_dev_data *data = dev->data;
- struct ether_addr *addr;
+ struct rte_ether_addr *addr;
addr = &data->mac_addrs[index];
@@ -1273,7 +1274,7 @@ i40evf_init_vf(struct rte_eth_dev *dev)
vf->vsi.adapter = I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
/* Store the MAC address configured by host, or generate random one */
- if (is_valid_assigned_ether_addr((struct ether_addr *)hw->mac.addr))
+ if (is_valid_assigned_ether_addr((struct rte_ether_addr *)hw->mac.addr))
vf->flags |= I40E_FLAG_VF_MAC_BY_PF;
else
eth_random_addr(hw->mac.addr); /* Generate a random one */
@@ -1511,7 +1512,7 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
ETHER_ADDR_LEN * I40E_NUM_MACADDR_MAX);
return -ENOMEM;
}
- ether_addr_copy((struct ether_addr *)hw->mac.addr,
+ ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
&eth_dev->data->mac_addrs[0]);
return 0;
@@ -1929,7 +1930,7 @@ i40evf_add_del_all_mac_addr(struct rte_eth_dev *dev, bool add)
int next_begin = 0;
int begin = 0;
uint32_t len;
- struct ether_addr *addr;
+ struct rte_ether_addr *addr;
struct vf_cmd_info args;
do {
@@ -2701,7 +2702,7 @@ i40evf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
static int
i40evf_set_default_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr)
+ struct rte_ether_addr *mac_addr)
{
struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -2714,18 +2715,18 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev,
if (vf->flags & I40E_FLAG_VF_MAC_BY_PF)
return -EPERM;
- i40evf_del_mac_addr_by_addr(dev, (struct ether_addr *)hw->mac.addr);
+ i40evf_del_mac_addr_by_addr(dev, (struct rte_ether_addr *)hw->mac.addr);
if (i40evf_add_mac_addr(dev, mac_addr, 0, 0) != 0)
return -EIO;
- ether_addr_copy(mac_addr, (struct ether_addr *)hw->mac.addr);
+ ether_addr_copy(mac_addr, (struct rte_ether_addr *)hw->mac.addr);
return 0;
}
static int
i40evf_add_del_mc_addr_list(struct rte_eth_dev *dev,
- struct ether_addr *mc_addrs,
+ struct rte_ether_addr *mc_addrs,
uint32_t mc_addrs_num, bool add)
{
struct virtchnl_ether_addr_list *list;
@@ -2779,7 +2780,8 @@ i40evf_add_del_mc_addr_list(struct rte_eth_dev *dev,
}
static int
-i40evf_set_mc_addr_list(struct rte_eth_dev *dev, struct ether_addr *mc_addrs,
+i40evf_set_mc_addr_list(struct rte_eth_dev *dev,
+ struct rte_ether_addr *mc_addrs,
uint32_t mc_addrs_num)
{
struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 4b32fee..dd940ce 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -685,7 +685,7 @@ i40e_fdir_fill_eth_ip_head(const struct rte_eth_fdir_input *fdir_input,
{
static uint8_t vlan_frame[] = {0x81, 0, 0, 0};
uint16_t *ether_type;
- uint8_t len = 2 * sizeof(struct ether_addr);
+ uint8_t len = 2 * sizeof(struct rte_ether_addr);
struct ipv4_hdr *ip;
struct ipv6_hdr *ip6;
static const uint8_t next_proto[] = {
@@ -701,7 +701,7 @@ i40e_fdir_fill_eth_ip_head(const struct rte_eth_fdir_input *fdir_input,
[RTE_ETH_FLOW_NONFRAG_IPV6_OTHER] = IPPROTO_NONE,
};
- raw_pkt += 2 * sizeof(struct ether_addr);
+ raw_pkt += 2 * sizeof(struct rte_ether_addr);
if (vlan && fdir_input->flow_ext.vlan_tci) {
rte_memcpy(raw_pkt, vlan_frame, sizeof(vlan_frame));
rte_memcpy(raw_pkt + sizeof(uint16_t),
@@ -959,7 +959,7 @@ i40e_flow_fdir_fill_eth_ip_head(struct i40e_pf *pf,
struct i40e_customized_pctype *cus_pctype = NULL;
static uint8_t vlan_frame[] = {0x81, 0, 0, 0};
uint16_t *ether_type;
- uint8_t len = 2 * sizeof(struct ether_addr);
+ uint8_t len = 2 * sizeof(struct rte_ether_addr);
struct ipv4_hdr *ip;
struct ipv6_hdr *ip6;
uint8_t pctype = fdir_input->pctype;
@@ -977,7 +977,7 @@ i40e_flow_fdir_fill_eth_ip_head(struct i40e_pf *pf,
[I40E_FILTER_PCTYPE_NONF_IPV6_OTHER] = IPPROTO_NONE,
};
- raw_pkt += 2 * sizeof(struct ether_addr);
+ raw_pkt += 2 * sizeof(struct rte_ether_addr);
if (vlan && fdir_input->flow_ext.vlan_tci) {
rte_memcpy(raw_pkt, vlan_frame, sizeof(vlan_frame));
rte_memcpy(raw_pkt + sizeof(uint16_t),
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index bca93b6..559ca92 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -4810,10 +4810,10 @@ i40e_flow_destroy_tunnel_filter(struct i40e_pf *pf,
int ret = 0;
memset(&cld_filter, 0, sizeof(cld_filter));
- ether_addr_copy((struct ether_addr *)&filter->input.outer_mac,
- (struct ether_addr *)&cld_filter.element.outer_mac);
- ether_addr_copy((struct ether_addr *)&filter->input.inner_mac,
- (struct ether_addr *)&cld_filter.element.inner_mac);
+ ether_addr_copy((struct rte_ether_addr *)&filter->input.outer_mac,
+ (struct rte_ether_addr *)&cld_filter.element.outer_mac);
+ ether_addr_copy((struct rte_ether_addr *)&filter->input.inner_mac,
+ (struct rte_ether_addr *)&cld_filter.element.inner_mac);
cld_filter.element.inner_vlan = filter->input.inner_vlan;
cld_filter.element.flags = filter->input.flags;
cld_filter.element.tenant_id = filter->input.tenant_id;
diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index 91be450..4d7001d 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -349,7 +349,7 @@ i40e_pf_host_process_cmd_get_vf_resource(struct i40e_pf_vf *vf, uint8_t *msg,
vf_res->vsi_res[0].vsi_id = vf->vsi->vsi_id;
vf_res->vsi_res[0].num_queue_pairs = vf->vsi->nb_qps;
ether_addr_copy(&vf->mac_addr,
- (struct ether_addr *)vf_res->vsi_res[0].default_mac_addr);
+ (struct rte_ether_addr *)vf_res->vsi_res[0].default_mac_addr);
send_msg:
i40e_pf_host_send_msg_to_vf(vf, VIRTCHNL_OP_GET_VF_RESOURCES,
@@ -823,7 +823,7 @@ i40e_pf_host_process_cmd_add_ether_address(struct i40e_pf_vf *vf,
(struct virtchnl_ether_addr_list *)msg;
struct i40e_mac_filter_info filter;
int i;
- struct ether_addr *mac;
+ struct rte_ether_addr *mac;
if (!b_op) {
i40e_pf_host_send_msg_to_vf(
@@ -842,7 +842,7 @@ i40e_pf_host_process_cmd_add_ether_address(struct i40e_pf_vf *vf,
}
for (i = 0; i < addr_list->num_elements; i++) {
- mac = (struct ether_addr *)(addr_list->list[i].addr);
+ mac = (struct rte_ether_addr *)(addr_list->list[i].addr);
rte_memcpy(&filter.mac_addr, mac, ETHER_ADDR_LEN);
filter.filter_type = RTE_MACVLAN_PERFECT_MATCH;
if (is_zero_ether_addr(mac) ||
@@ -869,7 +869,7 @@ i40e_pf_host_process_cmd_del_ether_address(struct i40e_pf_vf *vf,
struct virtchnl_ether_addr_list *addr_list =
(struct virtchnl_ether_addr_list *)msg;
int i;
- struct ether_addr *mac;
+ struct rte_ether_addr *mac;
if (!b_op) {
i40e_pf_host_send_msg_to_vf(
@@ -886,7 +886,7 @@ i40e_pf_host_process_cmd_del_ether_address(struct i40e_pf_vf *vf,
}
for (i = 0; i < addr_list->num_elements; i++) {
- mac = (struct ether_addr *)(addr_list->list[i].addr);
+ mac = (struct rte_ether_addr *)(addr_list->list[i].addr);
if(is_zero_ether_addr(mac) ||
i40e_vsi_delete_mac(vf->vsi, mac)) {
ret = I40E_ERR_INVALID_MAC_ADDR;
diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c
index 45a15d3..633dca6 100644
--- a/drivers/net/i40e/i40e_vf_representor.c
+++ b/drivers/net/i40e/i40e_vf_representor.c
@@ -324,7 +324,7 @@ i40e_vf_representor_mac_addr_remove(struct rte_eth_dev *ethdev, uint32_t index)
static int
i40e_vf_representor_mac_addr_set(struct rte_eth_dev *ethdev,
- struct ether_addr *mac_addr)
+ struct rte_ether_addr *mac_addr)
{
struct i40e_vf_representor *representor = ethdev->data->dev_private;
diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index 7ae78e4..8e56255 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -529,7 +529,7 @@ rte_pmd_i40e_set_vf_multicast_promisc(uint16_t port, uint16_t vf_id, uint8_t on)
int
rte_pmd_i40e_set_vf_mac_addr(uint16_t port, uint16_t vf_id,
- struct ether_addr *mac_addr)
+ struct rte_ether_addr *mac_addr)
{
struct i40e_mac_filter *f;
struct rte_eth_dev *dev;
@@ -571,11 +571,11 @@ rte_pmd_i40e_set_vf_mac_addr(uint16_t port, uint16_t vf_id,
return 0;
}
-static const struct ether_addr null_mac_addr;
+static const struct rte_ether_addr null_mac_addr;
int
rte_pmd_i40e_remove_vf_mac_addr(uint16_t port, uint16_t vf_id,
- struct ether_addr *mac_addr)
+ struct rte_ether_addr *mac_addr)
{
struct rte_eth_dev *dev;
struct i40e_pf_vf *vf;
@@ -724,7 +724,7 @@ int rte_pmd_i40e_set_vf_broadcast(uint16_t port, uint16_t vf_id,
struct i40e_vsi *vsi;
struct i40e_hw *hw;
struct i40e_mac_filter_info filter;
- struct ether_addr broadcast = {
+ struct rte_ether_addr broadcast = {
.addr_bytes = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff} };
int ret;
@@ -2355,7 +2355,7 @@ int rte_pmd_i40e_ptype_mapping_replace(uint16_t port,
int
rte_pmd_i40e_add_vf_mac_addr(uint16_t port, uint16_t vf_id,
- struct ether_addr *mac_addr)
+ struct rte_ether_addr *mac_addr)
{
struct rte_eth_dev *dev;
struct i40e_pf_vf *vf;
@@ -2492,10 +2492,11 @@ rte_pmd_i40e_flow_type_mapping_update(
}
int
-rte_pmd_i40e_query_vfid_by_mac(uint16_t port, const struct ether_addr *vf_mac)
+rte_pmd_i40e_query_vfid_by_mac(uint16_t port,
+ const struct rte_ether_addr *vf_mac)
{
struct rte_eth_dev *dev;
- struct ether_addr *mac;
+ struct rte_ether_addr *mac;
struct i40e_pf *pf;
int vf_id;
struct i40e_pf_vf *vf;
diff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h
index a131314..faac9e2 100644
--- a/drivers/net/i40e/rte_pmd_i40e.h
+++ b/drivers/net/i40e/rte_pmd_i40e.h
@@ -453,7 +453,7 @@ int rte_pmd_i40e_set_vf_multicast_promisc(uint16_t port,
* - (-EINVAL) if *vf* or *mac_addr* is invalid.
*/
int rte_pmd_i40e_set_vf_mac_addr(uint16_t port, uint16_t vf_id,
- struct ether_addr *mac_addr);
+ struct rte_ether_addr *mac_addr);
/**
* Remove the VF MAC address.
@@ -471,7 +471,7 @@ int rte_pmd_i40e_set_vf_mac_addr(uint16_t port, uint16_t vf_id,
*/
int
rte_pmd_i40e_remove_vf_mac_addr(uint16_t port, uint16_t vf_id,
- struct ether_addr *mac_addr);
+ struct rte_ether_addr *mac_addr);
/**
* Enable/Disable vf vlan strip for all queues in a pool
@@ -854,7 +854,7 @@ int rte_pmd_i40e_ptype_mapping_replace(uint16_t port,
* - (-EINVAL) if *vf* or *mac_addr* is invalid.
*/
int rte_pmd_i40e_add_vf_mac_addr(uint16_t port, uint16_t vf_id,
- struct ether_addr *mac_addr);
+ struct rte_ether_addr *mac_addr);
#define RTE_PMD_I40E_PCTYPE_MAX 64
#define RTE_PMD_I40E_FLOW_TYPE_MAX 64
@@ -924,7 +924,7 @@ int rte_pmd_i40e_flow_type_mapping_reset(uint16_t port);
* -ENOTSUP: i40e not supported for this port.
*/
int rte_pmd_i40e_query_vfid_by_mac(uint16_t port,
- const struct ether_addr *vf_mac);
+ const struct rte_ether_addr *vf_mac);
/**
* Do RSS queue region configuration for that port as
diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h
index 3470e03..1227259 100644
--- a/drivers/net/iavf/iavf.h
+++ b/drivers/net/iavf/iavf.h
@@ -217,6 +217,6 @@ int iavf_query_stats(struct iavf_adapter *adapter,
int iavf_config_promisc(struct iavf_adapter *adapter, bool enable_unicast,
bool enable_multicast);
int iavf_add_del_eth_addr(struct iavf_adapter *adapter,
- struct ether_addr *addr, bool add);
+ struct rte_ether_addr *addr, bool add);
int iavf_add_del_vlan(struct iavf_adapter *adapter, uint16_t vlanid, bool add);
#endif /* _IAVF_ETHDEV_H_ */
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 4072a7b..c983550 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -48,7 +48,7 @@ static void iavf_dev_promiscuous_disable(struct rte_eth_dev *dev);
static void iavf_dev_allmulticast_enable(struct rte_eth_dev *dev);
static void iavf_dev_allmulticast_disable(struct rte_eth_dev *dev);
static int iavf_dev_add_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *addr,
+ struct rte_ether_addr *addr,
uint32_t index,
uint32_t pool);
static void iavf_dev_del_mac_addr(struct rte_eth_dev *dev, uint32_t index);
@@ -67,7 +67,7 @@ static int iavf_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
struct rte_eth_rss_conf *rss_conf);
static int iavf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
static int iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr);
+ struct rte_ether_addr *mac_addr);
static int iavf_dev_rx_queue_intr_enable(struct rte_eth_dev *dev,
uint16_t queue_id);
static int iavf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev,
@@ -697,7 +697,7 @@ iavf_dev_allmulticast_disable(struct rte_eth_dev *dev)
}
static int
-iavf_dev_add_mac_addr(struct rte_eth_dev *dev, struct ether_addr *addr,
+iavf_dev_add_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *addr,
__rte_unused uint32_t index,
__rte_unused uint32_t pool)
{
@@ -728,7 +728,7 @@ iavf_dev_del_mac_addr(struct rte_eth_dev *dev, uint32_t index)
struct iavf_adapter *adapter =
IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
- struct ether_addr *addr;
+ struct rte_ether_addr *addr;
int err;
addr = &dev->data->mac_addrs[index];
@@ -940,16 +940,16 @@ iavf_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
static int
iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr)
+ struct rte_ether_addr *mac_addr)
{
struct iavf_adapter *adapter =
IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
struct iavf_hw *hw = IAVF_DEV_PRIVATE_TO_HW(adapter);
- struct ether_addr *perm_addr, *old_addr;
+ struct rte_ether_addr *perm_addr, *old_addr;
int ret;
- old_addr = (struct ether_addr *)hw->mac.addr;
- perm_addr = (struct ether_addr *)hw->mac.perm_addr;
+ old_addr = (struct rte_ether_addr *)hw->mac.addr;
+ perm_addr = (struct rte_ether_addr *)hw->mac.perm_addr;
if (is_same_ether_addr(mac_addr, old_addr))
return 0;
@@ -983,7 +983,7 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
if (ret)
return -EIO;
- ether_addr_copy(mac_addr, (struct ether_addr *)hw->mac.addr);
+ ether_addr_copy(mac_addr, (struct rte_ether_addr *)hw->mac.addr);
return 0;
}
@@ -1317,9 +1317,10 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
/* If the MAC address is not configured by host,
* generate a random one.
*/
- if (!is_valid_assigned_ether_addr((struct ether_addr *)hw->mac.addr))
+ if (!is_valid_assigned_ether_addr(
+ (struct rte_ether_addr *)hw->mac.addr))
eth_random_addr(hw->mac.addr);
- ether_addr_copy((struct ether_addr *)hw->mac.addr,
+ ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
&eth_dev->data->mac_addrs[0]);
/* register callback func to eal lib */
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index da6401d..a705dbd 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -636,7 +636,7 @@ iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add)
{
struct virtchnl_ether_addr_list *list;
struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
- struct ether_addr *addr;
+ struct rte_ether_addr *addr;
struct iavf_cmd_info args;
int len, err, i, j;
int next_begin = 0;
@@ -753,7 +753,7 @@ iavf_config_promisc(struct iavf_adapter *adapter,
}
int
-iavf_add_del_eth_addr(struct iavf_adapter *adapter, struct ether_addr *addr,
+iavf_add_del_eth_addr(struct iavf_adapter *adapter, struct rte_ether_addr *addr,
bool add)
{
struct virtchnl_ether_addr_list *list;
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 19fbbc3..d09d172 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -58,9 +58,9 @@ static int ice_vlan_filter_set(struct rte_eth_dev *dev,
uint16_t vlan_id,
int on);
static int ice_macaddr_set(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr);
+ struct rte_ether_addr *mac_addr);
static int ice_macaddr_add(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr,
+ struct rte_ether_addr *mac_addr,
__rte_unused uint32_t index,
uint32_t pool);
static void ice_macaddr_remove(struct rte_eth_dev *dev, uint32_t index);
@@ -486,29 +486,30 @@ ice_init_mac_address(struct rte_eth_dev *dev)
struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
if (!is_unicast_ether_addr
- ((struct ether_addr *)hw->port_info[0].mac.lan_addr)) {
+ ((struct rte_ether_addr *)hw->port_info[0].mac.lan_addr)) {
PMD_INIT_LOG(ERR, "Invalid MAC address");
return -EINVAL;
}
- ether_addr_copy((struct ether_addr *)hw->port_info[0].mac.lan_addr,
- (struct ether_addr *)hw->port_info[0].mac.perm_addr);
+ ether_addr_copy((struct rte_ether_addr *)hw->port_info[0].mac.lan_addr,
+ (struct rte_ether_addr *)hw->port_info[0].mac.perm_addr);
- dev->data->mac_addrs = rte_zmalloc(NULL, sizeof(struct ether_addr), 0);
+ dev->data->mac_addrs =
+ rte_zmalloc(NULL, sizeof(struct rte_ether_addr), 0);
if (!dev->data->mac_addrs) {
PMD_INIT_LOG(ERR,
"Failed to allocate memory to store mac address");
return -ENOMEM;
}
/* store it to dev data */
- ether_addr_copy((struct ether_addr *)hw->port_info[0].mac.perm_addr,
+ ether_addr_copy((struct rte_ether_addr *)hw->port_info[0].mac.perm_addr,
&dev->data->mac_addrs[0]);
return 0;
}
/* Find out specific MAC filter */
static struct ice_mac_filter *
-ice_find_mac_filter(struct ice_vsi *vsi, struct ether_addr *macaddr)
+ice_find_mac_filter(struct ice_vsi *vsi, struct rte_ether_addr *macaddr)
{
struct ice_mac_filter *f;
@@ -521,7 +522,7 @@ ice_find_mac_filter(struct ice_vsi *vsi, struct ether_addr *macaddr)
}
static int
-ice_add_mac_filter(struct ice_vsi *vsi, struct ether_addr *mac_addr)
+ice_add_mac_filter(struct ice_vsi *vsi, struct rte_ether_addr *mac_addr)
{
struct ice_fltr_list_entry *m_list_itr = NULL;
struct ice_mac_filter *f;
@@ -580,7 +581,7 @@ DONE:
}
static int
-ice_remove_mac_filter(struct ice_vsi *vsi, struct ether_addr *mac_addr)
+ice_remove_mac_filter(struct ice_vsi *vsi, struct rte_ether_addr *mac_addr)
{
struct ice_fltr_list_entry *m_list_itr = NULL;
struct ice_mac_filter *f;
@@ -1133,9 +1134,9 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type)
struct ice_vsi *vsi = NULL;
struct ice_vsi_ctx vsi_ctx;
int ret;
- struct ether_addr broadcast = {
+ struct rte_ether_addr broadcast = {
.addr_bytes = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff} };
- struct ether_addr mac_addr;
+ struct rte_ether_addr mac_addr;
uint16_t max_txqs[ICE_MAX_TRAFFIC_CLASS] = { 0 };
uint8_t tc_bitmap = 0x1;
@@ -2347,7 +2348,7 @@ ice_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
}
static int ice_macaddr_set(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr)
+ struct rte_ether_addr *mac_addr)
{
struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
@@ -2394,7 +2395,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
/* Add a MAC address, and update filters */
static int
ice_macaddr_add(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr,
+ struct rte_ether_addr *mac_addr,
__rte_unused uint32_t index,
__rte_unused uint32_t pool)
{
@@ -2418,7 +2419,7 @@ ice_macaddr_remove(struct rte_eth_dev *dev, uint32_t index)
struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
struct ice_vsi *vsi = pf->main_vsi;
struct rte_eth_dev_data *data = dev->data;
- struct ether_addr *macaddr;
+ struct rte_ether_addr *macaddr;
int ret;
macaddr = &data->mac_addrs[index];
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index f3ed02e..4baaf94 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -130,7 +130,7 @@ struct ice_adapter;
* MAC filter structure
*/
struct ice_mac_filter_info {
- struct ether_addr mac_addr;
+ struct rte_ether_addr mac_addr;
};
TAILQ_HEAD(ice_mac_filter_list, ice_mac_filter);
@@ -247,7 +247,7 @@ struct ice_pf {
struct ice_res_pool_info qp_pool; /*Queue pair pool */
struct ice_res_pool_info msix_pool; /* MSIX interrupt pool */
struct rte_eth_dev_data *dev_data; /* Pointer to the device data */
- struct ether_addr dev_addr; /* PF device mac address */
+ struct rte_ether_addr dev_addr; /* PF device mac address */
uint64_t flags; /* PF feature flags */
uint16_t hash_lut_size; /* The size of hash lookup table */
uint16_t lan_nb_qp_max;
diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.h b/drivers/net/ipn3ke/ipn3ke_ethdev.h
index bfda9d5..566bc76 100644
--- a/drivers/net/ipn3ke/ipn3ke_ethdev.h
+++ b/drivers/net/ipn3ke/ipn3ke_ethdev.h
@@ -245,7 +245,7 @@ struct ipn3ke_rpst {
struct rte_eth_link ori_linfo;
struct ipn3ke_tm_internals tm;
/**< Private data store of assocaiated physical function */
- struct ether_addr mac_addr;
+ struct rte_ether_addr mac_addr;
};
/* UUID IDs */
@@ -545,7 +545,7 @@ void
ipn3ke_rpst_allmulticast_disable(struct rte_eth_dev *ethdev);
int
ipn3ke_rpst_mac_addr_set(struct rte_eth_dev *ethdev,
- struct ether_addr *mac_addr);
+ struct rte_ether_addr *mac_addr);
int
ipn3ke_rpst_mtu_set(struct rte_eth_dev *ethdev, uint16_t mtu);
diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c
index cf3b214..aee2aac 100644
--- a/drivers/net/ipn3ke/ipn3ke_representor.c
+++ b/drivers/net/ipn3ke/ipn3ke_representor.c
@@ -124,7 +124,7 @@ ipn3ke_rpst_dev_start(struct rte_eth_dev *dev)
snprintf(attr_name, IPN3KE_RAWDEV_ATTR_LEN_MAX, "%s",
"LineSideBaseMAC");
rawdev->dev_ops->attr_get(rawdev, attr_name, &base_mac);
- ether_addr_copy((struct ether_addr *)&base_mac, &rpst->mac_addr);
+ ether_addr_copy((struct rte_ether_addr *)&base_mac, &rpst->mac_addr);
ether_addr_copy(&rpst->mac_addr, &dev->data->mac_addrs[0]);
dev->data->mac_addrs->addr_bytes[ETHER_ADDR_LEN - 1] =
@@ -650,7 +650,7 @@ ipn3ke_rpst_allmulticast_disable(struct rte_eth_dev *ethdev)
int
ipn3ke_rpst_mac_addr_set(struct rte_eth_dev *ethdev,
- struct ether_addr *mac_addr)
+ struct rte_ether_addr *mac_addr)
{
struct ipn3ke_hw *hw = IPN3KE_DEV_PRIVATE_TO_HW(ethdev);
struct ipn3ke_rpst *rpst = IPN3KE_DEV_PRIVATE_TO_RPST(ethdev);
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 2470c89..3ae521a 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -223,11 +223,12 @@ static void ixgbe_dev_interrupt_handler(void *param);
static void ixgbe_dev_interrupt_delayed_handler(void *param);
static void ixgbe_dev_setup_link_alarm_handler(void *param);
-static int ixgbe_add_rar(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
- uint32_t index, uint32_t pool);
+static int ixgbe_add_rar(struct rte_eth_dev *dev,
+ struct rte_ether_addr *mac_addr,
+ uint32_t index, uint32_t pool);
static void ixgbe_remove_rar(struct rte_eth_dev *dev, uint32_t index);
static int ixgbe_set_default_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr);
+ struct rte_ether_addr *mac_addr);
static void ixgbe_dcb_init(struct ixgbe_hw *hw, struct ixgbe_dcb_config *dcb_config);
static bool is_device_supported(struct rte_eth_dev *dev,
struct rte_pci_driver *drv);
@@ -268,7 +269,7 @@ static void ixgbevf_dev_allmulticast_disable(struct rte_eth_dev *dev);
/* For Eth VMDQ APIs support */
static int ixgbe_uc_hash_table_set(struct rte_eth_dev *dev, struct
- ether_addr * mac_addr, uint8_t on);
+ rte_ether_addr * mac_addr, uint8_t on);
static int ixgbe_uc_all_hash_table_set(struct rte_eth_dev *dev, uint8_t on);
static int ixgbe_mirror_rule_set(struct rte_eth_dev *dev,
struct rte_eth_mirror_conf *mirror_conf,
@@ -284,11 +285,11 @@ static void ixgbe_set_ivar_map(struct ixgbe_hw *hw, int8_t direction,
static void ixgbe_configure_msix(struct rte_eth_dev *dev);
static int ixgbevf_add_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr,
+ struct rte_ether_addr *mac_addr,
uint32_t index, uint32_t pool);
static void ixgbevf_remove_mac_addr(struct rte_eth_dev *dev, uint32_t index);
static int ixgbevf_set_default_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr);
+ struct rte_ether_addr *mac_addr);
static int ixgbe_syn_filter_get(struct rte_eth_dev *dev,
struct rte_eth_syn_filter *filter);
static int ixgbe_syn_filter_handle(struct rte_eth_dev *dev,
@@ -315,7 +316,7 @@ static int ixgbe_dev_filter_ctrl(struct rte_eth_dev *dev,
static int ixgbevf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu);
static int ixgbe_dev_set_mc_addr_list(struct rte_eth_dev *dev,
- struct ether_addr *mc_addr_set,
+ struct rte_ether_addr *mc_addr_set,
uint32_t nb_mc_addr);
static int ixgbe_dev_get_dcb_info(struct rte_eth_dev *dev,
struct rte_eth_dcb_info *dcb_info);
@@ -1222,7 +1223,7 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
return -ENOMEM;
}
/* Copy the permanent MAC address */
- ether_addr_copy((struct ether_addr *) hw->mac.perm_addr,
+ ether_addr_copy((struct rte_ether_addr *)hw->mac.perm_addr,
&eth_dev->data->mac_addrs[0]);
/* Allocate memory for storing hash filter MAC addresses */
@@ -1533,7 +1534,7 @@ ixgbevf_negotiate_api(struct ixgbe_hw *hw)
}
static void
-generate_random_mac_addr(struct ether_addr *mac_addr)
+generate_random_mac_addr(struct rte_ether_addr *mac_addr)
{
uint64_t random;
@@ -1564,7 +1565,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
IXGBE_DEV_PRIVATE_TO_VFTA(eth_dev->data->dev_private);
struct ixgbe_hwstrip *hwstrip =
IXGBE_DEV_PRIVATE_TO_HWSTRIP_BITMAP(eth_dev->data->dev_private);
- struct ether_addr *perm_addr = (struct ether_addr *) hw->mac.perm_addr;
+ struct rte_ether_addr *perm_addr =
+ (struct rte_ether_addr *)hw->mac.perm_addr;
PMD_INIT_FUNC_TRACE();
@@ -4901,7 +4903,7 @@ ixgbe_dev_rss_reta_query(struct rte_eth_dev *dev,
}
static int
-ixgbe_add_rar(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
+ixgbe_add_rar(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
uint32_t index, uint32_t pool)
{
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -4920,7 +4922,7 @@ ixgbe_remove_rar(struct rte_eth_dev *dev, uint32_t index)
}
static int
-ixgbe_set_default_mac_addr(struct rte_eth_dev *dev, struct ether_addr *addr)
+ixgbe_set_default_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *addr)
{
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
@@ -5370,7 +5372,7 @@ ixgbe_vt_check(struct ixgbe_hw *hw)
}
static uint32_t
-ixgbe_uta_vector(struct ixgbe_hw *hw, struct ether_addr *uc_addr)
+ixgbe_uta_vector(struct ixgbe_hw *hw, struct rte_ether_addr *uc_addr)
{
uint32_t vector = 0;
@@ -5401,8 +5403,8 @@ ixgbe_uta_vector(struct ixgbe_hw *hw, struct ether_addr *uc_addr)
}
static int
-ixgbe_uc_hash_table_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
- uint8_t on)
+ixgbe_uc_hash_table_set(struct rte_eth_dev *dev,
+ struct rte_ether_addr *mac_addr, uint8_t on)
{
uint32_t vector;
uint32_t uta_idx;
@@ -6033,7 +6035,7 @@ ixgbe_set_queue_rate_limit(struct rte_eth_dev *dev,
}
static int
-ixgbevf_add_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
+ixgbevf_add_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
__attribute__((unused)) uint32_t index,
__attribute__((unused)) uint32_t pool)
{
@@ -6045,7 +6047,8 @@ ixgbevf_add_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
* operation. Trap this case to avoid exhausting the [very limited]
* set of PF resources used to store VF MAC addresses.
*/
- if (memcmp(hw->mac.perm_addr, mac_addr, sizeof(struct ether_addr)) == 0)
+ if (memcmp(hw->mac.perm_addr, mac_addr,
+ sizeof(struct rte_ether_addr)) == 0)
return -1;
diag = ixgbevf_set_uc_addr_vf(hw, 2, mac_addr->addr_bytes);
if (diag != 0)
@@ -6065,8 +6068,9 @@ static void
ixgbevf_remove_mac_addr(struct rte_eth_dev *dev, uint32_t index)
{
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- struct ether_addr *perm_addr = (struct ether_addr *) hw->mac.perm_addr;
- struct ether_addr *mac_addr;
+ struct rte_ether_addr *perm_addr =
+ (struct rte_ether_addr *)hw->mac.perm_addr;
+ struct rte_ether_addr *mac_addr;
uint32_t i;
int diag;
@@ -6091,7 +6095,8 @@ ixgbevf_remove_mac_addr(struct rte_eth_dev *dev, uint32_t index)
if (is_zero_ether_addr(mac_addr))
continue;
/* Skip the permanent MAC address */
- if (memcmp(perm_addr, mac_addr, sizeof(struct ether_addr)) == 0)
+ if (memcmp(perm_addr, mac_addr,
+ sizeof(struct rte_ether_addr)) == 0)
continue;
diag = ixgbevf_set_uc_addr_vf(hw, 2, mac_addr->addr_bytes);
if (diag != 0)
@@ -6110,7 +6115,8 @@ ixgbevf_remove_mac_addr(struct rte_eth_dev *dev, uint32_t index)
}
static int
-ixgbevf_set_default_mac_addr(struct rte_eth_dev *dev, struct ether_addr *addr)
+ixgbevf_set_default_mac_addr(struct rte_eth_dev *dev,
+ struct rte_ether_addr *addr)
{
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -6839,13 +6845,13 @@ ixgbe_dev_addr_list_itr(__attribute__((unused)) struct ixgbe_hw *hw,
*vmdq = 0;
mc_addr = *mc_addr_ptr;
- *mc_addr_ptr = (mc_addr + sizeof(struct ether_addr));
+ *mc_addr_ptr = (mc_addr + sizeof(struct rte_ether_addr));
return mc_addr;
}
static int
ixgbe_dev_set_mc_addr_list(struct rte_eth_dev *dev,
- struct ether_addr *mc_addr_set,
+ struct rte_ether_addr *mc_addr_set,
uint32_t nb_mc_addr)
{
struct ixgbe_hw *hw;
diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index fafff6b..6180c94 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -463,7 +463,7 @@ ixgbe_vf_set_mac_addr(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
int rar_entry = hw->mac.num_rar_entries - (vf + 1);
uint8_t *new_mac = (uint8_t *)(&msgbuf[1]);
- if (is_valid_assigned_ether_addr((struct ether_addr *)new_mac)) {
+ if (is_valid_assigned_ether_addr((struct rte_ether_addr *)new_mac)) {
rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac, 6);
return hw->mac.ops.set_rar(hw, rar_entry, new_mac, vf, IXGBE_RAH_AV);
}
diff --git a/drivers/net/ixgbe/ixgbe_vf_representor.c b/drivers/net/ixgbe/ixgbe_vf_representor.c
index 5d2e3e0..2c01f6e 100644
--- a/drivers/net/ixgbe/ixgbe_vf_representor.c
+++ b/drivers/net/ixgbe/ixgbe_vf_representor.c
@@ -25,7 +25,7 @@ ixgbe_vf_representor_link_update(struct rte_eth_dev *ethdev,
static int
ixgbe_vf_representor_mac_addr_set(struct rte_eth_dev *ethdev,
- struct ether_addr *mac_addr)
+ struct rte_ether_addr *mac_addr)
{
struct ixgbe_vf_representor *representor = ethdev->data->dev_private;
@@ -211,7 +211,7 @@ ixgbe_vf_representor_init(struct rte_eth_dev *ethdev, void *init_params)
vf_data = *IXGBE_DEV_PRIVATE_TO_P_VFDATA(
representor->pf_ethdev->data->dev_private);
- ethdev->data->mac_addrs = (struct ether_addr *)
+ ethdev->data->mac_addrs = (struct rte_ether_addr *)
vf_data[representor->vf_id].vf_mac_addresses;
/* Link state. Inherited from PF */
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c b/drivers/net/ixgbe/rte_pmd_ixgbe.c
index 3a874f9..3defba1 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.c
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c
@@ -11,7 +11,7 @@
int
rte_pmd_ixgbe_set_vf_mac_addr(uint16_t port, uint16_t vf,
- struct ether_addr *mac_addr)
+ struct rte_ether_addr *mac_addr)
{
struct ixgbe_hw *hw;
struct ixgbe_vf_info *vfinfo;
@@ -35,7 +35,7 @@ rte_pmd_ixgbe_set_vf_mac_addr(uint16_t port, uint16_t vf,
vfinfo = *(IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private));
rar_entry = hw->mac.num_rar_entries - (vf + 1);
- if (is_valid_assigned_ether_addr((struct ether_addr *)new_mac)) {
+ if (is_valid_assigned_ether_addr((struct rte_ether_addr *)new_mac)) {
rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac,
ETHER_ADDR_LEN);
return hw->mac.ops.set_rar(hw, rar_entry, new_mac, vf,
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h b/drivers/net/ixgbe/rte_pmd_ixgbe.h
index 72a941f..84c6884 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
@@ -42,7 +42,7 @@ int rte_pmd_ixgbe_ping_vf(uint16_t port, uint16_t vf);
* - (-EINVAL) if *vf* or *mac_addr* is invalid.
*/
int rte_pmd_ixgbe_set_vf_mac_addr(uint16_t port, uint16_t vf,
- struct ether_addr *mac_addr);
+ struct rte_ether_addr *mac_addr);
/**
* Enable/Disable VF VLAN anti spoofing.
diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index 1f232e4..180cfd6 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -54,7 +54,7 @@ struct pmd_internals {
int stop_thread;
int no_request_thread;
- struct ether_addr eth_addr;
+ struct rte_ether_addr eth_addr;
struct pmd_queue rx_queues[KNI_MAX_QUEUE_PER_PORT];
struct pmd_queue tx_queues[KNI_MAX_QUEUE_PER_PORT];
diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c
index c9cabd6..de234e9 100644
--- a/drivers/net/liquidio/lio_ethdev.c
+++ b/drivers/net/liquidio/lio_ethdev.c
@@ -1835,7 +1835,8 @@ lio_dev_configure(struct rte_eth_dev *eth_dev)
2 + i));
/* Copy the permanent MAC address */
- ether_addr_copy((struct ether_addr *)mac, &eth_dev->data->mac_addrs[0]);
+ ether_addr_copy((struct rte_ether_addr *)mac,
+ &eth_dev->data->mac_addrs[0]);
/* enable firmware checksum support for tunnel packets */
lio_enable_hw_tunnel_rx_checksum(eth_dev);
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index fe559c0..460c10f 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -841,7 +841,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
struct ibv_pd *pd = NULL;
struct mlx4_priv *priv = NULL;
struct rte_eth_dev *eth_dev = NULL;
- struct ether_addr mac;
+ struct rte_ether_addr mac;
char name[RTE_ETH_NAME_MAX_LEN];
/* If port is not enabled, skip. */
diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h
index e2d184f..4e9bb9c 100644
--- a/drivers/net/mlx4/mlx4.h
+++ b/drivers/net/mlx4/mlx4.h
@@ -186,7 +186,7 @@ struct mlx4_priv {
} mr;
LIST_HEAD(, mlx4_rss) rss; /**< Shared targets for Rx flow rules. */
LIST_HEAD(, rte_flow) flows; /**< Configured flow rule handles. */
- struct ether_addr mac[MLX4_MAX_MAC_ADDRESSES];
+ struct rte_ether_addr mac[MLX4_MAX_MAC_ADDRESSES];
/**< Configured MAC addresses. Unused entries are zeroed. */
uint32_t mac_mc; /**< Number of trailing multicast entries in mac[]. */
struct mlx4_verbs_alloc_ctx verbs_alloc_ctx;
@@ -209,10 +209,10 @@ void mlx4_promiscuous_disable(struct rte_eth_dev *dev);
void mlx4_allmulticast_enable(struct rte_eth_dev *dev);
void mlx4_allmulticast_disable(struct rte_eth_dev *dev);
void mlx4_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index);
-int mlx4_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
+int mlx4_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
uint32_t index, uint32_t vmdq);
-int mlx4_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr);
-int mlx4_set_mc_addr_list(struct rte_eth_dev *dev, struct ether_addr *list,
+int mlx4_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr);
+int mlx4_set_mc_addr_list(struct rte_eth_dev *dev, struct rte_ether_addr *list,
uint32_t num);
int mlx4_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on);
int mlx4_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats);
diff --git a/drivers/net/mlx4/mlx4_ethdev.c b/drivers/net/mlx4/mlx4_ethdev.c
index 765affc..6995c14 100644
--- a/drivers/net/mlx4/mlx4_ethdev.c
+++ b/drivers/net/mlx4/mlx4_ethdev.c
@@ -463,7 +463,7 @@ mlx4_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
* 0 on success, negative errno value otherwise and rte_errno is set.
*/
int
-mlx4_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
+mlx4_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
uint32_t index, uint32_t vmdq)
{
struct mlx4_priv *priv = dev->data->dev_private;
@@ -501,7 +501,7 @@ mlx4_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
* 0 on success, negative errno value otherwise and rte_errno is set.
*/
int
-mlx4_set_mc_addr_list(struct rte_eth_dev *dev, struct ether_addr *list,
+mlx4_set_mc_addr_list(struct rte_eth_dev *dev, struct rte_ether_addr *list,
uint32_t num)
{
struct mlx4_priv *priv = dev->data->dev_private;
@@ -598,7 +598,7 @@ mlx4_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
* 0 on success, negative errno value otherwise and rte_errno is set.
*/
int
-mlx4_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
+mlx4_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
{
return mlx4_mac_addr_add(dev, mac_addr, 0, 0);
}
diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c
index 1dcdb31..78bd452 100644
--- a/drivers/net/mlx4/mlx4_flow.c
+++ b/drivers/net/mlx4/mlx4_flow.c
@@ -1354,7 +1354,7 @@ mlx4_flow_internal(struct mlx4_priv *priv, struct rte_flow_error *error)
.type = RTE_FLOW_ACTION_TYPE_END,
},
};
- struct ether_addr *rule_mac = &eth_spec.dst;
+ struct rte_ether_addr *rule_mac = &eth_spec.dst;
rte_be16_t *rule_vlan =
(ETH_DEV(priv)->data->dev_conf.rxmode.offloads &
DEV_RX_OFFLOAD_VLAN_FILTER) &&
@@ -1391,7 +1391,7 @@ next_vlan:
}
}
for (i = 0; i != RTE_DIM(priv->mac) + 1; ++i) {
- const struct ether_addr *mac;
+ const struct rte_ether_addr *mac;
/* Broadcasts are handled by an extra iteration. */
if (i < RTE_DIM(priv->mac))
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 9f5ec97..2798e0e 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1087,7 +1087,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
unsigned int mprq_max_stride_size_n = 0;
unsigned int mprq_min_stride_num_n = 0;
unsigned int mprq_max_stride_num_n = 0;
- struct ether_addr mac;
+ struct rte_ether_addr mac;
char name[RTE_ETH_NAME_MAX_LEN];
int own_domain_id = 0;
uint16_t port_id;
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 3eaaafd..80df971 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -327,7 +327,7 @@ struct mlx5_priv {
struct rte_eth_dev_data *dev_data; /* Pointer to device data. */
struct mlx5_ibv_shared *sh; /* Shared IB device context. */
uint32_t ibv_port; /* IB device port number. */
- struct ether_addr mac[MLX5_MAX_MAC_ADDRESSES]; /* MAC addresses. */
+ struct rte_ether_addr mac[MLX5_MAX_MAC_ADDRESSES]; /* MAC addresses. */
BITFIELD_DECLARE(mac_own, uint64_t, MLX5_MAX_MAC_ADDRESSES);
/* Bit-field of MAC addresses owned by the PMD. */
uint16_t vlan_filter[MLX5_MAX_VLAN_IDS]; /* VLAN filters table. */
@@ -442,11 +442,12 @@ void mlx5_translate_port_name(const char *port_name_in,
int mlx5_get_mac(struct rte_eth_dev *dev, uint8_t (*mac)[ETHER_ADDR_LEN]);
void mlx5_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index);
-int mlx5_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac,
+int mlx5_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac,
uint32_t index, uint32_t vmdq);
-int mlx5_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr);
+int mlx5_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr);
int mlx5_set_mc_addr_list(struct rte_eth_dev *dev,
- struct ether_addr *mc_addr_set, uint32_t nb_mc_addr);
+ struct rte_ether_addr *mc_addr_set,
+ uint32_t nb_mc_addr);
/* mlx5_rss.c */
@@ -549,9 +550,9 @@ void mlx5_mp_uninit_secondary(void);
/* mlx5_nl.c */
int mlx5_nl_init(int protocol);
-int mlx5_nl_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac,
+int mlx5_nl_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac,
uint32_t index);
-int mlx5_nl_mac_addr_remove(struct rte_eth_dev *dev, struct ether_addr *mac,
+int mlx5_nl_mac_addr_remove(struct rte_eth_dev *dev, struct rte_ether_addr *mac,
uint32_t index);
void mlx5_nl_mac_addr_sync(struct rte_eth_dev *dev);
void mlx5_nl_mac_addr_flush(struct rte_eth_dev *dev);
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index cf255ca..e8560fd 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1211,13 +1211,13 @@ static int
flow_dv_convert_encap_data(const struct rte_flow_item *items, uint8_t *buf,
size_t *size, struct rte_flow_error *error)
{
- struct ether_hdr *eth = NULL;
- struct vlan_hdr *vlan = NULL;
+ struct rte_ether_hdr *eth = NULL;
+ struct rte_vlan_hdr *vlan = NULL;
struct ipv4_hdr *ipv4 = NULL;
struct ipv6_hdr *ipv6 = NULL;
struct udp_hdr *udp = NULL;
- struct vxlan_hdr *vxlan = NULL;
- struct vxlan_gpe_hdr *vxlan_gpe = NULL;
+ struct rte_vxlan_hdr *vxlan = NULL;
+ struct rte_vxlan_gpe_hdr *vxlan_gpe = NULL;
struct gre_hdr *gre = NULL;
size_t len;
size_t temp_size = 0;
@@ -1237,10 +1237,10 @@ flow_dv_convert_encap_data(const struct rte_flow_item *items, uint8_t *buf,
rte_memcpy((void *)&buf[temp_size], items->spec, len);
switch (items->type) {
case RTE_FLOW_ITEM_TYPE_ETH:
- eth = (struct ether_hdr *)&buf[temp_size];
+ eth = (struct rte_ether_hdr *)&buf[temp_size];
break;
case RTE_FLOW_ITEM_TYPE_VLAN:
- vlan = (struct vlan_hdr *)&buf[temp_size];
+ vlan = (struct rte_vlan_hdr *)&buf[temp_size];
if (!eth)
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
@@ -1298,7 +1298,7 @@ flow_dv_convert_encap_data(const struct rte_flow_item *items, uint8_t *buf,
ipv6->proto = IPPROTO_UDP;
break;
case RTE_FLOW_ITEM_TYPE_VXLAN:
- vxlan = (struct vxlan_hdr *)&buf[temp_size];
+ vxlan = (struct rte_vxlan_hdr *)&buf[temp_size];
if (!udp)
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
@@ -1311,7 +1311,7 @@ flow_dv_convert_encap_data(const struct rte_flow_item *items, uint8_t *buf,
RTE_BE32(MLX5_ENCAP_VXLAN_FLAGS);
break;
case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
- vxlan_gpe = (struct vxlan_gpe_hdr *)&buf[temp_size];
+ vxlan_gpe = (struct rte_vxlan_gpe_hdr *)&buf[temp_size];
if (!udp)
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ACTION,
diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c b/drivers/net/mlx5/mlx5_flow_tcf.c
index fc04c9d..789748d 100644
--- a/drivers/net/mlx5/mlx5_flow_tcf.c
+++ b/drivers/net/mlx5/mlx5_flow_tcf.c
@@ -402,7 +402,7 @@ struct mlx5_flow_tcf_context {
struct tcf_neigh_rule {
LIST_ENTRY(tcf_neigh_rule) next;
uint32_t refcnt;
- struct ether_addr eth;
+ struct rte_ether_addr eth;
uint16_t mask;
union {
struct {
@@ -475,8 +475,8 @@ struct flow_tcf_vxlan_encap {
uint8_t ip_tos;
uint8_t ip_ttl_hop;
struct {
- struct ether_addr dst;
- struct ether_addr src;
+ struct rte_ether_addr dst;
+ struct rte_ether_addr src;
} eth;
union {
struct {
@@ -689,8 +689,8 @@ flow_tcf_pedit_key_set_mac(const struct rte_flow_action *actions,
{
int idx = p_parser->sel.nkeys;
uint32_t off = actions->type == RTE_FLOW_ACTION_TYPE_SET_MAC_SRC ?
- offsetof(struct ether_hdr, s_addr) :
- offsetof(struct ether_hdr, d_addr);
+ offsetof(struct rte_ether_hdr, s_addr) :
+ offsetof(struct rte_ether_hdr, d_addr);
const struct rte_flow_action_set_mac *conf =
(const struct rte_flow_action_set_mac *)actions->conf;
diff --git a/drivers/net/mlx5/mlx5_mac.c b/drivers/net/mlx5/mlx5_mac.c
index bce026f..9f6b89a 100644
--- a/drivers/net/mlx5/mlx5_mac.c
+++ b/drivers/net/mlx5/mlx5_mac.c
@@ -76,7 +76,7 @@ mlx5_internal_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
if (vf)
mlx5_nl_mac_addr_remove(dev, &dev->data->mac_addrs[index],
index);
- memset(&dev->data->mac_addrs[index], 0, sizeof(struct ether_addr));
+ memset(&dev->data->mac_addrs[index], 0, sizeof(struct rte_ether_addr));
}
/**
@@ -93,7 +93,7 @@ mlx5_internal_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
* 0 on success, a negative errno value otherwise and rte_errno is set.
*/
static int
-mlx5_internal_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac,
+mlx5_internal_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac,
uint32_t index)
{
struct mlx5_priv *priv = dev->data->dev_private;
@@ -166,7 +166,7 @@ mlx5_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
* 0 on success, a negative errno value otherwise and rte_errno is set.
*/
int
-mlx5_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac,
+mlx5_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac,
uint32_t index, uint32_t vmdq __rte_unused)
{
int ret;
@@ -195,7 +195,7 @@ mlx5_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac,
* 0 on success, a negative errno value otherwise and rte_errno is set.
*/
int
-mlx5_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
+mlx5_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
{
DRV_LOG(DEBUG, "port %u setting primary MAC address",
dev->data->port_id);
@@ -209,7 +209,7 @@ mlx5_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
*/
int
mlx5_set_mc_addr_list(struct rte_eth_dev *dev,
- struct ether_addr *mc_addr_set, uint32_t nb_mc_addr)
+ struct rte_ether_addr *mc_addr_set, uint32_t nb_mc_addr)
{
uint32_t i;
int ret;
diff --git a/drivers/net/mlx5/mlx5_nl.c b/drivers/net/mlx5/mlx5_nl.c
index 0ff9667..ce4c937 100644
--- a/drivers/net/mlx5/mlx5_nl.c
+++ b/drivers/net/mlx5/mlx5_nl.c
@@ -80,7 +80,7 @@
/* Add/remove MAC address through Netlink */
struct mlx5_nl_mac_addr {
- struct ether_addr (*mac)[];
+ struct rte_ether_addr (*mac)[];
/**< MAC address handled by the device. */
int mac_n; /**< Number of addresses in the array. */
};
@@ -365,7 +365,7 @@ mlx5_nl_mac_addr_cb(struct nlmsghdr *nh, void *arg)
* 0 on success, a negative errno value otherwise and rte_errno is set.
*/
static int
-mlx5_nl_mac_addr_list(struct rte_eth_dev *dev, struct ether_addr (*mac)[],
+mlx5_nl_mac_addr_list(struct rte_eth_dev *dev, struct rte_ether_addr (*mac)[],
int *mac_n)
{
struct mlx5_priv *priv = dev->data->dev_private;
@@ -424,7 +424,7 @@ error:
* 0 on success, a negative errno value otherwise and rte_errno is set.
*/
static int
-mlx5_nl_mac_addr_modify(struct rte_eth_dev *dev, struct ether_addr *mac,
+mlx5_nl_mac_addr_modify(struct rte_eth_dev *dev, struct rte_ether_addr *mac,
int add)
{
struct mlx5_priv *priv = dev->data->dev_private;
@@ -496,7 +496,7 @@ error:
* 0 on success, a negative errno value otherwise and rte_errno is set.
*/
int
-mlx5_nl_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac,
+mlx5_nl_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac,
uint32_t index)
{
struct mlx5_priv *priv = dev->data->dev_private;
@@ -524,7 +524,7 @@ mlx5_nl_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac,
* 0 on success, a negative errno value otherwise and rte_errno is set.
*/
int
-mlx5_nl_mac_addr_remove(struct rte_eth_dev *dev, struct ether_addr *mac,
+mlx5_nl_mac_addr_remove(struct rte_eth_dev *dev, struct rte_ether_addr *mac,
uint32_t index)
{
struct mlx5_priv *priv = dev->data->dev_private;
@@ -542,7 +542,7 @@ mlx5_nl_mac_addr_remove(struct rte_eth_dev *dev, struct ether_addr *mac,
void
mlx5_nl_mac_addr_sync(struct rte_eth_dev *dev)
{
- struct ether_addr macs[MLX5_MAX_MAC_ADDRESSES];
+ struct rte_ether_addr macs[MLX5_MAX_MAC_ADDRESSES];
int macs_n = 0;
int i;
int ret;
@@ -583,7 +583,7 @@ mlx5_nl_mac_addr_flush(struct rte_eth_dev *dev)
int i;
for (i = MLX5_MAX_MAC_ADDRESSES - 1; i >= 0; --i) {
- struct ether_addr *m = &dev->data->mac_addrs[i];
+ struct rte_ether_addr *m = &dev->data->mac_addrs[i];
if (BITFIELD_ISSET(priv->mac_own, i))
mlx5_nl_mac_addr_remove(dev, m, i);
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 4339aaf..2676634 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -784,7 +784,7 @@ txq_mbuf_to_swp(struct mlx5_txq_data *txq, struct rte_mbuf *buf,
* in if any of SWP offsets is set. Therefore, all of the L3 offsets
* should be set regardless of HW offload.
*/
- off = buf->outer_l2_len + (vlan ? sizeof(struct vlan_hdr) : 0);
+ off = buf->outer_l2_len + (vlan ? sizeof(struct rte_vlan_hdr) : 0);
offsets[1] = off >> 1; /* Outer L3 offset. */
off += buf->outer_l3_len;
if (tunnel == PKT_TX_TUNNEL_UDP)
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index b7fde35..69681e2 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -268,7 +268,7 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
.dst.addr_bytes = "\xff\xff\xff\xff\xff\xff",
};
const unsigned int vlan_filter_n = priv->vlan_filter_n;
- const struct ether_addr cmp = {
+ const struct rte_ether_addr cmp = {
.addr_bytes = "\x00\x00\x00\x00\x00\x00",
};
unsigned int i;
@@ -331,7 +331,7 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
}
/* Add MAC address flows. */
for (i = 0; i != MLX5_MAX_MAC_ADDRESSES; ++i) {
- struct ether_addr *mac = &dev->data->mac_addrs[i];
+ struct rte_ether_addr *mac = &dev->data->mac_addrs[i];
if (!memcmp(mac, &cmp, sizeof(*mac)))
continue;
diff --git a/drivers/net/mvneta/mvneta_ethdev.c b/drivers/net/mvneta/mvneta_ethdev.c
index 8923a16..d539ba6 100644
--- a/drivers/net/mvneta/mvneta_ethdev.c
+++ b/drivers/net/mvneta/mvneta_ethdev.c
@@ -617,7 +617,7 @@ mvneta_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
* 0 on success, negative error value otherwise.
*/
static int
-mvneta_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
+mvneta_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
uint32_t index, uint32_t vmdq __rte_unused)
{
struct mvneta_priv *priv = dev->data->dev_private;
@@ -650,7 +650,7 @@ mvneta_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
* MAC address to register.
*/
static int
-mvneta_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
+mvneta_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
{
struct mvneta_priv *priv = dev->data->dev_private;
int ret;
diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c
index ce52f09..8647c9b 100644
--- a/drivers/net/mvpp2/mrvl_ethdev.c
+++ b/drivers/net/mvpp2/mrvl_ethdev.c
@@ -1102,7 +1102,7 @@ mrvl_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
* 0 on success, negative error value otherwise.
*/
static int
-mrvl_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
+mrvl_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
uint32_t index, uint32_t vmdq __rte_unused)
{
struct mrvl_priv *priv = dev->data->dev_private;
@@ -1154,7 +1154,7 @@ mrvl_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
* 0 on success, negative error value otherwise.
*/
static int
-mrvl_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
+mrvl_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
{
struct mrvl_priv *priv = dev->data->dev_private;
int ret;
diff --git a/drivers/net/mvpp2/mrvl_flow.c b/drivers/net/mvpp2/mrvl_flow.c
index ffd1dab..7389865 100644
--- a/drivers/net/mvpp2/mrvl_flow.c
+++ b/drivers/net/mvpp2/mrvl_flow.c
@@ -989,7 +989,7 @@ mrvl_parse_eth(const struct rte_flow_item *item, struct rte_flow *flow,
struct rte_flow_error *error)
{
const struct rte_flow_item_eth *spec = NULL, *mask = NULL;
- struct ether_addr zero;
+ struct rte_ether_addr zero;
int ret;
ret = mrvl_parse_init(item, (const void **)&spec, (const void **)&mask,
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 553cb06..35503df 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -292,7 +292,7 @@ hn_dev_allmulticast_disable(struct rte_eth_dev *dev)
static int
hn_dev_mc_addr_list(struct rte_eth_dev *dev,
- struct ether_addr *mc_addr_set,
+ struct rte_ether_addr *mc_addr_set,
uint32_t nb_mc_addr)
{
/* No filtering on the synthetic path, but can do it on VF */
diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 7d7b557..a5850c2 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -108,7 +108,7 @@ static void
hn_update_packet_stats(struct hn_stats *stats, const struct rte_mbuf *m)
{
uint32_t s = m->pkt_len;
- const struct ether_addr *ea;
+ const struct rte_ether_addr *ea;
if (s == 64) {
stats->size_bins[1]++;
@@ -127,7 +127,7 @@ hn_update_packet_stats(struct hn_stats *stats, const struct rte_mbuf *m)
stats->size_bins[7]++;
}
- ea = rte_pktmbuf_mtod(m, const struct ether_addr *);
+ ea = rte_pktmbuf_mtod(m, const struct rte_ether_addr *);
if (is_multicast_ether_addr(ea)) {
if (is_broadcast_ether_addr(ea))
stats->broadcast++;
diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h
index de885d8..bf94d90 100644
--- a/drivers/net/netvsc/hn_var.h
+++ b/drivers/net/netvsc/hn_var.h
@@ -131,7 +131,7 @@ struct hn_data {
rte_atomic32_t rndis_req_id;
uint8_t rndis_resp[256];
- struct ether_addr mac_addr;
+ struct rte_ether_addr mac_addr;
struct rte_eth_dev_owner owner;
struct rte_intr_handle vf_intr;
@@ -213,7 +213,7 @@ void hn_vf_allmulticast_disable(struct rte_eth_dev *dev);
void hn_vf_promiscuous_enable(struct rte_eth_dev *dev);
void hn_vf_promiscuous_disable(struct rte_eth_dev *dev);
int hn_vf_mc_addr_list(struct rte_eth_dev *dev,
- struct ether_addr *mc_addr_set,
+ struct rte_ether_addr *mc_addr_set,
uint32_t nb_mc_addr);
int hn_vf_link_update(struct rte_eth_dev *dev,
diff --git a/drivers/net/netvsc/hn_vf.c b/drivers/net/netvsc/hn_vf.c
index b980bb8..f1be7e2 100644
--- a/drivers/net/netvsc/hn_vf.c
+++ b/drivers/net/netvsc/hn_vf.c
@@ -32,12 +32,12 @@
/* Search for VF with matching MAC address, return port id */
static int hn_vf_match(const struct rte_eth_dev *dev)
{
- const struct ether_addr *mac = dev->data->mac_addrs;
+ const struct rte_ether_addr *mac = dev->data->mac_addrs;
int i;
RTE_ETH_FOREACH_DEV(i) {
const struct rte_eth_dev *vf_dev = &rte_eth_devices[i];
- const struct ether_addr *vf_mac = vf_dev->data->mac_addrs;
+ const struct rte_ether_addr *vf_mac = vf_dev->data->mac_addrs;
if (vf_dev == dev)
continue;
@@ -400,7 +400,7 @@ void hn_vf_promiscuous_disable(struct rte_eth_dev *dev)
}
int hn_vf_mc_addr_list(struct rte_eth_dev *dev,
- struct ether_addr *mc_addr_set,
+ struct rte_ether_addr *mc_addr_set,
uint32_t nb_mc_addr)
{
struct hn_data *hv = dev->data->dev_private;
diff --git a/drivers/net/nfb/nfb_ethdev.c b/drivers/net/nfb/nfb_ethdev.c
index be7cced..679af6e 100644
--- a/drivers/net/nfb/nfb_ethdev.c
+++ b/drivers/net/nfb/nfb_ethdev.c
@@ -20,7 +20,7 @@
/**
* Default MAC addr
*/
-static const struct ether_addr eth_addr = {
+static const struct rte_ether_addr eth_addr = {
.addr_bytes = { 0x00, 0x11, 0x17, 0x00, 0x00, 0x00 }
};
@@ -352,7 +352,7 @@ nfb_eth_dev_set_link_down(struct rte_eth_dev *dev)
*/
static int
nfb_eth_mac_addr_set(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr)
+ struct rte_ether_addr *mac_addr)
{
unsigned int i;
uint64_t mac = 0;
@@ -418,7 +418,7 @@ nfb_eth_dev_init(struct rte_eth_dev *dev)
data->dev_private;
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);
struct rte_pci_addr *pci_addr = &pci_dev->addr;
- struct ether_addr eth_addr_init;
+ struct rte_ether_addr eth_addr_init;
RTE_LOG(INFO, PMD, "Initializing NFB device (" PCI_PRI_FMT ")\n",
pci_addr->domain, pci_addr->bus, pci_addr->devid,
@@ -464,7 +464,7 @@ nfb_eth_dev_init(struct rte_eth_dev *dev)
nfb_eth_link_update(dev, 0);
/* Allocate space for one mac address */
- data->mac_addrs = rte_zmalloc(data->name, sizeof(struct ether_addr),
+ data->mac_addrs = rte_zmalloc(data->name, sizeof(struct rte_ether_addr),
RTE_CACHE_LINE_SIZE);
if (data->mac_addrs == NULL) {
RTE_LOG(ERR, PMD, "Could not alloc space for MAC address!\n");
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 9394309..95c2be1 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -119,7 +119,7 @@ static int nfp_net_rss_reta_write(struct rte_eth_dev *dev,
static int nfp_net_rss_hash_write(struct rte_eth_dev *dev,
struct rte_eth_rss_conf *rss_conf);
static int nfp_set_mac_addr(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr);
+ struct rte_ether_addr *mac_addr);
/* The offset of the queue controller queues in the PCIe Target */
#define NFP_PCIE_QUEUE(_q) (0x80000 + (NFP_QCP_QUEUE_ADDR_SZ * ((_q) & 0xff)))
@@ -553,7 +553,7 @@ nfp_net_write_mac(struct nfp_net_hw *hw, uint8_t *mac)
}
int
-nfp_set_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
+nfp_set_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
{
struct nfp_net_hw *hw;
uint32_t update, ctrl;
@@ -2962,7 +2962,8 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
nfp_net_vf_read_mac(hw);
}
- if (!is_valid_assigned_ether_addr((struct ether_addr *)&hw->mac_addr)) {
+ if (!is_valid_assigned_ether_addr(
+ (struct rte_ether_addr *)&hw->mac_addr)) {
PMD_INIT_LOG(INFO, "Using random mac address for port %d",
port);
/* Using random mac addresses for VFs */
@@ -2971,7 +2972,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
}
/* Copying mac address to DPDK eth_dev struct */
- ether_addr_copy((struct ether_addr *)hw->mac_addr,
+ ether_addr_copy((struct rte_ether_addr *)hw->mac_addr,
&eth_dev->data->mac_addrs[0]);
if (!(hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR))
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 159c1c1..7683511 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -73,7 +73,7 @@ struct pmd_internals {
struct null_queue rx_null_queues[RTE_MAX_QUEUES_PER_PORT];
struct null_queue tx_null_queues[RTE_MAX_QUEUES_PER_PORT];
- struct ether_addr eth_addr;
+ struct rte_ether_addr eth_addr;
/** Bit mask of RSS offloads, the bit offset also means flow type */
uint64_t flow_type_rss_offloads;
@@ -467,7 +467,7 @@ eth_rss_hash_conf_get(struct rte_eth_dev *dev,
static int
eth_mac_address_set(__rte_unused struct rte_eth_dev *dev,
- __rte_unused struct ether_addr *addr)
+ __rte_unused struct rte_ether_addr *addr)
{
return 0;
}
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 046e129..6434792 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -555,7 +555,7 @@ octeontx_dev_stats_reset(struct rte_eth_dev *dev)
static int
octeontx_dev_default_mac_addr_set(struct rte_eth_dev *dev,
- struct ether_addr *addr)
+ struct rte_ether_addr *addr)
{
struct octeontx_nic *nic = octeontx_pmd_priv(dev);
int ret;
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 353538f..7655b3a 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -78,7 +78,7 @@ struct pmd_internals {
struct pcap_rx_queue rx_queue[RTE_PMD_PCAP_MAX_QUEUES];
struct pcap_tx_queue tx_queue[RTE_PMD_PCAP_MAX_QUEUES];
char devargs[ETH_PCAP_ARG_MAXLEN];
- struct ether_addr eth_addr;
+ struct rte_ether_addr eth_addr;
int if_index;
int single_iface;
int phy_mac;
@@ -953,7 +953,7 @@ pmd_init_internals(struct rte_vdev_device *vdev,
* derived from: 'locally administered':'p':'c':'a':'p':'iface_idx'
* where the middle 4 characters are converted to hex.
*/
- (*internals)->eth_addr = (struct ether_addr) {
+ (*internals)->eth_addr = (struct rte_ether_addr) {
.addr_bytes = { 0x02, 0x70, 0x63, 0x61, 0x70, iface_idx++ }
};
(*internals)->phy_mac = 0;
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index b2fd2fd..a72d466 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -559,9 +559,9 @@ qede_ucast_filter(struct rte_eth_dev *eth_dev, struct ecore_filter_ucast *ucast,
struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
struct qede_ucast_entry *tmp = NULL;
struct qede_ucast_entry *u;
- struct ether_addr *mac_addr;
+ struct rte_ether_addr *mac_addr;
- mac_addr = (struct ether_addr *)ucast->mac;
+ mac_addr = (struct rte_ether_addr *)ucast->mac;
if (add) {
SLIST_FOREACH(tmp, &qdev->uc_list_head, list) {
if ((memcmp(mac_addr, &tmp->mac,
@@ -605,8 +605,9 @@ qede_ucast_filter(struct rte_eth_dev *eth_dev, struct ecore_filter_ucast *ucast,
}
static int
-qede_add_mcast_filters(struct rte_eth_dev *eth_dev, struct ether_addr *mc_addrs,
- uint32_t mc_addrs_num)
+qede_add_mcast_filters(struct rte_eth_dev *eth_dev,
+ struct rte_ether_addr *mc_addrs,
+ uint32_t mc_addrs_num)
{
struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
@@ -629,7 +630,7 @@ qede_add_mcast_filters(struct rte_eth_dev *eth_dev, struct ether_addr *mc_addrs,
mcast.num_mc_addrs = mc_addrs_num;
mcast.opcode = ECORE_FILTER_ADD;
for (i = 0; i < mc_addrs_num; i++)
- ether_addr_copy(&mc_addrs[i], (struct ether_addr *)
+ ether_addr_copy(&mc_addrs[i], (struct rte_ether_addr *)
&mcast.mac[i]);
rc = ecore_filter_mcast_cmd(edev, &mcast, ECORE_SPQ_MODE_CB, NULL);
if (rc != ECORE_SUCCESS) {
@@ -654,7 +655,8 @@ static int qede_del_mcast_filters(struct rte_eth_dev *eth_dev)
mcast.opcode = ECORE_FILTER_REMOVE;
j = 0;
SLIST_FOREACH(tmp, &qdev->mc_list_head, list) {
- ether_addr_copy(&tmp->mac, (struct ether_addr *)&mcast.mac[j]);
+ ether_addr_copy(&tmp->mac,
+ (struct rte_ether_addr *)&mcast.mac[j]);
j++;
}
rc = ecore_filter_mcast_cmd(edev, &mcast, ECORE_SPQ_MODE_CB, NULL);
@@ -701,7 +703,7 @@ qede_mac_int_ops(struct rte_eth_dev *eth_dev, struct ecore_filter_ucast *ucast,
}
static int
-qede_mac_addr_add(struct rte_eth_dev *eth_dev, struct ether_addr *mac_addr,
+qede_mac_addr_add(struct rte_eth_dev *eth_dev, struct rte_ether_addr *mac_addr,
__rte_unused uint32_t index, __rte_unused uint32_t pool)
{
struct ecore_filter_ucast ucast;
@@ -713,7 +715,7 @@ qede_mac_addr_add(struct rte_eth_dev *eth_dev, struct ether_addr *mac_addr,
qede_set_ucast_cmn_params(&ucast);
ucast.opcode = ECORE_FILTER_ADD;
ucast.type = ECORE_FILTER_MAC;
- ether_addr_copy(mac_addr, (struct ether_addr *)&ucast.mac);
+ ether_addr_copy(mac_addr, (struct rte_ether_addr *)&ucast.mac);
re = (int)qede_mac_int_ops(eth_dev, &ucast, 1);
return re;
}
@@ -742,13 +744,13 @@ qede_mac_addr_remove(struct rte_eth_dev *eth_dev, uint32_t index)
/* Use the index maintained by rte */
ether_addr_copy(&eth_dev->data->mac_addrs[index],
- (struct ether_addr *)&ucast.mac);
+ (struct rte_ether_addr *)&ucast.mac);
qede_mac_int_ops(eth_dev, &ucast, false);
}
static int
-qede_mac_addr_set(struct rte_eth_dev *eth_dev, struct ether_addr *mac_addr)
+qede_mac_addr_set(struct rte_eth_dev *eth_dev, struct rte_ether_addr *mac_addr)
{
struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
@@ -1757,8 +1759,9 @@ static void qede_allmulticast_disable(struct rte_eth_dev *eth_dev)
}
static int
-qede_set_mc_addr_list(struct rte_eth_dev *eth_dev, struct ether_addr *mc_addrs,
- uint32_t mc_addrs_num)
+qede_set_mc_addr_list(struct rte_eth_dev *eth_dev,
+ struct rte_ether_addr *mc_addrs,
+ uint32_t mc_addrs_num)
{
struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
@@ -2549,7 +2552,7 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
}
if (!is_vf) {
- ether_addr_copy((struct ether_addr *)edev->hwfns[0].
+ ether_addr_copy((struct rte_ether_addr *)edev->hwfns[0].
hw_info.hw_mac_addr,
&eth_dev->data->mac_addrs[0]);
ether_addr_copy(&eth_dev->data->mac_addrs[0],
@@ -2565,8 +2568,9 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
&is_mac_forced);
if (is_mac_exist) {
DP_INFO(edev, "VF macaddr received from PF\n");
- ether_addr_copy((struct ether_addr *)&vf_mac,
- &eth_dev->data->mac_addrs[0]);
+ ether_addr_copy(
+ (struct rte_ether_addr *)&vf_mac,
+ &eth_dev->data->mac_addrs[0]);
ether_addr_copy(&eth_dev->data->mac_addrs[0],
&adapter->primary_mac);
} else {
diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h
index c06274d..d0e7c70 100644
--- a/drivers/net/qede/qede_ethdev.h
+++ b/drivers/net/qede/qede_ethdev.h
@@ -140,12 +140,12 @@ struct qede_vlan_entry {
};
struct qede_mcast_entry {
- struct ether_addr mac;
+ struct rte_ether_addr mac;
SLIST_ENTRY(qede_mcast_entry) list;
};
struct qede_ucast_entry {
- struct ether_addr mac;
+ struct rte_ether_addr mac;
uint16_t vlan;
uint16_t vni;
SLIST_ENTRY(qede_ucast_entry) list;
@@ -228,7 +228,7 @@ struct qede_dev {
SLIST_HEAD(vlan_list_head, qede_vlan_entry)vlan_list_head;
uint16_t configured_vlans;
bool accept_any_vlan;
- struct ether_addr primary_mac;
+ struct rte_ether_addr primary_mac;
SLIST_HEAD(mc_list_head, qede_mcast_entry) mc_list_head;
uint16_t num_mc_addr;
SLIST_HEAD(uc_list_head, qede_ucast_entry) uc_list_head;
diff --git a/drivers/net/qede/qede_filter.c b/drivers/net/qede/qede_filter.c
index 7aeef70..792b9ef 100644
--- a/drivers/net/qede/qede_filter.c
+++ b/drivers/net/qede/qede_filter.c
@@ -465,8 +465,8 @@ qede_arfs_construct_pkt(struct rte_eth_dev *eth_dev,
raw_pkt = (uint8_t *)buff;
- len = 2 * sizeof(struct ether_addr);
- raw_pkt += 2 * sizeof(struct ether_addr);
+ len = 2 * sizeof(struct rte_ether_addr);
+ raw_pkt += 2 * sizeof(struct rte_ether_addr);
ether_type = (uint16_t *)raw_pkt;
raw_pkt += sizeof(uint16_t);
len += sizeof(uint16_t);
diff --git a/drivers/net/qede/qede_if.h b/drivers/net/qede/qede_if.h
index ee5e54c..b840c74 100644
--- a/drivers/net/qede/qede_if.h
+++ b/drivers/net/qede/qede_if.h
@@ -59,7 +59,7 @@ struct qed_dev_eth_info {
uint8_t num_queues;
uint8_t num_tc;
- struct ether_addr port_mac;
+ struct rte_ether_addr port_mac;
uint16_t num_vlan_filters;
uint32_t num_mac_filters;
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index 27bac09..0e8a367 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -950,23 +950,23 @@ static inline uint8_t qede_check_notunn_csum_l4(uint16_t flag)
static inline uint32_t qede_rx_cqe_to_pkt_type_outer(struct rte_mbuf *m)
{
uint32_t packet_type = RTE_PTYPE_UNKNOWN;
- struct ether_hdr *eth_hdr;
+ struct rte_ether_hdr *eth_hdr;
struct ipv4_hdr *ipv4_hdr;
struct ipv6_hdr *ipv6_hdr;
- struct vlan_hdr *vlan_hdr;
+ struct rte_vlan_hdr *vlan_hdr;
uint16_t ethertype;
bool vlan_tagged = 0;
uint16_t len;
- eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *);
- len = sizeof(struct ether_hdr);
+ eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
+ len = sizeof(struct rte_ether_hdr);
ethertype = rte_cpu_to_be_16(eth_hdr->ether_type);
/* Note: Valid only if VLAN stripping is disabled */
if (ethertype == ETHER_TYPE_VLAN) {
vlan_tagged = 1;
- vlan_hdr = (struct vlan_hdr *)(eth_hdr + 1);
- len += sizeof(struct vlan_hdr);
+ vlan_hdr = (struct rte_vlan_hdr *)(eth_hdr + 1);
+ len += sizeof(struct rte_vlan_hdr);
ethertype = rte_cpu_to_be_16(vlan_hdr->eth_proto);
}
@@ -1153,7 +1153,7 @@ qede_check_notunn_csum_l3(struct rte_mbuf *m, uint16_t flag)
m->packet_type = qede_rx_cqe_to_pkt_type(flag);
if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) {
ip = rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *,
- sizeof(struct ether_hdr));
+ sizeof(struct rte_ether_hdr));
pkt_csum = ip->hdr_checksum;
ip->hdr_checksum = 0;
calc_csum = rte_ipv4_cksum(ip);
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index ab963a0..cae63a7 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -51,7 +51,7 @@ struct pmd_internals {
struct ring_queue rx_ring_queues[RTE_PMD_RING_MAX_RX_RINGS];
struct ring_queue tx_ring_queues[RTE_PMD_RING_MAX_TX_RINGS];
- struct ether_addr address;
+ struct rte_ether_addr address;
enum dev_action action;
};
@@ -218,7 +218,7 @@ eth_mac_addr_remove(struct rte_eth_dev *dev __rte_unused,
static int
eth_mac_addr_add(struct rte_eth_dev *dev __rte_unused,
- struct ether_addr *mac_addr __rte_unused,
+ struct rte_ether_addr *mac_addr __rte_unused,
uint32_t index __rte_unused,
uint32_t vmdq __rte_unused)
{
diff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h
index ecd20e5..dde25c5 100644
--- a/drivers/net/sfc/sfc.h
+++ b/drivers/net/sfc/sfc.h
@@ -134,7 +134,7 @@ struct sfc_port {
boolean_t promisc;
boolean_t allmulti;
- struct ether_addr default_mac_addr;
+ struct rte_ether_addr default_mac_addr;
unsigned int max_mcast_addrs;
unsigned int nb_mcast_addrs;
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index a007d45..fadcdb5 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -969,12 +969,12 @@ fail_inval:
return -rc;
}
static int
-sfc_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
+sfc_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
{
struct sfc_adapter *sa = sfc_adapter_by_eth_dev(dev);
const efx_nic_cfg_t *encp = efx_nic_cfg_get(sa->nic);
struct sfc_port *port = &sa->port;
- struct ether_addr *old_addr = &dev->data->mac_addrs[0];
+ struct rte_ether_addr *old_addr = &dev->data->mac_addrs[0];
int rc = 0;
sfc_adapter_lock(sa);
@@ -1053,8 +1053,8 @@ unlock:
static int
-sfc_set_mc_addr_list(struct rte_eth_dev *dev, struct ether_addr *mc_addr_set,
- uint32_t nb_mc_addr)
+sfc_set_mc_addr_list(struct rte_eth_dev *dev,
+ struct rte_ether_addr *mc_addr_set, uint32_t nb_mc_addr)
{
struct sfc_adapter *sa = sfc_adapter_by_eth_dev(dev);
struct sfc_port *port = &sa->port;
@@ -2053,7 +2053,7 @@ sfc_eth_dev_init(struct rte_eth_dev *dev)
struct sfc_adapter *sa;
int rc;
const efx_nic_cfg_t *encp;
- const struct ether_addr *from;
+ const struct rte_ether_addr *from;
sfc_register_dp();
@@ -2125,7 +2125,7 @@ sfc_eth_dev_init(struct rte_eth_dev *dev)
* The arguments are really reverse order in comparison to
* Linux kernel. Copy from NIC config to Ethernet device data.
*/
- from = (const struct ether_addr *)(encp->enc_mac_addr);
+ from = (const struct rte_ether_addr *)(encp->enc_mac_addr);
ether_addr_copy(from, &dev->data->mac_addrs[0]);
sfc_adapter_unlock(sa);
diff --git a/drivers/net/sfc/sfc_port.c b/drivers/net/sfc/sfc_port.c
index 1709dba..8de5f0c 100644
--- a/drivers/net/sfc/sfc_port.c
+++ b/drivers/net/sfc/sfc_port.c
@@ -227,7 +227,7 @@ sfc_port_start(struct sfc_adapter *sa)
goto fail_mac_pdu_set;
if (!sfc_sa2shared(sa)->isolated) {
- struct ether_addr *addr = &port->default_mac_addr;
+ struct rte_ether_addr *addr = &port->default_mac_addr;
sfc_log_init(sa, "set MAC address");
rc = efx_mac_addr_set(sa->nic, addr->addr_bytes);
@@ -386,7 +386,7 @@ sfc_port_attach(struct sfc_adapter *sa)
{
struct sfc_port *port = &sa->port;
const efx_nic_cfg_t *encp = efx_nic_cfg_get(sa->nic);
- const struct ether_addr *from;
+ const struct rte_ether_addr *from;
uint32_t mac_nstats;
size_t mac_stats_size;
long kvarg_stats_update_period_ms;
@@ -401,7 +401,7 @@ sfc_port_attach(struct sfc_adapter *sa)
port->flow_ctrl_autoneg = B_TRUE;
RTE_BUILD_BUG_ON(sizeof(encp->enc_mac_addr) != sizeof(*from));
- from = (const struct ether_addr *)(encp->enc_mac_addr);
+ from = (const struct rte_ether_addr *)(encp->enc_mac_addr);
ether_addr_copy(from, &port->default_mac_addr);
port->max_mcast_addrs = EFX_MAC_MULTICAST_LIST_MAX;
diff --git a/drivers/net/softnic/parser.c b/drivers/net/softnic/parser.c
index a8688a2..7ea6eb4 100644
--- a/drivers/net/softnic/parser.c
+++ b/drivers/net/softnic/parser.c
@@ -528,13 +528,13 @@ inet_pton6(const char *src, unsigned char *dst)
return 1;
}
-static struct ether_addr *
+static struct rte_ether_addr *
my_ether_aton(const char *a)
{
int i;
char *end;
unsigned long o[ETHER_ADDR_LEN];
- static struct ether_addr ether_addr;
+ static struct rte_ether_addr ether_addr;
i = 0;
do {
@@ -568,7 +568,7 @@ my_ether_aton(const char *a)
} else
return NULL;
- return (struct ether_addr *)&ether_addr;
+ return (struct rte_ether_addr *)&ether_addr;
}
int
@@ -596,15 +596,15 @@ softnic_parse_ipv6_addr(const char *token, struct in6_addr *ipv6)
}
int
-softnic_parse_mac_addr(const char *token, struct ether_addr *addr)
+softnic_parse_mac_addr(const char *token, struct rte_ether_addr *addr)
{
- struct ether_addr *tmp;
+ struct rte_ether_addr *tmp;
tmp = my_ether_aton(token);
if (tmp == NULL)
return -1;
- memcpy(addr, tmp, sizeof(struct ether_addr));
+ memcpy(addr, tmp, sizeof(struct rte_ether_addr));
return 0;
}
diff --git a/drivers/net/softnic/parser.h b/drivers/net/softnic/parser.h
index 1ee3f82..6f408b2 100644
--- a/drivers/net/softnic/parser.h
+++ b/drivers/net/softnic/parser.h
@@ -49,7 +49,7 @@ int softnic_parse_hex_string(char *src, uint8_t *dst, uint32_t *size);
int softnic_parse_ipv4_addr(const char *token, struct in_addr *ipv4);
int softnic_parse_ipv6_addr(const char *token, struct in6_addr *ipv6);
-int softnic_parse_mac_addr(const char *token, struct ether_addr *addr);
+int softnic_parse_mac_addr(const char *token, struct rte_ether_addr *addr);
int softnic_parse_mpls_labels(char *string,
uint32_t *labels, uint32_t *n_labels);
diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c
index 32b001f..4bda2f2 100644
--- a/drivers/net/softnic/rte_eth_softnic.c
+++ b/drivers/net/softnic/rte_eth_softnic.c
@@ -339,7 +339,7 @@ pmd_free(struct pmd_internals *p)
rte_free(p);
}
-static struct ether_addr eth_addr = {
+static struct rte_ether_addr eth_addr = {
.addr_bytes = {0},
};
diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c
index 88448ef..43a6643 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.c
+++ b/drivers/net/szedata2/rte_eth_szedata2.c
@@ -105,7 +105,7 @@ struct szedata2_tx_queue {
int szedata2_logtype_init;
int szedata2_logtype_driver;
-static struct ether_addr eth_addr = {
+static struct rte_ether_addr eth_addr = {
.addr_bytes = { 0x00, 0x11, 0x17, 0x00, 0x00, 0x00 }
};
@@ -1332,7 +1332,7 @@ eth_tx_queue_setup(struct rte_eth_dev *dev,
static int
eth_mac_addr_set(struct rte_eth_dev *dev __rte_unused,
- struct ether_addr *mac_addr __rte_unused)
+ struct rte_ether_addr *mac_addr __rte_unused)
{
return 0;
}
@@ -1514,7 +1514,7 @@ rte_szedata2_eth_dev_init(struct rte_eth_dev *dev, struct port_info *pi)
eth_link_update(dev, 0);
/* Allocate space for one mac address */
- data->mac_addrs = rte_zmalloc(data->name, sizeof(struct ether_addr),
+ data->mac_addrs = rte_zmalloc(data->name, sizeof(struct rte_ether_addr),
RTE_CACHE_LINE_SIZE);
if (data->mac_addrs == NULL) {
PMD_INIT_LOG(ERR, "Could not alloc space for MAC address!");
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 47a2b68..71be763 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -261,7 +261,7 @@ tap_verify_csum(struct rte_mbuf *mbuf)
uint32_t l2 = mbuf->packet_type & RTE_PTYPE_L2_MASK;
uint32_t l3 = mbuf->packet_type & RTE_PTYPE_L3_MASK;
uint32_t l4 = mbuf->packet_type & RTE_PTYPE_L4_MASK;
- unsigned int l2_len = sizeof(struct ether_hdr);
+ unsigned int l2_len = sizeof(struct rte_ether_hdr);
unsigned int l3_len;
uint16_t cksum = 0;
void *l3_hdr;
@@ -1150,7 +1150,7 @@ tap_allmulti_disable(struct rte_eth_dev *dev)
}
static int
-tap_mac_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
+tap_mac_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
{
struct pmd_internals *pmd = dev->data->dev_private;
enum ioctl_mode mode = LOCAL_ONLY;
@@ -1172,15 +1172,16 @@ tap_mac_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
ret = tap_ioctl(pmd, SIOCGIFHWADDR, &ifr, 0, LOCAL_ONLY);
if (ret < 0)
return ret;
- if (is_same_ether_addr((struct ether_addr *)&ifr.ifr_hwaddr.sa_data,
+ if (is_same_ether_addr((struct rte_ether_addr *)&ifr.ifr_hwaddr.sa_data,
mac_addr))
return 0;
/* Check the current MAC address on the remote */
ret = tap_ioctl(pmd, SIOCGIFHWADDR, &ifr, 0, REMOTE_ONLY);
if (ret < 0)
return ret;
- if (!is_same_ether_addr((struct ether_addr *)&ifr.ifr_hwaddr.sa_data,
- mac_addr))
+ if (!is_same_ether_addr(
+ (struct rte_ether_addr *)&ifr.ifr_hwaddr.sa_data,
+ mac_addr))
mode = LOCAL_AND_REMOTE;
ifr.ifr_hwaddr.sa_family = AF_LOCAL;
rte_memcpy(ifr.ifr_hwaddr.sa_data, mac_addr, ETHER_ADDR_LEN);
@@ -1458,7 +1459,7 @@ tap_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
static int
tap_set_mc_addr_list(struct rte_eth_dev *dev __rte_unused,
- struct ether_addr *mc_addr_set __rte_unused,
+ struct rte_ether_addr *mc_addr_set __rte_unused,
uint32_t nb_mc_addr __rte_unused)
{
/*
@@ -1682,7 +1683,7 @@ static const char *tuntap_types[ETH_TUNTAP_TYPE_MAX] = {
static int
eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name,
- char *remote_iface, struct ether_addr *mac_addr,
+ char *remote_iface, struct rte_ether_addr *mac_addr,
enum rte_tuntap_type type)
{
int numa_node = rte_socket_id();
@@ -1957,7 +1958,7 @@ set_remote_iface(const char *key __rte_unused,
return 0;
}
-static int parse_user_mac(struct ether_addr *user_mac,
+static int parse_user_mac(struct rte_ether_addr *user_mac,
const char *value)
{
unsigned int index = 0;
@@ -1985,7 +1986,7 @@ set_mac_type(const char *key __rte_unused,
const char *value,
void *extra_args)
{
- struct ether_addr *user_mac = extra_args;
+ struct rte_ether_addr *user_mac = extra_args;
if (!value)
return 0;
@@ -2198,7 +2199,7 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)
int speed;
char tap_name[RTE_ETH_NAME_MAX_LEN];
char remote_iface[RTE_ETH_NAME_MAX_LEN];
- struct ether_addr user_mac = { .addr_bytes = {0} };
+ struct rte_ether_addr user_mac = { .addr_bytes = {0} };
struct rte_eth_dev *eth_dev;
int tap_devices_count_increased = 0;
diff --git a/drivers/net/tap/rte_eth_tap.h b/drivers/net/tap/rte_eth_tap.h
index dc3579a..8d6d53d 100644
--- a/drivers/net/tap/rte_eth_tap.h
+++ b/drivers/net/tap/rte_eth_tap.h
@@ -70,8 +70,8 @@ struct pmd_internals {
char remote_iface[RTE_ETH_NAME_MAX_LEN]; /* Remote netdevice name */
char name[RTE_ETH_NAME_MAX_LEN]; /* Internal Tap device name */
int type; /* Type field - TUN|TAP */
- struct ether_addr eth_addr; /* Mac address of the device port */
- struct ifreq remote_initial_flags; /* Remote netdevice flags on init */
+ struct rte_ether_addr eth_addr; /* Mac address of the device port */
+ struct ifreq remote_initial_flags;/* Remote netdevice flags on init */
int remote_if_index; /* remote netdevice IF_INDEX */
int if_index; /* IF_INDEX for the port */
int ioctl_sock; /* socket for ioctl calls */
diff --git a/drivers/net/tap/tap_bpf_program.c b/drivers/net/tap/tap_bpf_program.c
index 532e883..2b1dba1 100644
--- a/drivers/net/tap/tap_bpf_program.c
+++ b/drivers/net/tap/tap_bpf_program.c
@@ -37,7 +37,7 @@
#define KEY_IDX 0
#define BPF_MAP_ID_KEY 1
-struct vlan_hdr {
+struct rte_vlan_hdr {
__be16 proto;
__be16 tci;
};
@@ -141,12 +141,12 @@ rss_l3_l4(struct __sk_buff *skb)
/* Get correct proto for 802.1ad */
if (skb->vlan_present && skb->vlan_proto == htons(ETH_P_8021AD)) {
- if (data + ETH_ALEN * 2 + sizeof(struct vlan_hdr) +
+ if (data + ETH_ALEN * 2 + sizeof(struct rte_vlan_hdr) +
sizeof(proto) > data_end)
return TC_ACT_OK;
proto = *(__u16 *)(data + ETH_ALEN * 2 +
- sizeof(struct vlan_hdr));
- off += sizeof(struct vlan_hdr);
+ sizeof(struct rte_vlan_hdr));
+ off += sizeof(struct rte_vlan_hdr);
}
if (proto == htons(ETH_P_IP)) {
diff --git a/drivers/net/thunderx/base/nicvf_plat.h b/drivers/net/thunderx/base/nicvf_plat.h
index 6de07c7..3f05195 100644
--- a/drivers/net/thunderx/base/nicvf_plat.h
+++ b/drivers/net/thunderx/base/nicvf_plat.h
@@ -46,6 +46,9 @@
#include <rte_ether.h>
#define NICVF_MAC_ADDR_SIZE ETHER_ADDR_LEN
+/* Ethernet */
+#define ether_addr_copy(x, y) memcpy(y, x, ETHER_ADDR_LEN)
+
#include <rte_io.h>
#define nicvf_addr_write(addr, val) rte_write64_relaxed((val), (void *)(addr))
#define nicvf_addr_read(addr) rte_read64_relaxed((void *)(addr))
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 879d889..ec20879 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -2179,10 +2179,10 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)
ret = -ENOMEM;
goto alarm_fail;
}
- if (is_zero_ether_addr((struct ether_addr *)nic->mac_addr))
+ if (is_zero_ether_addr((struct rte_ether_addr *)nic->mac_addr))
eth_random_addr(&nic->mac_addr[0]);
- ether_addr_copy((struct ether_addr *)nic->mac_addr,
+ ether_addr_copy((struct rte_ether_addr *)nic->mac_addr,
&eth_dev->data->mac_addrs[0]);
ret = nicvf_mbox_set_mac_addr(nic, nic->mac_addr);
diff --git a/drivers/net/vdev_netvsc/vdev_netvsc.c b/drivers/net/vdev_netvsc/vdev_netvsc.c
index 801f54c..ef02fdc 100644
--- a/drivers/net/vdev_netvsc/vdev_netvsc.c
+++ b/drivers/net/vdev_netvsc/vdev_netvsc.c
@@ -68,7 +68,7 @@ struct vdev_netvsc_ctx {
char devargs[256]; /**< Fail-safe device arguments. */
char if_name[IF_NAMESIZE]; /**< NetVSC netdevice name. */
unsigned int if_index; /**< NetVSC netdevice index. */
- struct ether_addr if_addr; /**< NetVSC MAC address. */
+ struct rte_ether_addr if_addr; /**< NetVSC MAC address. */
int pipe[2]; /**< Fail-safe communication pipe. */
char yield[256]; /**< PCI sub-device arguments. */
};
@@ -157,7 +157,7 @@ vdev_netvsc_iface_is_netvsc(const struct if_nameindex *iface)
*/
static int
vdev_netvsc_foreach_iface(int (*func)(const struct if_nameindex *iface,
- const struct ether_addr *eth_addr,
+ const struct rte_ether_addr *eth_addr,
va_list ap), int is_netvsc, ...)
{
struct if_nameindex *iface = if_nameindex();
@@ -178,7 +178,7 @@ vdev_netvsc_foreach_iface(int (*func)(const struct if_nameindex *iface,
for (i = 0; iface[i].if_name; ++i) {
int is_netvsc_ret;
struct ifreq req;
- struct ether_addr eth_addr;
+ struct rte_ether_addr eth_addr;
va_list ap;
is_netvsc_ret = vdev_netvsc_iface_is_netvsc(&iface[i]) ? 1 : 0;
@@ -368,7 +368,7 @@ vdev_netvsc_sysfs_readlink(char *buf, size_t size, const char *if_name,
*/
static int
vdev_netvsc_device_probe(const struct if_nameindex *iface,
- const struct ether_addr *eth_addr,
+ const struct rte_ether_addr *eth_addr,
va_list ap)
{
struct vdev_netvsc_ctx *ctx = va_arg(ap, struct vdev_netvsc_ctx *);
@@ -507,7 +507,7 @@ vdev_netvsc_alarm(__rte_unused void *arg)
*/
static int
vdev_netvsc_netvsc_probe(const struct if_nameindex *iface,
- const struct ether_addr *eth_addr,
+ const struct rte_ether_addr *eth_addr,
va_list ap)
{
const char *name = va_arg(ap, const char *);
@@ -527,7 +527,7 @@ vdev_netvsc_netvsc_probe(const struct if_nameindex *iface,
if (!strcmp(pair->value, iface->if_name))
break;
} else if (!strcmp(pair->key, VDEV_NETVSC_ARG_MAC)) {
- struct ether_addr tmp;
+ struct rte_ether_addr tmp;
if (sscanf(pair->value,
"%" SCNx8 ":%" SCNx8 ":%" SCNx8 ":"
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index b2cda04..6705e90 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -43,7 +43,7 @@ static const char *valid_arguments[] = {
NULL
};
-static struct ether_addr base_eth_addr = {
+static struct rte_ether_addr base_eth_addr = {
.addr_bytes = {
0x56 /* V */,
0x48 /* H */,
@@ -325,10 +325,10 @@ static inline void
vhost_count_multicast_broadcast(struct vhost_queue *vq,
struct rte_mbuf *mbuf)
{
- struct ether_addr *ea = NULL;
+ struct rte_ether_addr *ea = NULL;
struct vhost_stats *pstats = &vq->stats;
- ea = rte_pktmbuf_mtod(mbuf, struct ether_addr *);
+ ea = rte_pktmbuf_mtod(mbuf, struct rte_ether_addr *);
if (is_multicast_ether_addr(ea)) {
if (is_broadcast_ether_addr(ea))
pstats->xstats[VHOST_BROADCAST_PKT]++;
@@ -1206,7 +1206,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
struct rte_eth_dev_data *data;
struct pmd_internal *internal = NULL;
struct rte_eth_dev *eth_dev = NULL;
- struct ether_addr *eth_addr = NULL;
+ struct rte_ether_addr *eth_addr = NULL;
struct rte_vhost_vring_state *vring_state = NULL;
struct internal_list *list = NULL;
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index d25c08f..9b99bf3 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -65,11 +65,11 @@ static void virtio_dev_free_mbufs(struct rte_eth_dev *dev);
static int virtio_vlan_filter_set(struct rte_eth_dev *dev,
uint16_t vlan_id, int on);
static int virtio_mac_addr_add(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr,
+ struct rte_ether_addr *mac_addr,
uint32_t index, uint32_t vmdq);
static void virtio_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index);
static int virtio_mac_addr_set(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr);
+ struct rte_ether_addr *mac_addr);
static int virtio_intr_disable(struct rte_eth_dev *dev);
@@ -1142,11 +1142,11 @@ virtio_mac_table_set(struct virtio_hw *hw,
}
static int
-virtio_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
+virtio_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
uint32_t index, uint32_t vmdq __rte_unused)
{
struct virtio_hw *hw = dev->data->dev_private;
- const struct ether_addr *addrs = dev->data->mac_addrs;
+ const struct rte_ether_addr *addrs = dev->data->mac_addrs;
unsigned int i;
struct virtio_net_ctrl_mac *uc, *mc;
@@ -1161,7 +1161,7 @@ virtio_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
mc->entries = 0;
for (i = 0; i < VIRTIO_MAX_MAC_ADDRS; i++) {
- const struct ether_addr *addr
+ const struct rte_ether_addr *addr
= (i == index) ? mac_addr : addrs + i;
struct virtio_net_ctrl_mac *tbl
= is_multicast_ether_addr(addr) ? mc : uc;
@@ -1176,7 +1176,7 @@ static void
virtio_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
{
struct virtio_hw *hw = dev->data->dev_private;
- struct ether_addr *addrs = dev->data->mac_addrs;
+ struct rte_ether_addr *addrs = dev->data->mac_addrs;
struct virtio_net_ctrl_mac *uc, *mc;
unsigned int i;
@@ -1204,7 +1204,7 @@ virtio_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
}
static int
-virtio_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
+virtio_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
{
struct virtio_hw *hw = dev->data->dev_private;
@@ -1395,7 +1395,7 @@ virtio_notify_peers(struct rte_eth_dev *dev)
return;
rarp_mbuf = rte_net_make_rarp_packet(rxvq->mpool,
- (struct ether_addr *)hw->mac_addr);
+ (struct rte_ether_addr *)hw->mac_addr);
if (rarp_mbuf == NULL) {
PMD_DRV_LOG(ERR, "failed to make RARP packet.");
return;
@@ -1662,7 +1662,7 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
/* Copy the permanent MAC address to: virtio_hw */
virtio_get_hwaddr(hw);
- ether_addr_copy((struct ether_addr *) hw->mac_addr,
+ ether_addr_copy((struct rte_ether_addr *)hw->mac_addr,
&eth_dev->data->mac_addrs[0]);
PMD_INIT_LOG(DEBUG,
"PORT MAC: %02X:%02X:%02X:%02X:%02X:%02X",
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 8c56f23..fa9c855 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -1092,7 +1092,7 @@ static inline void
virtio_update_packet_stats(struct virtnet_stats *stats, struct rte_mbuf *mbuf)
{
uint32_t s = mbuf->pkt_len;
- struct ether_addr *ea;
+ struct rte_ether_addr *ea;
stats->bytes += s;
@@ -1113,7 +1113,7 @@ virtio_update_packet_stats(struct virtnet_stats *stats, struct rte_mbuf *mbuf)
stats->size_bins[7]++;
}
- ea = rte_pktmbuf_mtod(mbuf, struct ether_addr *);
+ ea = rte_pktmbuf_mtod(mbuf, struct rte_ether_addr *);
if (is_multicast_ether_addr(ea)) {
if (is_broadcast_ether_addr(ea))
stats->broadcast++;
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index f54536b..3ad1e9e 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -92,7 +92,7 @@ static int vmxnet3_dev_vlan_filter_set(struct rte_eth_dev *dev,
uint16_t vid, int on);
static int vmxnet3_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask);
static int vmxnet3_mac_addr_set(struct rte_eth_dev *dev,
- struct ether_addr *mac_addr);
+ struct rte_ether_addr *mac_addr);
static void vmxnet3_interrupt_handler(void *param);
int vmxnet3_logtype_init;
@@ -316,7 +316,7 @@ eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev)
return -ENOMEM;
}
/* Copy the permanent MAC address */
- ether_addr_copy((struct ether_addr *) hw->perm_addr,
+ ether_addr_copy((struct rte_ether_addr *)hw->perm_addr,
&eth_dev->data->mac_addrs[0]);
PMD_INIT_LOG(DEBUG, "MAC Address : %02x:%02x:%02x:%02x:%02x:%02x",
@@ -1205,11 +1205,11 @@ vmxnet3_dev_supported_ptypes_get(struct rte_eth_dev *dev)
}
static int
-vmxnet3_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *mac_addr)
+vmxnet3_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
{
struct vmxnet3_hw *hw = dev->data->dev_private;
- ether_addr_copy(mac_addr, (struct ether_addr *)(hw->perm_addr));
+ ether_addr_copy(mac_addr, (struct rte_ether_addr *)(hw->perm_addr));
vmxnet3_write_mac(hw, mac_addr->addr_bytes);
return 0;
}
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 4867a64..b691141 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -676,7 +676,7 @@ vmxnet3_guess_mss(struct vmxnet3_hw *hw, const Vmxnet3_RxCompDesc *rcd,
ptr = rte_pktmbuf_mtod(rxm, char *);
slen = rte_pktmbuf_data_len(rxm);
- hlen = sizeof(struct ether_hdr);
+ hlen = sizeof(struct rte_ether_hdr);
if (rcd->v4) {
if (unlikely(slen < hlen + sizeof(struct ipv4_hdr)))
@@ -703,7 +703,7 @@ vmxnet3_guess_mss(struct vmxnet3_hw *hw, const Vmxnet3_RxCompDesc *rcd,
if (unlikely(slen < hlen + sizeof(struct tcp_hdr)))
return hw->mtu - hlen - sizeof(struct tcp_hdr) +
- sizeof(struct ether_hdr);
+ sizeof(struct rte_ether_hdr);
tcp_hdr = (struct tcp_hdr *)(ptr + hlen);
hlen += (tcp_hdr->data_off & 0xf0) >> 2;
@@ -712,7 +712,7 @@ vmxnet3_guess_mss(struct vmxnet3_hw *hw, const Vmxnet3_RxCompDesc *rcd,
return (rte_pktmbuf_pkt_len(rxm) - hlen +
rxm->udata64 - 1) / rxm->udata64;
else
- return hw->mtu - hlen + sizeof(struct ether_hdr);
+ return hw->mtu - hlen + sizeof(struct rte_ether_hdr);
}
/* Receive side checksum and other offloads */