X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_pmd_bond%2Frte_eth_bond_pmd.c;h=506a448e949df5eacc7b9b494d5c598a29320a1e;hb=08b563ffb19d8baf59dd84200f25bc85031d18a7;hp=5979ce5b1e0f8ca69edb0cd4d6c7094b73bf996e;hpb=ea672a8b1655bbb44876d2550ff56f384968a43b;p=dpdk.git diff --git a/lib/librte_pmd_bond/rte_eth_bond_pmd.c b/lib/librte_pmd_bond/rte_eth_bond_pmd.c index 5979ce5b1e..506a448e94 100644 --- a/lib/librte_pmd_bond/rte_eth_bond_pmd.c +++ b/lib/librte_pmd_bond/rte_eth_bond_pmd.c @@ -198,14 +198,14 @@ xmit_slave_hash(const struct rte_mbuf *buf, uint8_t slave_count, uint8_t policy) switch (policy) { case BALANCE_XMIT_POLICY_LAYER2: - eth_hdr = (struct ether_hdr *)buf->data; + eth_hdr = rte_pktmbuf_mtod(buf, struct ether_hdr *); hash = ether_hash(eth_hdr); hash ^= hash >> 8; return hash % slave_count; case BALANCE_XMIT_POLICY_LAYER23: - eth_hdr = (struct ether_hdr *)buf->data; + eth_hdr = rte_pktmbuf_mtod(buf, struct ether_hdr *); if (buf->ol_flags & PKT_RX_VLAN_PKT) eth_offset = sizeof(struct ether_hdr) + sizeof(struct vlan_hdr);