Skip to content

Commit

Permalink
linux-gen: pktio: fix pktio_if_ops_t.promisc_mode_set() argument type
Browse files Browse the repository at this point in the history
Match pktio_if_ops_t.promisc_mode_set() argument type (odp_bool_t) to the
API function odp_pktio_promisc_mode_set().

Signed-off-by: Matias Elo <[email protected]>
Reviewed-by: Janne Peltonen <[email protected]>
Reviewed-by: Petri Savolainen <[email protected]>
  • Loading branch information
MatiasElo committed Sep 6, 2024
1 parent c50da2f commit ddb0d79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion platform/linux-generic/include/odp_packet_io_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ extern "C" {
#include <odp/api/hints.h>
#include <odp/api/packet_io.h>
#include <odp/api/spinlock.h>
#include <odp/api/std.h>
#include <odp/api/ticketlock.h>
#include <odp/api/time.h>

Expand Down Expand Up @@ -226,7 +227,7 @@ typedef struct pktio_if_ops {
uint32_t (*maxlen_get)(pktio_entry_t *pktio_entry);
int (*maxlen_set)(pktio_entry_t *pktio_entry, uint32_t maxlen_input,
uint32_t maxlen_output);
int (*promisc_mode_set)(pktio_entry_t *pktio_entry, int enable);
int (*promisc_mode_set)(pktio_entry_t *pktio_entry, odp_bool_t enable);
int (*promisc_mode_get)(pktio_entry_t *pktio_entry);
int (*mac_get)(pktio_entry_t *pktio_entry, void *mac_addr);
int (*mac_set)(pktio_entry_t *pktio_entry, const void *mac_addr);
Expand Down
2 changes: 1 addition & 1 deletion platform/linux-generic/pktio/socket_xdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ static int sock_xdp_mtu_set(pktio_entry_t *pktio_entry, uint32_t maxlen_input,
return 0;
}

static int sock_xdp_promisc_mode_set(pktio_entry_t *pktio_entry, int enable)
static int sock_xdp_promisc_mode_set(pktio_entry_t *pktio_entry, odp_bool_t enable)
{
return _odp_promisc_mode_set_fd(pkt_priv(pktio_entry)->helper_sock,
pktio_entry->name, enable);
Expand Down

0 comments on commit ddb0d79

Please sign in to comment.