sfxge(4): do not use enum for filter flags
It is not 100% correct to assign non-enum values to enum type variables. Found by ICC build (DPDK PMD upstreaming). Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D8953
This commit is contained in:
parent
fd4fbb71da
commit
57b42dbbbc
@ -947,7 +947,7 @@ static __checkReturn efx_rc_t
|
||||
ef10_filter_insert_unicast(
|
||||
__in efx_nic_t *enp,
|
||||
__in_ecount(6) uint8_t const *addr,
|
||||
__in efx_filter_flag_t filter_flags)
|
||||
__in efx_filter_flags_t filter_flags)
|
||||
{
|
||||
ef10_filter_table_t *eftp = enp->en_filter.ef_ef10_filter_table;
|
||||
efx_filter_spec_t spec;
|
||||
@ -978,7 +978,7 @@ fail1:
|
||||
static __checkReturn efx_rc_t
|
||||
ef10_filter_insert_all_unicast(
|
||||
__in efx_nic_t *enp,
|
||||
__in efx_filter_flag_t filter_flags)
|
||||
__in efx_filter_flags_t filter_flags)
|
||||
{
|
||||
ef10_filter_table_t *eftp = enp->en_filter.ef_ef10_filter_table;
|
||||
efx_filter_spec_t spec;
|
||||
@ -1012,7 +1012,7 @@ ef10_filter_insert_multicast_list(
|
||||
__in boolean_t brdcst,
|
||||
__in_ecount(6*count) uint8_t const *addrs,
|
||||
__in uint32_t count,
|
||||
__in efx_filter_flag_t filter_flags,
|
||||
__in efx_filter_flags_t filter_flags,
|
||||
__in boolean_t rollback)
|
||||
{
|
||||
ef10_filter_table_t *eftp = enp->en_filter.ef_ef10_filter_table;
|
||||
@ -1105,7 +1105,7 @@ fail1:
|
||||
static __checkReturn efx_rc_t
|
||||
ef10_filter_insert_all_multicast(
|
||||
__in efx_nic_t *enp,
|
||||
__in efx_filter_flag_t filter_flags)
|
||||
__in efx_filter_flags_t filter_flags)
|
||||
{
|
||||
ef10_filter_table_t *eftp = enp->en_filter.ef_ef10_filter_table;
|
||||
efx_filter_spec_t spec;
|
||||
@ -1207,7 +1207,7 @@ ef10_filter_reconfigure(
|
||||
{
|
||||
efx_nic_cfg_t *encp = &enp->en_nic_cfg;
|
||||
ef10_filter_table_t *table = enp->en_filter.ef_ef10_filter_table;
|
||||
efx_filter_flag_t filter_flags;
|
||||
efx_filter_flags_t filter_flags;
|
||||
unsigned int i;
|
||||
efx_rc_t all_unicst_rc = 0;
|
||||
efx_rc_t all_mulcst_rc = 0;
|
||||
|
@ -2180,20 +2180,22 @@ efx_tx_qdestroy(
|
||||
#define EFX_IPPROTO_TCP 6
|
||||
#define EFX_IPPROTO_UDP 17
|
||||
|
||||
typedef enum efx_filter_flag_e {
|
||||
EFX_FILTER_FLAG_RX_RSS = 0x01, /* use RSS to spread across
|
||||
* multiple queues */
|
||||
EFX_FILTER_FLAG_RX_SCATTER = 0x02, /* enable RX scatter */
|
||||
EFX_FILTER_FLAG_RX_OVER_AUTO = 0x04, /* Override an automatic filter
|
||||
* (priority EFX_FILTER_PRI_AUTO).
|
||||
* May only be set by the filter
|
||||
* implementation for each type.
|
||||
* A removal request will
|
||||
* restore the automatic filter
|
||||
* in its place. */
|
||||
EFX_FILTER_FLAG_RX = 0x08, /* Filter is for RX */
|
||||
EFX_FILTER_FLAG_TX = 0x10, /* Filter is for TX */
|
||||
} efx_filter_flag_t;
|
||||
/* Use RSS to spread across multiple queues */
|
||||
#define EFX_FILTER_FLAG_RX_RSS 0x01
|
||||
/* Enable RX scatter */
|
||||
#define EFX_FILTER_FLAG_RX_SCATTER 0x02
|
||||
/*
|
||||
* Override an automatic filter (priority EFX_FILTER_PRI_AUTO).
|
||||
* May only be set by the filter implementation for each type.
|
||||
* A removal request will restore the automatic filter in its place.
|
||||
*/
|
||||
#define EFX_FILTER_FLAG_RX_OVER_AUTO 0x04
|
||||
/* Filter is for RX */
|
||||
#define EFX_FILTER_FLAG_RX 0x08
|
||||
/* Filter is for TX */
|
||||
#define EFX_FILTER_FLAG_TX 0x10
|
||||
|
||||
typedef unsigned int efx_filter_flags_t;
|
||||
|
||||
typedef enum efx_filter_match_flags_e {
|
||||
EFX_FILTER_MATCH_REM_HOST = 0x0001, /* Match by remote IP host
|
||||
@ -2289,7 +2291,7 @@ extern void
|
||||
efx_filter_spec_init_rx(
|
||||
__out efx_filter_spec_t *spec,
|
||||
__in efx_filter_priority_t priority,
|
||||
__in efx_filter_flag_t flags,
|
||||
__in efx_filter_flags_t flags,
|
||||
__in efx_rxq_t *erp);
|
||||
|
||||
extern void
|
||||
|
@ -273,7 +273,7 @@ fail1:
|
||||
efx_filter_spec_init_rx(
|
||||
__out efx_filter_spec_t *spec,
|
||||
__in efx_filter_priority_t priority,
|
||||
__in efx_filter_flag_t flags,
|
||||
__in efx_filter_flags_t flags,
|
||||
__in efx_rxq_t *erp)
|
||||
{
|
||||
EFSYS_ASSERT3P(spec, !=, NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user