dp-packet: Remove ofpbuf dependency.
[cascardo/ovs.git] / ofproto / ofproto-dpif-sflow.c
index 3113a53..b146f5d 100644 (file)
@@ -753,7 +753,7 @@ dpif_sflow_odp_port_to_ifindex(const struct dpif_sflow *ds,
 }
 
 void
-dpif_sflow_received(struct dpif_sflow *ds, const struct ofpbuf *packet,
+dpif_sflow_received(struct dpif_sflow *ds, const struct dp_packet *packet,
                     const struct flow *flow, odp_port_t odp_in_port,
                     const union user_action_cookie *cookie)
     OVS_EXCLUDED(mutex)
@@ -794,12 +794,12 @@ dpif_sflow_received(struct dpif_sflow *ds, const struct ofpbuf *packet,
     header->header_protocol = SFLHEADER_ETHERNET_ISO8023;
     /* The frame_length should include the Ethernet FCS (4 bytes),
      * but it has already been stripped,  so we need to add 4 here. */
-    header->frame_length = ofpbuf_size(packet) + 4;
+    header->frame_length = dp_packet_size(packet) + 4;
     /* Ethernet FCS stripped off. */
     header->stripped = 4;
-    header->header_length = MIN(ofpbuf_size(packet),
+    header->header_length = MIN(dp_packet_size(packet),
                                 sampler->sFlowFsMaximumHeaderSize);
-    header->header_bytes = ofpbuf_data(packet);
+    header->header_bytes = dp_packet_data(packet);
 
     /* Add extended switch element. */
     memset(&switchElem, 0, sizeof(switchElem));