Skip to content

Commit

Permalink
Merge branch 'onload-8.1'
Browse files Browse the repository at this point in the history
Also, needed to re-generate the EFCH interface version in
src/lib/ciul/pt_endpoint.c to address merge conflicts.
  • Loading branch information
ivatet-amd committed Feb 1, 2024
2 parents 0b84a23 + 950f17f commit a7fdb14
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
17 changes: 15 additions & 2 deletions src/driver/linux_char/filter_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <ci/efrm/efrm_filter.h>
#include <ci/efrm/pd.h>
#include <ci/efrm/vi_resource.h>
#include <ci/efrm/vi_set.h>
#include <ci/efhw/nic.h>
#include <ci/net/ethernet.h>
#include "efch.h"
Expand Down Expand Up @@ -593,6 +594,8 @@ int efch_filter_list_add(struct efrm_resource *rs, struct efrm_pd *pd,
unsigned onload_filter_flags = 0;
enum efx_filter_flags filter_flags = EFX_FILTER_FLAG_RX_SCATTER;
uint16_t vid;
struct efrm_vi_set *vi_set;
int rss_context = 0;

if( ! capable(CAP_NET_ADMIN) ) {
if( (filter_add->in.fields & (CI_FILTER_FIELD_LOC_HOST |
Expand Down Expand Up @@ -620,11 +623,21 @@ int efch_filter_list_add(struct efrm_resource *rs, struct efrm_pd *pd,

if( filter_add->in.flags & CI_FILTER_FLAG_MCAST_LOOP )
filter_flags |= EFX_FILTER_FLAG_TX;
if( filter_add->in.flags & CI_FILTER_FLAG_RSS )
if( filter_add->in.flags & CI_FILTER_FLAG_RSS ) {
if( rs->rs_type != EFRM_RESOURCE_VI_SET )
return -EINVAL;
vi_set = efrm_vi_set_from_resource(rs);
rss_context = efrm_vi_set_get_rss_context(vi_set,
EFRM_RSS_MODE_ID_DEFAULT);
/* We don't have our own context, so fall back to sharing with the net
* driver. */
if( rss_context == -1 )
rss_context = EFX_FILTER_RSS_CONTEXT_DEFAULT;
filter_flags |= EFX_FILTER_FLAG_RX_RSS;
}
efx_filter_init_rx(&spec, EFX_FILTER_PRI_REQUIRED, filter_flags,
rs->rs_instance);
spec.rss_context = filter_add->in.rss_context;
spec.rss_context = rss_context;

*copy_out = 1;

Expand Down
1 change: 0 additions & 1 deletion src/include/ci/efch/op_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ typedef union ci_filter_add_u {
} l4;
} spec;
union {
uint32_t rss_context;
uint32_t rxq_no;
};
} in;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/ciul/pt_endpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ void ef_vi_set_intf_ver(char* intf_ver, size_t len)
* It'd also be possible to enhance the checksum computation to be smarter
* (e.g. by ignoring comments, etc.).
*/
if( strcmp(EFCH_INTF_VER, "12676f240d9d70aa6df22694a0a10750") ) {
if( strcmp(EFCH_INTF_VER, "8e792a7abd863f6898a11b21c37aacff") ) {
fprintf(stderr, "ef_vi: ERROR: char interface has changed\n");
abort();
}
Expand Down
6 changes: 4 additions & 2 deletions src/lib/transport/ip/netif_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -744,10 +744,12 @@ static void ci_netif_dump_vi(ci_netif* ni, int intf_i, oo_dump_log_fn_t logger,
struct efab_efct_rxq_uk_shm_q* q = &vi->efct_shm->q[i];
if( ! q->superbuf_pkts )
continue;
logger(log_arg, " rxq[%d]: hw=%d cfg=%u pkts=%u nospc=%u full=%u nobufs=%u in=%u out=%u",
logger(log_arg, " rxq[%d]: hw=%d cfg=%u pkts=%u in=%u out=%u",
i, q->qid, q->config_generation, q->superbuf_pkts,
q->stats.no_rxq_space, q->stats.too_many_owned, q->stats.no_bufs,
q->rxq.added - q->rxq.removed, q->freeq.added - q->freeq.removed);
logger(log_arg, " rxq[%d]: nospc=%u full=%u nobufs=%u skipped=%u",
i, q->stats.no_rxq_space, q->stats.too_many_owned, q->stats.no_bufs,
q->stats.skipped_bufs);
}
}
else {
Expand Down

0 comments on commit a7fdb14

Please sign in to comment.