dp-packet: Constantify offloading APIs.
Getters should have const arguments.
Acked-by: Flavio Leitner
@@ -482,7 +482,7 @@ dp_packet_set_allocated(struct dp_packet *b, uint16_t s)
/* Returns the RSS hash of the packet 'p'. Note that the returned value is
* correct only if 'dp_packet_rss_valid(p)' returns true */
static inline uint32_t
-dp_packet_get_rss_hash(struct dp_packet *p)
+dp_packet_get_rss_hash(const struct dp_packet *p)
{
return p->mbuf.hash.rss;
}
@@ -495,7 +495,7 @@ dp_packet_set_rss_hash(struct dp_packet *p, uint32_t hash)
}
static inline bool
-dp_packet_rss_valid(struct dp_packet *p)
+dp_packet_rss_valid(const struct dp_packet *p)
{
return p->mbuf.ol_flags & PKT_RX_RSS_HASH;
}
@@ -557,7 +557,7 @@ reset_dp_packet_checksum_ol_flags(struct dp_packet *p)
}
static inline bool
-dp_packet_has_flow_mark(struct dp_packet *p, uint32_t *mark)
+dp_packet_has_flow_mark(const struct dp_packet *p, uint32_t *mark)
{
if (p->mbuf.ol_flags & PKT_RX_FDIR_ID) {
*mark = p->mbuf.hash.fdir.hi;
@@ -619,7 +619,7 @@ dp_packet_set_allocated(struct dp_packet *b, uint16_t s)
/* Returns the RSS hash of the packet 'p'. Note that the returned value is
* correct only if 'dp_packet_rss_valid(p)' returns true */
static inline uint32_t
-dp_packet_get_rss_hash(struct dp_packet *p)
+dp_packet_get_rss_hash(const struct dp_packet *p)
{
return p->rss_hash;
}
@@ -632,7 +632,7 @@ dp_packet_set_rss_hash(struct dp_packet *p, uint32_t hash)
}
static inline bool
-dp_packet_rss_valid(struct dp_packet *p)
+dp_packet_rss_valid(const struct dp_packet *p)
{
return p->rss_hash_valid;
}
@@ -683,7 +683,7 @@ reset_dp_packet_checksum_ol_flags(struct dp_packet *p OVS_UNUSED)
}
static inline bool
-dp_packet_has_flow_mark(struct dp_packet *p OVS_UNUSED,
+dp_packet_has_flow_mark(const struct dp_packet *p OVS_UNUSED,
uint32_t *mark OVS_UNUSED)
{
return false;
