55
66#define DP_SYNC_HEADERS_LEN (sizeof(struct rte_ether_hdr) + sizeof(struct dp_sync_hdr))
77
8- // TODO condition on when to run - only send packets after being asked? (need the other dpservice and a valid request?)
9- // but maybe not, just spam anyway??
10- // also this is already checked elsewhere I think - validate this
8+ static const struct rte_ether_addr sync_mac_src = { . addr_bytes = { 0x02 , 'd' , 'p' , 's' , 0 , 1 } };
9+ static const struct rte_ether_addr sync_mac_dst = { . addr_bytes = { 0x02 , 'd' , 'p' , 's' , 0 , 2 } };
10+
1111
1212static struct rte_mbuf * dp_sync_alloc_message (uint8_t msg_type , uint16_t payload_len )
1313{
1414 struct dp_dpdk_layer * dp_layer = get_dpdk_layer ();
15- const struct dp_port * port = dp_get_sync_port ();
1615 struct rte_mbuf * pkt ;
1716 struct rte_ether_hdr * eth_hdr ;
1817 struct dp_sync_hdr * sync_hdr ;
@@ -29,8 +28,8 @@ static struct rte_mbuf *dp_sync_alloc_message(uint8_t msg_type, uint16_t payload
2928 rte_pktmbuf_free (pkt );
3029 return NULL ;
3130 }
32- rte_ether_addr_copy (& port -> own_mac , & eth_hdr -> src_addr );
33- rte_ether_addr_copy (& port -> neigh_mac , & eth_hdr -> src_addr );
31+ rte_ether_addr_copy (& sync_mac_src , & eth_hdr -> src_addr );
32+ rte_ether_addr_copy (& sync_mac_dst , & eth_hdr -> dst_addr );
3433 eth_hdr -> ether_type = htons (DP_SYNC_ETHERTYPE );
3534
3635 sync_hdr = (struct dp_sync_hdr * )(eth_hdr + 1 );
0 commit comments