From e3cf00d0a87f025db5855a43a67c67a41fa79fef Mon Sep 17 00:00:00 2001 From: Upinder Malhi Date: Tue, 10 Sep 2013 03:38:16 +0000 Subject: 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 Signed-off-by: Christian Benvenuti Signed-off-by: Roland Dreier --- drivers/infiniband/hw/usnic/usnic_fwd.h | 58 +++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 drivers/infiniband/hw/usnic/usnic_fwd.h (limited to 'drivers/infiniband/hw/usnic/usnic_fwd.h') 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 +#include +#include + +#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_ */ -- cgit v1.2.3-59-g8ed1b