[ovs-dev] [PATCH v2 1/3] ofpbuf: Add ofpbuf_rss()

Ben Pfaff blp at nicira.com
Mon Aug 18 16:45:16 UTC 2014


On Fri, Aug 15, 2014 at 12:43:35PM -0700, Daniele Di Proietto wrote:
> ofpbuf_rss() is introduced to get the RSS hash from the NIC. It works only for
> packets received by DPDK (otherwise it returns 0, which tells the caller to
> compute the hash in another way)
> 
> This commit also configure DPDK devices to compute RSS hash for UDP and IPv6
> packets
> 
> Signed-off-by: Daniele Di Proietto <ddiproietto at vmware.com>

There's an extra space after the '*':
> +static inline uint32_t ofpbuf_rss(const struct ofpbuf * b)
> +{
> +    if (OVS_LIKELY(b->source == OFPBUF_DPDK)) {

The parentheses here are unneeded:
> +        return (b)->mbuf.pkt.hash.rss;
> +    }
> +    return 0;
> +}
> +

(This isn't a full review.)



More information about the dev mailing list