diff options
author | Upinder Malhi <umalhi@cisco.com> | 2013-09-10 05:38:16 +0200 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-01-14 09:44:28 +0100 |
commit | e3cf00d0a87f025db5855a43a67c67a41fa79fef (patch) | |
tree | 34ab93de5918af08434dcf063e4ff5ae78425989 /drivers/infiniband/hw/usnic/usnic_fwd.h | |
parent | Linux 3.13-rc8 (diff) | |
download | linux-e3cf00d0a87f025db5855a43a67c67a41fa79fef.tar.xz linux-e3cf00d0a87f025db5855a43a67c67a41fa79fef.zip |
IB/usnic: Add Cisco VIC low-level hardware driver
This adds a driver that allows userspace to use UD-like QPs over a
proprietary Cisco transport with Cisco's Virtual Interface Cards (VICs),
including VIC 1240 and 1280 cards.
Signed-off-by: Upinder Malhi <umalhi@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/usnic/usnic_fwd.h')
-rw-r--r-- | drivers/infiniband/hw/usnic/usnic_fwd.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/usnic/usnic_fwd.h b/drivers/infiniband/hw/usnic/usnic_fwd.h new file mode 100644 index 000000000000..6973901da8af --- /dev/null +++ b/drivers/infiniband/hw/usnic/usnic_fwd.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2013, Cisco Systems, Inc. All rights reserved. + * + * This program is free software; you may redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + */ + +#ifndef USNIC_FWD_H_ +#define USNIC_FWD_H_ + +#include <linux/if.h> +#include <linux/pci.h> +#include <linux/spinlock.h> + +#include "usnic_abi.h" +#include "vnic_devcmd.h" + +struct usnic_fwd_dev { + struct pci_dev *pdev; + struct net_device *netdev; + spinlock_t lock; +}; + +struct usnic_fwd_filter { + enum usnic_transport_type transport; + u16 port_num; +}; + +struct usnic_fwd_filter_hndl { + enum filter_type type; + u32 id; + u32 vnic_idx; + struct usnic_fwd_dev *ufdev; + struct list_head link; + struct usnic_fwd_filter *filter; +}; + +struct usnic_fwd_dev *usnic_fwd_dev_alloc(struct pci_dev *pdev); +void usnic_fwd_dev_free(struct usnic_fwd_dev *ufdev); +int usnic_fwd_add_usnic_filter(struct usnic_fwd_dev *ufdev, int vnic_idx, + int rq_idx, struct usnic_fwd_filter *filter, + struct usnic_fwd_filter_hndl **filter_hndl); +int usnic_fwd_del_filter(struct usnic_fwd_filter_hndl *filter_hndl); +int usnic_fwd_enable_rq(struct usnic_fwd_dev *ufdev, int vnic_idx, int rq_idx); +int usnic_fwd_disable_rq(struct usnic_fwd_dev *ufdev, int vnic_idx, int rq_idx); + +#endif /* !USNIC_FWD_H_ */ |