@@ -534,7 +534,7 @@ static struct sk_buff *gve_rx_skb(struct gve_priv *priv, struct gve_rx_ring *rx,
return skb;
}
-static bool gve_rx(struct gve_rx_ring *rx, netdev_features_t feat,
+static bool gve_rx(struct gve_rx_ring *rx, const netdev_features_t *feat,
u64 *packet_size_bytes, u32 *work_done)
{
struct gve_rx_slot_page_info *page_info;
@@ -592,7 +592,7 @@ static bool gve_rx(struct gve_rx_ring *rx, netdev_features_t feat,
desc = &rx->desc.desc_ring[idx];
}
- if (likely(netdev_feature_test(NETIF_F_RXCSUM_BIT, feat))) {
+ if (likely(netdev_feature_test(NETIF_F_RXCSUM_BIT, *feat))) {
/* NIC passes up the partial sum */
if (first_desc->csum)
skb->ip_summed = CHECKSUM_COMPLETE;
@@ -602,7 +602,7 @@ static bool gve_rx(struct gve_rx_ring *rx, netdev_features_t feat,
}
/* parse flags & pass relevant info up */
- if (likely(netdev_feature_test(NETIF_F_RXHASH_BIT, feat)) &&
+ if (likely(netdev_feature_test(NETIF_F_RXHASH_BIT, *feat)) &&
gve_needs_rss(first_desc->flags_seq))
skb_set_hash(skb, be32_to_cpu(first_desc->rss_hash),
gve_rss_type(first_desc->flags_seq));
@@ -702,7 +702,7 @@ static bool gve_rx_refill_buffers(struct gve_priv *priv, struct gve_rx_ring *rx)
}
static int gve_clean_rx_done(struct gve_rx_ring *rx, int budget,
- netdev_features_t feat)
+ const netdev_features_t *feat)
{
u32 work_done = 0, total_packet_cnt = 0, ok_packet_cnt = 0;
struct gve_priv *priv = rx->gve;
@@ -783,7 +783,7 @@ int gve_rx_poll(struct gve_notify_block *block, int budget)
budget = INT_MAX;
if (budget > 0)
- work_done = gve_clean_rx_done(rx, budget, feat);
+ work_done = gve_clean_rx_done(rx, budget, &feat);
return work_done;
}
@@ -629,7 +629,7 @@ static int gve_rx_complete_rsc(struct sk_buff *skb,
/* Returns 0 if skb is completed successfully, -1 otherwise. */
static int gve_rx_complete_skb(struct gve_rx_ring *rx, struct napi_struct *napi,
const struct gve_rx_compl_desc_dqo *desc,
- netdev_features_t feat)
+ const netdev_features_t *feat)
{
struct gve_ptype ptype =
rx->gve->ptype_lut_dqo->ptypes[desc->packet_type];
@@ -637,10 +637,10 @@ static int gve_rx_complete_skb(struct gve_rx_ring *rx, struct napi_struct *napi,
skb_record_rx_queue(rx->ctx.skb_head, rx->q_num);
- if (netdev_feature_test(NETIF_F_RXHASH_BIT, feat))
+ if (netdev_feature_test(NETIF_F_RXHASH_BIT, *feat))
gve_rx_skb_hash(rx->ctx.skb_head, desc, ptype);
- if (netdev_feature_test(NETIF_F_RXCSUM_BIT, feat))
+ if (netdev_feature_test(NETIF_F_RXCSUM_BIT, *feat))
gve_rx_skb_csum(rx->ctx.skb_head, desc, ptype);
/* RSC packets must set gso_size otherwise the TCP stack will complain
@@ -732,7 +732,7 @@ int gve_rx_poll_dqo(struct gve_notify_block *block, int budget)
pkt_bytes += ETH_HLEN;
/* gve_rx_complete_skb() will consume skb if successful */
- if (gve_rx_complete_skb(rx, napi, compl_desc, feat) != 0) {
+ if (gve_rx_complete_skb(rx, napi, compl_desc, &feat) != 0) {
gve_rx_free_skb(rx);
u64_stats_update_begin(&rx->statss);
rx->rx_desc_err_dropped_pkt++;
The function gve_rx(), gve_clean_rx_done() and gve_rx_complete_skb() using netdev_features_t as parameters. For the prototype of netdev_features_t will be extended to be larger than 8 bytes, so change the prototype of the function, change the prototype of input features to 'netdev_features_t *'. Signed-off-by: Jian Shen <shenjian15@huawei.com> --- drivers/net/ethernet/google/gve/gve_rx.c | 10 +++++----- drivers/net/ethernet/google/gve/gve_rx_dqo.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-)