Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: (GPL-2.0 OR MIT)
0002  * Google virtual Ethernet (gve) driver
0003  *
0004  * Copyright (C) 2015-2021 Google, Inc.
0005  */
0006 
0007 #ifndef _GVE_UTILS_H
0008 #define _GVE_UTILS_H
0009 
0010 #include <linux/etherdevice.h>
0011 
0012 #include "gve.h"
0013 
0014 void gve_tx_remove_from_block(struct gve_priv *priv, int queue_idx);
0015 void gve_tx_add_to_block(struct gve_priv *priv, int queue_idx);
0016 
0017 void gve_rx_remove_from_block(struct gve_priv *priv, int queue_idx);
0018 void gve_rx_add_to_block(struct gve_priv *priv, int queue_idx);
0019 
0020 struct sk_buff *gve_rx_copy(struct net_device *dev, struct napi_struct *napi,
0021                 struct gve_rx_slot_page_info *page_info, u16 len,
0022                 u16 pad, struct gve_rx_ctx *ctx);
0023 
0024 /* Decrement pagecnt_bias. Set it back to INT_MAX if it reached zero. */
0025 void gve_dec_pagecnt_bias(struct gve_rx_slot_page_info *page_info);
0026 
0027 #endif /* _GVE_UTILS_H */
0028