Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*****************************************************************************
0003  *                                                                           *
0004  * File: sge.h                                                               *
0005  * $Revision: 1.11 $                                                          *
0006  * $Date: 2005/06/21 22:10:55 $                                              *
0007  * Description:                                                              *
0008  *  part of the Chelsio 10Gb Ethernet Driver.                                *
0009  *                                                                           *
0010  *                                                                           *
0011  * http://www.chelsio.com                                                    *
0012  *                                                                           *
0013  * Copyright (c) 2003 - 2005 Chelsio Communications, Inc.                    *
0014  * All rights reserved.                                                      *
0015  *                                                                           *
0016  * Maintainers: maintainers@chelsio.com                                      *
0017  *                                                                           *
0018  * Authors: Dimitrios Michailidis   <dm@chelsio.com>                         *
0019  *          Tina Yang               <tainay@chelsio.com>                     *
0020  *          Felix Marti             <felix@chelsio.com>                      *
0021  *          Scott Bardone           <sbardone@chelsio.com>                   *
0022  *          Kurt Ottaway            <kottaway@chelsio.com>                   *
0023  *          Frank DiMambro          <frank@chelsio.com>                      *
0024  *                                                                           *
0025  * History:                                                                  *
0026  *                                                                           *
0027  ****************************************************************************/
0028 
0029 #ifndef _CXGB_SGE_H_
0030 #define _CXGB_SGE_H_
0031 
0032 #include <linux/types.h>
0033 #include <linux/interrupt.h>
0034 #include <asm/byteorder.h>
0035 
0036 struct sge_intr_counts {
0037     unsigned int rx_drops;        /* # of packets dropped due to no mem */
0038     unsigned int pure_rsps;        /* # of non-payload responses */
0039     unsigned int unhandled_irqs;   /* # of unhandled interrupts */
0040     unsigned int respQ_empty;      /* # times respQ empty */
0041     unsigned int respQ_overflow;   /* # respQ overflow (fatal) */
0042     unsigned int freelistQ_empty;  /* # times freelist empty */
0043     unsigned int pkt_too_big;      /* packet too large (fatal) */
0044     unsigned int pkt_mismatch;
0045     unsigned int cmdQ_full[3];     /* not HW IRQ, host cmdQ[] full */
0046     unsigned int cmdQ_restarted[3];/* # of times cmdQ X was restarted */
0047 };
0048 
0049 struct sge_port_stats {
0050     u64 rx_cso_good;     /* # of successful RX csum offloads */
0051     u64 tx_cso;          /* # of TX checksum offloads */
0052     u64 tx_tso;          /* # of TSO requests */
0053     u64 vlan_xtract;     /* # of VLAN tag extractions */
0054     u64 vlan_insert;     /* # of VLAN tag insertions */
0055     u64 tx_need_hdrroom; /* # of TX skbs in need of more header room */
0056 };
0057 
0058 struct sk_buff;
0059 struct net_device;
0060 struct adapter;
0061 struct sge_params;
0062 struct sge;
0063 
0064 struct sge *t1_sge_create(struct adapter *, struct sge_params *);
0065 int t1_sge_configure(struct sge *, struct sge_params *);
0066 int t1_sge_set_coalesce_params(struct sge *, struct sge_params *);
0067 void t1_sge_destroy(struct sge *);
0068 irqreturn_t t1_interrupt_thread(int irq, void *data);
0069 irqreturn_t t1_interrupt(int irq, void *cookie);
0070 int t1_poll(struct napi_struct *, int);
0071 
0072 netdev_tx_t t1_start_xmit(struct sk_buff *skb, struct net_device *dev);
0073 void t1_vlan_mode(struct adapter *adapter, netdev_features_t features);
0074 void t1_sge_start(struct sge *);
0075 void t1_sge_stop(struct sge *);
0076 bool t1_sge_intr_error_handler(struct sge *sge);
0077 void t1_sge_intr_enable(struct sge *);
0078 void t1_sge_intr_disable(struct sge *);
0079 void t1_sge_intr_clear(struct sge *);
0080 const struct sge_intr_counts *t1_sge_get_intr_counts(const struct sge *sge);
0081 void t1_sge_get_port_stats(const struct sge *sge, int port, struct sge_port_stats *);
0082 unsigned int t1_sched_update_parms(struct sge *, unsigned int, unsigned int,
0083                unsigned int);
0084 
0085 #endif /* _CXGB_SGE_H_ */