rocker: Move QOM macros to header
This will make future conversion to OBJECT_DECLARE* easier. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Tested-By: Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200825192110.3528606-39-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
cb8cf86b3e
commit
8eeb6f3624
@ -73,11 +73,6 @@ struct rocker {
|
|||||||
QLIST_ENTRY(rocker) next;
|
QLIST_ENTRY(rocker) next;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define TYPE_ROCKER "rocker"
|
|
||||||
|
|
||||||
#define ROCKER(obj) \
|
|
||||||
OBJECT_CHECK(Rocker, (obj), TYPE_ROCKER)
|
|
||||||
|
|
||||||
static QLIST_HEAD(, rocker) rockers;
|
static QLIST_HEAD(, rocker) rockers;
|
||||||
|
|
||||||
Rocker *rocker_find(const char *name)
|
Rocker *rocker_find(const char *name)
|
||||||
|
@ -66,11 +66,15 @@ static inline bool ipv6_addr_is_multicast(const Ipv6Addr *addr)
|
|||||||
return (addr->addr32[0] & htonl(0xFF000000)) == htonl(0xFF000000);
|
return (addr->addr32[0] & htonl(0xFF000000)) == htonl(0xFF000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct rocker Rocker;
|
|
||||||
typedef struct world World;
|
typedef struct world World;
|
||||||
typedef struct desc_info DescInfo;
|
typedef struct desc_info DescInfo;
|
||||||
typedef struct desc_ring DescRing;
|
typedef struct desc_ring DescRing;
|
||||||
|
|
||||||
|
#define TYPE_ROCKER "rocker"
|
||||||
|
typedef struct rocker Rocker;
|
||||||
|
#define ROCKER(obj) \
|
||||||
|
OBJECT_CHECK(Rocker, (obj), TYPE_ROCKER)
|
||||||
|
|
||||||
Rocker *rocker_find(const char *name);
|
Rocker *rocker_find(const char *name);
|
||||||
uint32_t rocker_fp_ports(Rocker *r);
|
uint32_t rocker_fp_ports(Rocker *r);
|
||||||
int rocker_event_link_changed(Rocker *r, uint32_t pport, bool link_up);
|
int rocker_event_link_changed(Rocker *r, uint32_t pport, bool link_up);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user