-
Notifications
You must be signed in to change notification settings - Fork 23
ON-16435: Replace arch checks with nic capabilies #75
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -508,10 +508,11 @@ __zf_reactor_perform(struct zf_stack* st, unsigned spin_cnt) | |
| * from the future in the next RX buffer. */ | ||
| pkt_id next_packet_id = 0; | ||
| char* next_packet; | ||
| bool is_efct = vi->nic_type.arch == EF_VI_ARCH_EFCT; | ||
| bool is_rx_ref = *zf_stack_res_nic_flags(st, nic) & | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're using these flags on the critical path. The |
||
| ZF_RES_NIC_FLAG_RX_REF; | ||
| bool packet_present; | ||
|
|
||
| if( is_efct ) { | ||
| if( is_rx_ref ) { | ||
| char* vpkt = (char*)efct_vi_rx_future_peek(vi); | ||
| packet_present = vpkt != NULL; | ||
| if( packet_present ) { | ||
|
|
@@ -643,7 +644,7 @@ zf_reactor_purge_event(struct zf_stack* st, int nic, ef_vi* vi, ef_event* ev) | |
| case EF_EVENT_TYPE_RX: | ||
| zf_assert_nequal(EF_EVENT_RX_SOP(*ev), 0); | ||
| zf_assert_equal(EF_EVENT_RX_CONT(*ev), 0); | ||
| zf_assert_nequal(vi->nic_type.arch, EF_VI_ARCH_EFCT); | ||
| zf_assert(!(*zf_stack_res_nic_flags(st, nic) & ZF_RES_NIC_FLAG_RX_REF)); | ||
| zf_pool_free_pkt(&st->pool, EF_EVENT_RX_RQ_ID(*ev)); | ||
| zf_log_event_trace(st, "%s: purged event %x\n", __FUNCTION__, | ||
| EF_EVENT_RX_RQ_ID(*ev)); | ||
|
|
@@ -652,7 +653,7 @@ zf_reactor_purge_event(struct zf_stack* st, int nic, ef_vi* vi, ef_event* ev) | |
| zf_reactor_handle_tx_event(st, nic, vi, ev); | ||
| return ZF_REACTOR_PURGE_STATUS_TX; | ||
| case EF_EVENT_TYPE_RX_REF: | ||
| zf_assert_equal(vi->nic_type.arch, EF_VI_ARCH_EFCT); | ||
| zf_assert(*zf_stack_res_nic_flags(st, nic) & ZF_RES_NIC_FLAG_RX_REF); | ||
| efct_vi_rxpkt_release(vi, ev->rx_ref.pkt_id); | ||
| zf_log_event_trace(st, "%s: purged event %x\n", __FUNCTION__, ev->rx_ref.pkt_id); | ||
| return ZF_REACTOR_PURGE_STATUS_RX; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,7 +16,8 @@ int enable_tx_warm(struct zf_tx* tx, zf_tx_warm_state* state) | |
| zf_log_stack_trace(st, "%s: TX warm enabled\n", __func__); | ||
| char* ctpio_warm_buf = NULL; | ||
| state->ctpio_warm_buf_id = PKT_INVALID; | ||
| if( vi->vi_flags & EF_VI_TX_CTPIO && vi->nic_type.arch != EF_VI_ARCH_EFCT ) { | ||
| if( vi->vi_flags & EF_VI_TX_CTPIO && vi->nic_type.arch != EF_VI_ARCH_EFCT | ||
| && vi->nic_type.arch != EF_VI_ARCH_EF10CT ) { | ||
|
Comment on lines
+19
to
+20
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The check here is on whether we need to post a dma fallback, which we don't if we have the CTPIO_ONLY capability, so I think that's what we should use. |
||
| int rc = zft_alloc_pkt(&st->pool, &state->ctpio_warm_buf_id); | ||
| if( rc < 0 ) | ||
| return rc; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assert that CTPIO_ONLY capability wasn't set?