summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0b3e77b)
There are many more places in OVS where using these types would be an
improvement, but the ofproto code is extra confusing because it uses
a mix of byte orders.
struct rule {
struct cls_rule cr;
struct rule {
struct cls_rule cr;
- uint64_t flow_cookie; /* Controller-issued identifier.
- (Kept in network-byte order.) */
+ ovs_be64 flow_cookie; /* Controller-issued identifier. */
uint16_t idle_timeout; /* In seconds from time of last use. */
uint16_t hard_timeout; /* In seconds from time of creation. */
bool send_flow_removed; /* Send a flow removed message? */
uint16_t idle_timeout; /* In seconds from time of last use. */
uint16_t hard_timeout; /* In seconds from time of creation. */
bool send_flow_removed; /* Send a flow removed message? */
static struct rule *rule_create(struct ofproto *, struct rule *super,
const union ofp_action *, size_t n_actions,
uint16_t idle_timeout, uint16_t hard_timeout,
static struct rule *rule_create(struct ofproto *, struct rule *super,
const union ofp_action *, size_t n_actions,
uint16_t idle_timeout, uint16_t hard_timeout,
- uint64_t flow_cookie, bool send_flow_removed);
+ ovs_be64 flow_cookie, bool send_flow_removed);
static void rule_free(struct rule *);
static void rule_destroy(struct ofproto *, struct rule *);
static struct rule *rule_from_cls_rule(const struct cls_rule *);
static void rule_free(struct rule *);
static void rule_destroy(struct ofproto *, struct rule *);
static struct rule *rule_from_cls_rule(const struct cls_rule *);
rule_create(struct ofproto *ofproto, struct rule *super,
const union ofp_action *actions, size_t n_actions,
uint16_t idle_timeout, uint16_t hard_timeout,
rule_create(struct ofproto *ofproto, struct rule *super,
const union ofp_action *actions, size_t n_actions,
uint16_t idle_timeout, uint16_t hard_timeout,
- uint64_t flow_cookie, bool send_flow_removed)
+ ovs_be64 flow_cookie, bool send_flow_removed)
{
struct rule *rule = xzalloc(sizeof *rule);
rule->idle_timeout = idle_timeout;
{
struct rule *rule = xzalloc(sizeof *rule);
rule->idle_timeout = idle_timeout;
-rule_has_out_port(const struct rule *rule, uint16_t out_port)
+rule_has_out_port(const struct rule *rule, ovs_be16 out_port)
{
const union ofp_action *oa;
struct actions_iterator i;
{
const union ofp_action *oa;
struct actions_iterator i;
-make_stats_reply(uint32_t xid, uint16_t type, size_t body_len)
+make_stats_reply(ovs_be32 xid, ovs_be16 type, size_t body_len)
{
struct ofp_stats_reply *osr;
struct ofpbuf *msg;
{
struct ofp_stats_reply *osr;
struct ofpbuf *msg;
struct flow_stats_cbdata {
struct ofproto *ofproto;
struct ofconn *ofconn;
struct flow_stats_cbdata {
struct ofproto *ofproto;
struct ofconn *ofconn;
struct aggregate_stats_cbdata {
struct ofproto *ofproto;
struct aggregate_stats_cbdata {
struct ofproto *ofproto;
uint64_t packet_count;
uint64_t byte_count;
uint32_t n_flows;
uint64_t packet_count;
uint64_t byte_count;
uint32_t n_flows;
struct delete_flows_cbdata {
struct ofproto *ofproto;
struct delete_flows_cbdata {
struct ofproto *ofproto;
};
static void delete_flows_cb(struct cls_rule *, void *cbdata_);
};
static void delete_flows_cb(struct cls_rule *, void *cbdata_);
-static void delete_flow(struct ofproto *, struct rule *, uint16_t out_port);
+static void delete_flow(struct ofproto *, struct rule *, ovs_be16 out_port);
/* Implements OFPFC_DELETE. */
static void
/* Implements OFPFC_DELETE. */
static void
* 'out_port' is htons(OFPP_NONE) or if 'rule' actually outputs to the
* specified 'out_port'. */
static void
* 'out_port' is htons(OFPP_NONE) or if 'rule' actually outputs to the
* specified 'out_port'. */
static void
-delete_flow(struct ofproto *p, struct rule *rule, uint16_t out_port)
+delete_flow(struct ofproto *p, struct rule *rule, ovs_be16 out_port)
{
if (rule_is_hidden(rule)) {
return;
{
if (rule_is_hidden(rule)) {
return;