This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Two machines with 10G NIC directly connect each other | |
nn22 and nn23 | |
step 1: create one VF on nn23 | |
echo 1 > /sys/bus/pci/devices/0000:07:00.0/sriov_numvfs | |
Before bind VF to vfid-pci, try to ping this VF from nn22 (IP 12.0.0.22) | |
step 2: assign IP to this VF p2p1_0 12.0.0.23 | |
p2p1 Link encap:Ethernet HWaddr 90:e2:ba:4a:e8:08 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ether_hdr* eth; | |
struct rte_mbuf *pkt = batch->pkts[i]; | |
eth = rte_pktmbuf_mtod(pkt, struct ether_hdr *); | |
the related macro: | |
#define rte_pktmbuf_mtod_offset(m, t, o) ((t)((char *)(m)->buf_addr + (m)->data_off + (o))) | |
#define rte_pktmbuf_mtod(m, t) rte_pktmbuf_mtod_offset(m, t, 0) | |