Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ice(4): Add host SR-IOV support #1573

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sys/conf/files.amd64
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ dev/ice/irdma_di_if.m optional ice pci \
compile-with "${NORMAL_M} -I$S/dev/ice"
dev/ice/ice_ddp_common.c optional ice pci \
compile-with "${NORMAL_C} -I$S/dev/ice"
dev/ice/ice_iov.c optional ice pci pci_iov \
compile-with "${NORMAL_C} -I$S/dev/ice"
dev/ice/ice_vf_mbx.c optional ice pci pci_iov \
compile-with "${NORMAL_C} -I$S/dev/ice"
ice_ddp.c optional ice_ddp \
compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032900 -mice_ddp -c${.TARGET}" \
no-ctfconvert no-implicit-rule before-depend local \
Expand Down
2 changes: 2 additions & 0 deletions sys/dev/ice/ice_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ enum feat_list {
static inline void
ice_disable_unsupported_features(ice_bitmap_t __unused *bitmap)
{
#ifndef PCI_IOV
ice_clear_bit(ICE_FEATURE_SRIOV, bitmap);
#endif
#ifndef DEV_NETMAP
ice_clear_bit(ICE_FEATURE_NETMAP, bitmap);
#endif
Expand Down
16 changes: 16 additions & 0 deletions sys/dev/ice/ice_iflib.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ struct ice_irq_vector {
* @tc: traffic class queue belongs to
* @q_handle: qidx in tc; used in TXQ enable functions
*
* ice_iov.c requires the following parameters (when PCI_IOV is defined):
* @itr_idx: ITR index to use for this queue
*
* Other parameters may be iflib driver specific
*/
struct ice_tx_queue {
Expand All @@ -153,6 +156,9 @@ struct ice_tx_queue {
u32 me;
u16 q_handle;
u8 tc;
#ifdef PCI_IOV
u8 itr_idx;
#endif

/* descriptor writeback status */
qidx_t *tx_rsq;
Expand All @@ -175,6 +181,9 @@ struct ice_tx_queue {
* @stats: queue statistics
* @tc: traffic class queue belongs to
*
* ice_iov.c requires the following parameters (when PCI_IOV is defined):
* @itr_idx: ITR index to use for this queue
*
* Other parameters may be iflib driver specific
*/
struct ice_rx_queue {
Expand All @@ -187,6 +196,9 @@ struct ice_rx_queue {
struct ice_irq_vector *irqv;
u32 me;
u8 tc;
#ifdef PCI_IOV
u8 itr_idx;
#endif

struct if_irq que_irq;
};
Expand Down Expand Up @@ -332,6 +344,10 @@ struct ice_softc {
ice_declare_bitmap(feat_cap, ICE_FEATURE_COUNT);
ice_declare_bitmap(feat_en, ICE_FEATURE_COUNT);

#ifdef PCI_IOV
struct ice_vf *vfs;
u16 num_vfs;
#endif
struct ice_resmgr os_imgr;
/* For mirror interface */
struct ice_mirr_if *mirr_if;
Expand Down
Loading
Loading