Contributors: 8
Author |
Tokens |
Token Proportion |
Commits |
Commit Proportion |
Grzegorz Nitka |
82 |
27.61% |
4 |
22.22% |
Michal Swiatkowski |
71 |
23.91% |
1 |
5.56% |
Anirudh Venkataramanan |
63 |
21.21% |
7 |
38.89% |
Jacob E Keller |
40 |
13.47% |
2 |
11.11% |
Brett Creeley |
34 |
11.45% |
1 |
5.56% |
Sudheer Mogilappagari |
4 |
1.35% |
1 |
5.56% |
Krzysztof Goreczny |
2 |
0.67% |
1 |
5.56% |
Maciej Fijalkowski |
1 |
0.34% |
1 |
5.56% |
Total |
297 |
|
18 |
|
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2019-2021, Intel Corporation. */
#ifndef _ICE_ESWITCH_H_
#define _ICE_ESWITCH_H_
#include <net/devlink.h>
#ifdef CONFIG_ICE_SWITCHDEV
void ice_eswitch_release(struct ice_pf *pf);
int ice_eswitch_configure(struct ice_pf *pf);
int ice_eswitch_rebuild(struct ice_pf *pf);
int ice_eswitch_mode_get(struct devlink *devlink, u16 *mode);
int
ice_eswitch_mode_set(struct devlink *devlink, u16 mode,
struct netlink_ext_ack *extack);
bool ice_is_eswitch_mode_switchdev(struct ice_pf *pf);
void ice_eswitch_update_repr(struct ice_vsi *vsi);
void ice_eswitch_stop_all_tx_queues(struct ice_pf *pf);
void ice_eswitch_set_target_vsi(struct sk_buff *skb,
struct ice_tx_offload_params *off);
netdev_tx_t
ice_eswitch_port_start_xmit(struct sk_buff *skb, struct net_device *netdev);
#else /* CONFIG_ICE_SWITCHDEV */
static inline void ice_eswitch_release(struct ice_pf *pf) { }
static inline void ice_eswitch_stop_all_tx_queues(struct ice_pf *pf) { }
static inline void
ice_eswitch_set_target_vsi(struct sk_buff *skb,
struct ice_tx_offload_params *off) { }
static inline void ice_eswitch_update_repr(struct ice_vsi *vsi) { }
static inline int ice_eswitch_configure(struct ice_pf *pf)
{
return 0;
}
static inline int ice_eswitch_rebuild(struct ice_pf *pf)
{
return -EOPNOTSUPP;
}
static inline int ice_eswitch_mode_get(struct devlink *devlink, u16 *mode)
{
return DEVLINK_ESWITCH_MODE_LEGACY;
}
static inline int
ice_eswitch_mode_set(struct devlink *devlink, u16 mode,
struct netlink_ext_ack *extack)
{
return -EOPNOTSUPP;
}
static inline bool ice_is_eswitch_mode_switchdev(struct ice_pf *pf)
{
return false;
}
static inline netdev_tx_t
ice_eswitch_port_start_xmit(struct sk_buff *skb, struct net_device *netdev)
{
return NETDEV_TX_BUSY;
}
#endif /* CONFIG_ICE_SWITCHDEV */
#endif /* _ICE_ESWITCH_H_ */