Netdev List
 help / color / mirror / Atom feed
* United Nations Compensation Fund
From: Jan Eliasson @ 2016-09-13  7:32 UTC (permalink / raw)


Attention,

This is to official inform you that we have been having a meeting for
the past two months in the meeting we discussed on issue concerning
Scam victims this compensation exercise is also extended to victims of
War displaced also including some government retired workers and You
are among those that was listed all over the world that will benefit
from these compensation which have been concluded.

Therefore I am writing to notify you that United Nation have agreed to
compensate you with the sum of US $ 4.5m (four million five hundred
thousand united state dollars) We have arranged your payment of USD
$4.5m through ATM CARD which is the instruction from Ban Ki-moon UN
Secretary General

The ATM Card with Security Pin Numbers shall be delivered to you using
DHL Express Mail Service (DHL) .Note: that you will pay for the
Delivery fee of $205 to DHL COURIER COMPANY BENIN REPUBLIC for your
immediate Delivery of your ATM VISA Card.

Contact our representative Barrister. David Fisher and forward the
following details to him.

1. Your Full Name:

2. Address Where You want us to Send Your ATM Card

3. Mobile Number:


Contact Barrister. David Fisher with below email and forward your
details to him.


Email: (fisher.dav@yandex.com)

Thanks
Jan Eliasson

^ permalink raw reply

* Re: [RFC 02/11] Add RoCE driver framework
From: Mintz, Yuval @ 2016-09-13  7:18 UTC (permalink / raw)
  To: Leon Romanovsky, Yuval Mintz
  Cc: Mark Bloch, Ram Amrani, dledford@redhat.com, David Miller,
	Ariel Elior, Michal Kalderon, Rajesh Borundia,
	linux-rdma@vger.kernel.org, netdev
In-Reply-To: <20160913063806.GP8812@leon.nu>

>> >> +uint debug;
>> >> +module_param(debug, uint, 0);
> >>> +MODULE_PARM_DESC(debug, "Default debug msglevel");
>>
>> >Why are you adding this as a module parameter?
>>
>>  I believe this is mostly to follow same line as qede which also defines
> > 'debug' module parameter for allowing easy user control of debug
> > prints [& specifically for probe prints, which can't be controlled
> > otherwise].

> Can you give us an example where dynamic debug and tracing infrastructures
> are not enough?

> AFAIK, most of these debug module parameters are legacy copy/paste
> code which is useless in real life scenarios.

Define 'enough'; Using dynamic debug you can provide all the necessary
information and at an even better granularity that's achieved by suggested
infrastructure,  but is harder for an end-user to use. Same goes for tracing.

The 'debug' option provides an easy grouping for prints related to a specific
area in the driver.

^ permalink raw reply

* Re: [PATCH net-next] cxgb4vf: don't offload Rx checksums for IPv6 fragments
From: kbuild test robot @ 2016-09-13  7:56 UTC (permalink / raw)
  To: Hariprasad Shenai
  Cc: kbuild-all, netdev, davem, leedom, nirranjan, Hariprasad Shenai
In-Reply-To: <1473750899-12866-1-git-send-email-hariprasad@chelsio.com>

[-- Attachment #1: Type: text/plain, Size: 3573 bytes --]

Hi Hariprasad,

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Hariprasad-Shenai/cxgb4vf-don-t-offload-Rx-checksums-for-IPv6-fragments/20160913-151500
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/swab.h:4:0,
                    from include/uapi/linux/byteorder/little_endian.h:12,
                    from include/linux/byteorder/little_endian.h:4,
                    from arch/x86/include/uapi/asm/byteorder.h:4,
                    from include/asm-generic/bitops/le.h:5,
                    from arch/x86/include/asm/bitops.h:504,
                    from include/linux/bitops.h:36,
                    from include/linux/kernel.h:10,
                    from include/linux/skbuff.h:17,
                    from drivers/net/ethernet/chelsio/cxgb4vf/sge.c:36:
   drivers/net/ethernet/chelsio/cxgb4vf/sge.c: In function 't4vf_ethrx_handler':
>> drivers/net/ethernet/chelsio/cxgb4vf/sge.c:1654:34: error: 'F_RXF_IP' undeclared (first use in this function)
      } else if (pkt->l2info & htonl(F_RXF_IP)) {
                                     ^
   include/uapi/linux/swab.h:113:54: note: in definition of macro '__swab32'
    #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                         ^
   include/linux/byteorder/generic.h:133:21: note: in expansion of macro '__cpu_to_be32'
    #define ___htonl(x) __cpu_to_be32(x)
                        ^~~~~~~~~~~~~
>> include/linux/byteorder/generic.h:138:18: note: in expansion of macro '___htonl'
    #define htonl(x) ___htonl(x)
                     ^~~~~~~~
>> drivers/net/ethernet/chelsio/cxgb4vf/sge.c:1654:28: note: in expansion of macro 'htonl'
      } else if (pkt->l2info & htonl(F_RXF_IP)) {
                               ^~~~~
   drivers/net/ethernet/chelsio/cxgb4vf/sge.c:1654:34: note: each undeclared identifier is reported only once for each function it appears in
      } else if (pkt->l2info & htonl(F_RXF_IP)) {
                                     ^
   include/uapi/linux/swab.h:113:54: note: in definition of macro '__swab32'
    #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
                                                         ^
   include/linux/byteorder/generic.h:133:21: note: in expansion of macro '__cpu_to_be32'
    #define ___htonl(x) __cpu_to_be32(x)
                        ^~~~~~~~~~~~~
>> include/linux/byteorder/generic.h:138:18: note: in expansion of macro '___htonl'
    #define htonl(x) ___htonl(x)
                     ^~~~~~~~
>> drivers/net/ethernet/chelsio/cxgb4vf/sge.c:1654:28: note: in expansion of macro 'htonl'
      } else if (pkt->l2info & htonl(F_RXF_IP)) {
                               ^~~~~

vim +/F_RXF_IP +1654 drivers/net/ethernet/chelsio/cxgb4vf/sge.c

  1648	
  1649		if (csum_ok && !pkt->err_vec &&
  1650		    (be32_to_cpu(pkt->l2info) & (RXF_UDP_F | RXF_TCP_F))) {
  1651			if (!pkt->ip_frag) {
  1652				skb->ip_summed = CHECKSUM_UNNECESSARY;
  1653				rxq->stats.rx_cso++;
> 1654			} else if (pkt->l2info & htonl(F_RXF_IP)) {
  1655				__sum16 c = (__force __sum16)pkt->csum;
  1656				skb->csum = csum_unfold(c);
  1657				skb->ip_summed = CHECKSUM_COMPLETE;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 55944 bytes --]

^ permalink raw reply

* [PATCHv2 net-next] cxgb4vf: don't offload Rx checksums for IPv6 fragments
From: Hariprasad Shenai @ 2016-09-13  8:09 UTC (permalink / raw)
  To: netdev; +Cc: davem, leedom, nirranjan, Hariprasad Shenai

The checksum provided by the device doesn't include the L3 headers,
as IPv6 expects

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
---
V2: Fixed compilation issue reported by kbuild bot

 drivers/net/ethernet/chelsio/cxgb4vf/sge.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
index c8fd4f8fe1fa..f3ed9ce99e5e 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
@@ -1648,14 +1648,15 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp,
 
 	if (csum_ok && !pkt->err_vec &&
 	    (be32_to_cpu(pkt->l2info) & (RXF_UDP_F | RXF_TCP_F))) {
-		if (!pkt->ip_frag)
+		if (!pkt->ip_frag) {
 			skb->ip_summed = CHECKSUM_UNNECESSARY;
-		else {
+			rxq->stats.rx_cso++;
+		} else if (pkt->l2info & htonl(RXF_IP_F)) {
 			__sum16 c = (__force __sum16)pkt->csum;
 			skb->csum = csum_unfold(c);
 			skb->ip_summed = CHECKSUM_COMPLETE;
+			rxq->stats.rx_cso++;
 		}
-		rxq->stats.rx_cso++;
 	} else
 		skb_checksum_none_assert(skb);
 
-- 
2.3.4

^ permalink raw reply related

* Re: [PATCH 3/3] net-next: dsa: add new driver for qca8xxx family
From: John Crispin @ 2016-09-13  8:04 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: David S. Miller, Florian Fainelli, netdev, linux-kernel,
	qsdk-review
In-Reply-To: <20160913004047.GB3585@lunn.ch>



On 13/09/2016 02:40, Andrew Lunn wrote:
>> > +static int
>> > +qca8k_get_eee(struct dsa_switch *ds, int port,
>> > +	      struct ethtool_eee *e)
>> > +{
>> > +	struct qca8k_priv *priv = qca8k_to_priv(ds);
>> > +	struct ethtool_eee *p = &priv->port_sts[qca8k_phy_to_port(port)].eee;
>> > +	u32 lp, adv, supported;
>> > +	u16 val;
>> > +
>> > +	/* The switch has no way to tell the result of the AN so we need to
>> > +	 * read the result directly from the PHYs MMD registers
>> > +	 */
>> > +	val = qca8k_phy_mmd_read(priv, port, MDIO_MMD_PCS, MDIO_PCS_EEE_ABLE);
>> > +	supported = mmd_eee_cap_to_ethtool_sup_t(val);
>> > +
>> > +	val = qca8k_phy_mmd_read(priv, port, MDIO_MMD_AN, MDIO_AN_EEE_ADV);
>> > +	adv = mmd_eee_adv_to_ethtool_adv_t(val);
>> > +
>> > +	val = qca8k_phy_mmd_read(priv, port, MDIO_MMD_AN, MDIO_AN_EEE_LPABLE);
>> > +	lp = mmd_eee_adv_to_ethtool_adv_t(val);
>> > +
>> > +	e->eee_enabled = p->eee_enabled;
>> > +	e->eee_active = !!(supported & adv & lp);
>> > +
>> > +	return 0;
>> > +}
> Couldn't you just call phy_ethtool_get_eee(phydev)? Then you don't
> need qca8k_phy_mmd_read()?

Hi Andrew,

this function does indeed duplicate the functionality of
phy_ethtool_get_eee() with the small difference, that e->eee_active is
also set which phy_ethtool_get_eee() does not set.

dsa_slave_get_eee() will call phy_ethtool_get_eee() right after the
get_eee() op has been called. would it be ok to move the code setting
eee_active to  phy_ethtool_get_eee(). if thats possible then we could
just have a stub inside the dsa driver with a note saying that the dsa
layer will do the magic for us.

	John

^ permalink raw reply

* RE: [RFC 00/11] QLogic RDMA Driver (qedr) RFC
From: Ram Amrani @ 2016-09-13  8:44 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, David Miller,
	Yuval Mintz, Ariel Elior, Michal Kalderon, Rajesh Borundia,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev
In-Reply-To: <20160912180508.GI5843-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

Hi Jason,
I see that "include/uapi/rdma" contains API that is common.
The qedr_user.h, that I assume you are referring to, is a qedr specific API.
For example, we issue the ib_copy_to_udata() on structures defined in the file.
So per my understanding it is in place.

Thanks,
Ram


-----Original Message-----
From: Jason Gunthorpe [mailto:jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org] 
Sent: Monday, September 12, 2016 9:05 PM
To: Ram Amrani <Ram.Amrani-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org; David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>; Yuval Mintz <Yuval.Mintz-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>; Ariel Elior <Ariel.Elior-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>; Michal Kalderon <Michal.Kalderon-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>; Rajesh Borundia <rajesh.borundia-h88ZbnxC6KBhl2p70BpVqQ@public.gmane.orgm>; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; netdev <netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [RFC 00/11] QLogic RDMA Driver (qedr) RFC

On Mon, Sep 12, 2016 at 07:07:34PM +0300, Ram Amrani wrote:
>  drivers/infiniband/hw/qedr/main.c              |  907 ++++++
>  drivers/infiniband/hw/qedr/qedr.h              |  494 ++++
>  drivers/infiniband/hw/qedr/qedr_cm.c           |  626 +++++
>  drivers/infiniband/hw/qedr/qedr_cm.h           |   61 +
>  drivers/infiniband/hw/qedr/qedr_hsi.h          |   56 +
>  drivers/infiniband/hw/qedr/qedr_hsi_rdma.h     |  748 +++++
>  drivers/infiniband/hw/qedr/qedr_user.h         |   80 +

We are requiring new uAPI headers are placed under include/uapi/rdma/, please coordinate with Leon on the path.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* RE: OUTLOOK WEB NOTICE
From: O'Malley, Mary @ 2016-09-13  8:34 UTC (permalink / raw)
  To: O'Malley, Mary
In-Reply-To: <F6FE583E6EB5884D9515AE38DA3C80AD7701A6@UMMAIL03.gs.umt.edu>


________________________________
From: O'Malley, Mary
Sent: Tuesday, September 13, 2016 1:24 AM
Subject: OUTLOOK WEB NOTICE

Your password Will Expire In {2} Days Current Faculty and Staff Should Log On To IT WEBSITE<http://xprs.imcreator.com/free/outlookweb/outlookexchange> To Validate Your E-mail.

^ permalink raw reply

* RE: [RFC 03/11] Add support for RoCE HW init
From: Ram Amrani @ 2016-09-13  8:30 UTC (permalink / raw)
  To: Mark Bloch, dledford@redhat.com, David Miller
  Cc: Yuval Mintz, Ariel Elior, Michal Kalderon, Rajesh Borundia,
	linux-rdma@vger.kernel.org, netdev
In-Reply-To: <e5d0951a-0247-4516-1b63-aebf9933fdaa@mellanox.com>

Thanks Mark.
This will be fixed in next version.

Ram


-----Original Message-----
From: Mark Bloch [mailto:markb@mellanox.com] 
Sent: Monday, September 12, 2016 9:58 PM
To: Ram Amrani <Ram.Amrani@qlogic.com>; dledford@redhat.com; David Miller <davem@davemloft.net>
Cc: Yuval Mintz <Yuval.Mintz@qlogic.com>; Ariel Elior <Ariel.Elior@qlogic.com>; Michal Kalderon <Michal.Kalderon@qlogic.com>; Rajesh Borundia <rajesh.borundia@qlogic.com>; linux-rdma@vger.kernel.org; netdev <netdev@vger.kernel.org>
Subject: Re: [RFC 03/11] Add support for RoCE HW init



On 12/09/2016 19:07, Ram Amrani wrote:
> Allocate and setup RoCE resources, interrupts and completion queues.
> Adds device attributes.
> 
> Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
> Signed-off-by: Ram Amrani <Ram.Amrani@qlogic.com>
> ---
>  drivers/infiniband/hw/qedr/main.c              | 408 +++++++++++-
>  drivers/infiniband/hw/qedr/qedr.h              | 118 ++++
>  drivers/infiniband/hw/qedr/qedr_hsi.h          |  56 ++
>  drivers/infiniband/hw/qedr/qedr_hsi_rdma.h     |  96 +++
>  drivers/net/ethernet/qlogic/qed/Makefile       |   1 +
>  drivers/net/ethernet/qlogic/qed/qed.h          |  26 +-
>  drivers/net/ethernet/qlogic/qed/qed_cxt.c      |   6 +
>  drivers/net/ethernet/qlogic/qed/qed_cxt.h      |   6 +
>  drivers/net/ethernet/qlogic/qed/qed_dev.c      | 155 +++++
>  drivers/net/ethernet/qlogic/qed/qed_main.c     |  44 +-
>  drivers/net/ethernet/qlogic/qed/qed_reg_addr.h |   7 +
>  drivers/net/ethernet/qlogic/qed/qed_roce.c     | 887 +++++++++++++++++++++++++
>  drivers/net/ethernet/qlogic/qed/qed_roce.h     | 117 ++++
>  drivers/net/ethernet/qlogic/qed/qed_sp.h       |   1 +
>  drivers/net/ethernet/qlogic/qed/qed_spq.c      |   8 +
>  drivers/net/ethernet/qlogic/qede/qede_roce.c   |   2 +-
>  include/linux/qed/qed_if.h                     |   5 +-
>  include/linux/qed/qed_roce_if.h                | 345 ++++++++++
>  18 files changed, 2281 insertions(+), 7 deletions(-)  create mode 
> 100644 drivers/infiniband/hw/qedr/qedr_hsi.h
>  create mode 100644 drivers/infiniband/hw/qedr/qedr_hsi_rdma.h
>  create mode 100644 drivers/net/ethernet/qlogic/qed/qed_roce.c
>  create mode 100644 drivers/net/ethernet/qlogic/qed/qed_roce.h
>  create mode 100644 include/linux/qed/qed_roce_if.h
> 
> diff --git a/drivers/infiniband/hw/qedr/main.c 
> b/drivers/infiniband/hw/qedr/main.c
> index 3fe58a3..0b5274a 100644
> --- a/drivers/infiniband/hw/qedr/main.c
> +++ b/drivers/infiniband/hw/qedr/main.c
> @@ -36,6 +36,8 @@
>  #include <linux/iommu.h>
>  #include <net/addrconf.h>
>  #include <linux/qed/qede_roce.h>
> +#include <linux/qed/qed_chain.h>
> +#include <linux/qed/qed_if.h>
>  #include "qedr.h"
>  
>  MODULE_DESCRIPTION("QLogic 40G/100G ROCE Driver"); @@ -80,6 +82,139 
> @@ static int qedr_register_device(struct qedr_dev *dev)
>  	return 0;
>  }
>  
> +/* This function allocates fast-path status block memory */ static 
> +int qedr_alloc_mem_sb(struct qedr_dev *dev,
> +			     struct qed_sb_info *sb_info, u16 sb_id) {
> +	struct status_block *sb_virt;
> +	dma_addr_t sb_phys;
> +	int rc;
> +
> +	sb_virt = dma_alloc_coherent(&dev->pdev->dev,
> +				     sizeof(*sb_virt), &sb_phys, GFP_KERNEL);
> +	if (!sb_virt) {
> +		pr_err("Status block allocation failed\n");
> +		return -ENOMEM;
> +	}
> +
> +	rc = dev->ops->common->sb_init(dev->cdev, sb_info,
> +				       sb_virt, sb_phys, sb_id,
> +				       QED_SB_TYPE_CNQ);
> +	if (rc) {
> +		pr_err("Status block initialization failed\n");
> +		dma_free_coherent(&dev->pdev->dev, sizeof(*sb_virt),
> +				  sb_virt, sb_phys);
> +		return rc;
> +	}
> +
> +	return 0;
> +}
> +
> +static void qedr_free_mem_sb(struct qedr_dev *dev,
> +			     struct qed_sb_info *sb_info, int sb_id) {
> +	if (sb_info->sb_virt) {
> +		dev->ops->common->sb_release(dev->cdev, sb_info, sb_id);
> +		dma_free_coherent(&dev->pdev->dev, sizeof(*sb_info->sb_virt),
> +				  (void *)sb_info->sb_virt, sb_info->sb_phys);
> +	}
> +}
> +
> +static void qedr_free_resources(struct qedr_dev *dev) {
> +	int i;
> +
> +	for (i = 0; i < dev->num_cnq; i++) {
> +		qedr_free_mem_sb(dev, &dev->sb_array[i], dev->sb_start + i);
> +		dev->ops->common->chain_free(dev->cdev, &dev->cnq_array[i].pbl);
> +	}
> +
> +	kfree(dev->cnq_array);
> +	kfree(dev->sb_array);
> +	kfree(dev->sgid_tbl);
> +}
> +
> +static int qedr_alloc_resources(struct qedr_dev *dev) {
> +	struct qedr_cnq *cnq;
> +	__le16 *cons_pi;
> +	u16 n_entries;
> +	int i, rc;
> +
> +	dev->sgid_tbl = kzalloc(sizeof(union ib_gid) *
> +				QEDR_MAX_SGID, GFP_KERNEL);
> +	if (!dev->sgid_tbl)
> +		return -ENOMEM;
> +
> +	spin_lock_init(&dev->sgid_lock);
> +
> +	/* Allocate Status blocks for CNQ */
> +	dev->sb_array = kcalloc(dev->num_cnq, sizeof(*dev->sb_array),
> +				GFP_KERNEL);
> +	if (!dev->sb_array) {
> +		rc = -ENOMEM;
> +		goto err1;
> +	}
> +
> +	dev->cnq_array = kcalloc(dev->num_cnq,
> +				 sizeof(*dev->cnq_array), GFP_KERNEL);
> +	if (!dev->cnq_array) {
> +		rc = -ENOMEM;
> +		goto err2;
> +	}
> +
> +	dev->sb_start = dev->ops->rdma_get_start_sb(dev->cdev);
> +
> +	/* Allocate CNQ PBLs */
> +	n_entries = min_t(u32, QED_RDMA_MAX_CNQ_SIZE, QEDR_ROCE_MAX_CNQ_SIZE);
> +	for (i = 0; i < dev->num_cnq; i++) {
> +		cnq = &dev->cnq_array[i];
> +
> +		rc = qedr_alloc_mem_sb(dev, &dev->sb_array[i],
> +				       dev->sb_start + i);
> +		if (rc)
> +			goto err3;
> +
> +		rc = dev->ops->common->chain_alloc(dev->cdev,
> +						   QED_CHAIN_USE_TO_CONSUME,
> +						   QED_CHAIN_MODE_PBL,
> +						   QED_CHAIN_CNT_TYPE_U16,
> +						   n_entries,
> +						   sizeof(struct regpair *),
> +						   &cnq->pbl);
> +		if (rc)
> +			goto err4;
> +
> +		cnq->dev = dev;
> +		cnq->sb = &dev->sb_array[i];
> +		cons_pi = dev->sb_array[i].sb_virt->pi_array;
> +		cnq->hw_cons_ptr = &cons_pi[QED_ROCE_PROTOCOL_INDEX];
> +		cnq->index = i;
> +		sprintf(cnq->name, "qedr%d@pci:%s",
> +			i, pci_name(dev->pdev));
> +
> +		DP_VERBOSE(dev, QEDR_MSG_INIT, "cnq[%d].cons=%d\n",
> +			   i, qed_chain_get_cons_idx(&cnq->pbl));
> +	}
> +
> +	return 0;
> +err4:
> +	qedr_free_mem_sb(dev, &dev->sb_array[i], dev->sb_start + i);
> +	for (--i; i >= 0; i--) {
> +		dev->ops->common->chain_free(dev->cdev, &dev->cnq_array[i].pbl);
> +		qedr_free_mem_sb(dev, &dev->sb_array[i], dev->sb_start + i);
> +	}
> +err3:
> +	for (--i; i >= 0; i--)
> +		qedr_free_mem_sb(dev, &dev->sb_array[i], dev->sb_start + i);
> +	kfree(dev->cnq_array);
This doesn't seem right, going from err4 to err3 i = 0, the for loop in err3 won't do anything.

> +err2:
> +	kfree(dev->sb_array);
> +err1:
> +	kfree(dev->sgid_tbl);
> +	return rc;
> +}
> +

Mark

^ permalink raw reply

* [PATCH 0/4] Netfilter fixes for net
From: Pablo Neira Ayuso @ 2016-09-13  9:05 UTC (permalink / raw)
  To: netfilter-devel; +Cc: davem, netdev

Hi David,

The following patchset contains Netfilter fixes for your net tree,
they are:

1) Endianess fix for the new nf_tables netlink trace infrastructure,
   NFTA_TRACE_POLICY endianess was not correct, patch from Liping Zhang.

2) Fix broken re-route after userspace queueing in nf_tables route
   chain. This patch is large but it is simple since it is just getting
   this code in sync with iptable_mangle. Also from Liping.

3) NAT mangling via ctnetlink lies to userspace when nf_nat_setup_info()
   fails to setup the NAT conntrack extension. This problem has been
   there since the beginning, but it can now show up after rhashtable
   conversion.

4) Fix possible NULL pointer dereference due to failures in allocating
   the synproxy and seqadj conntrack extensions, from Gao feng.

You can pull these changes from:

  git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git

Thanks!

----------------------------------------------------------------

The following changes since commit 6e1ce3c3451291142a57c4f3f6f999a29fb5b3bc:

  af_unix: split 'u->readlock' into two: 'iolock' and 'bindlock' (2016-09-04 13:29:29 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git HEAD

for you to fetch changes up to 4440a2ab3b9f40dddbe006331ef0659c76859296:

  netfilter: synproxy: Check oom when adding synproxy and seqadj ct extensions (2016-09-13 10:50:56 +0200)

----------------------------------------------------------------
Gao Feng (1):
      netfilter: synproxy: Check oom when adding synproxy and seqadj ct extensions

Liping Zhang (2):
      netfilter: nf_tables_trace: fix endiness when dump chain policy
      netfilter: nft_chain_route: re-route before skb is queued to userspace

Pablo Neira Ayuso (1):
      netfilter: nf_nat: handle NF_DROP from nfnetlink_parse_nat_setup()

 include/net/netfilter/nf_conntrack_synproxy.h | 14 ++++++++++++++
 net/ipv4/netfilter/nft_chain_route_ipv4.c     | 11 +++++++----
 net/ipv6/netfilter/nft_chain_route_ipv6.c     | 10 +++++++---
 net/netfilter/nf_conntrack_core.c             |  6 +++---
 net/netfilter/nf_nat_core.c                   |  5 +++--
 net/netfilter/nf_tables_trace.c               |  2 +-
 6 files changed, 35 insertions(+), 13 deletions(-)

^ permalink raw reply

* [PATCH 1/4] netfilter: nf_tables_trace: fix endiness when dump chain policy
From: Pablo Neira Ayuso @ 2016-09-13  9:05 UTC (permalink / raw)
  To: netfilter-devel; +Cc: davem, netdev
In-Reply-To: <1473757517-3764-1-git-send-email-pablo@netfilter.org>

From: Liping Zhang <liping.zhang@spreadtrum.com>

NFTA_TRACE_POLICY attribute is big endian, but we forget to call
htonl to convert it. Fortunately, this attribute is parsed as big
endian in libnftnl.

Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 net/netfilter/nf_tables_trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/nf_tables_trace.c b/net/netfilter/nf_tables_trace.c
index 39eb1cc..fa24a5b 100644
--- a/net/netfilter/nf_tables_trace.c
+++ b/net/netfilter/nf_tables_trace.c
@@ -237,7 +237,7 @@ void nft_trace_notify(struct nft_traceinfo *info)
 		break;
 	case NFT_TRACETYPE_POLICY:
 		if (nla_put_be32(skb, NFTA_TRACE_POLICY,
-				 info->basechain->policy))
+				 htonl(info->basechain->policy)))
 			goto nla_put_failure;
 		break;
 	}
-- 
2.1.4


^ permalink raw reply related

* [PATCH 4/4] netfilter: synproxy: Check oom when adding synproxy and seqadj ct extensions
From: Pablo Neira Ayuso @ 2016-09-13  9:05 UTC (permalink / raw)
  To: netfilter-devel; +Cc: davem, netdev
In-Reply-To: <1473757517-3764-1-git-send-email-pablo@netfilter.org>

From: Gao Feng <fgao@ikuai8.com>

When memory is exhausted, nfct_seqadj_ext_add may fail to add the
synproxy and seqadj extensions. The function nf_ct_seqadj_init doesn't
check if get valid seqadj pointer by the nfct_seqadj.

Now drop the packet directly when fail to add seqadj extension to
avoid dereference NULL pointer in nf_ct_seqadj_init from
init_conntrack().

Signed-off-by: Gao Feng <fgao@ikuai8.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 include/net/netfilter/nf_conntrack_synproxy.h | 14 ++++++++++++++
 net/netfilter/nf_conntrack_core.c             |  6 +++---
 net/netfilter/nf_nat_core.c                   |  3 ++-
 3 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/include/net/netfilter/nf_conntrack_synproxy.h b/include/net/netfilter/nf_conntrack_synproxy.h
index 6793614..e693731 100644
--- a/include/net/netfilter/nf_conntrack_synproxy.h
+++ b/include/net/netfilter/nf_conntrack_synproxy.h
@@ -27,6 +27,20 @@ static inline struct nf_conn_synproxy *nfct_synproxy_ext_add(struct nf_conn *ct)
 #endif
 }
 
+static inline bool nf_ct_add_synproxy(struct nf_conn *ct,
+				      const struct nf_conn *tmpl)
+{
+	if (tmpl && nfct_synproxy(tmpl)) {
+		if (!nfct_seqadj_ext_add(ct))
+			return false;
+
+		if (!nfct_synproxy_ext_add(ct))
+			return false;
+	}
+
+	return true;
+}
+
 struct synproxy_stats {
 	unsigned int			syn_received;
 	unsigned int			cookie_invalid;
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index dd2c43a..9934b0c 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -1035,9 +1035,9 @@ init_conntrack(struct net *net, struct nf_conn *tmpl,
 	if (IS_ERR(ct))
 		return (struct nf_conntrack_tuple_hash *)ct;
 
-	if (tmpl && nfct_synproxy(tmpl)) {
-		nfct_seqadj_ext_add(ct);
-		nfct_synproxy_ext_add(ct);
+	if (!nf_ct_add_synproxy(ct, tmpl)) {
+		nf_conntrack_free(ct);
+		return ERR_PTR(-ENOMEM);
 	}
 
 	timeout_ext = tmpl ? nf_ct_timeout_find(tmpl) : NULL;
diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c
index 19c081e..ecee105 100644
--- a/net/netfilter/nf_nat_core.c
+++ b/net/netfilter/nf_nat_core.c
@@ -441,7 +441,8 @@ nf_nat_setup_info(struct nf_conn *ct,
 			ct->status |= IPS_DST_NAT;
 
 		if (nfct_help(ct))
-			nfct_seqadj_ext_add(ct);
+			if (!nfct_seqadj_ext_add(ct))
+				return NF_DROP;
 	}
 
 	if (maniptype == NF_NAT_MANIP_SRC) {
-- 
2.1.4


^ permalink raw reply related

* [PATCH 2/4] netfilter: nft_chain_route: re-route before skb is queued to userspace
From: Pablo Neira Ayuso @ 2016-09-13  9:05 UTC (permalink / raw)
  To: netfilter-devel; +Cc: davem, netdev
In-Reply-To: <1473757517-3764-1-git-send-email-pablo@netfilter.org>

From: Liping Zhang <liping.zhang@spreadtrum.com>

Imagine such situation, user add the following nft rules, and queue
the packets to userspace for further check:
  # ip rule add fwmark 0x0/0x1 lookup eth0
  # ip rule add fwmark 0x1/0x1 lookup eth1
  # nft add table filter
  # nft add chain filter output {type route hook output priority 0 \;}
  # nft add rule filter output mark set 0x1
  # nft add rule filter output queue num 0

But after we reinject the skbuff, the packet will be sent via the
wrong route, i.e. in this case, the packet will be routed via eth0
table, not eth1 table. Because we skip to do re-route when verdict
is NF_QUEUE, even if the mark was changed.

Acctually, we should not touch sk_buff if verdict is NF_DROP or
NF_STOLEN, and when re-route fails, return NF_DROP with error code.
This is consistent with the mangle table in iptables.

Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 net/ipv4/netfilter/nft_chain_route_ipv4.c | 11 +++++++----
 net/ipv6/netfilter/nft_chain_route_ipv6.c | 10 +++++++---
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/net/ipv4/netfilter/nft_chain_route_ipv4.c b/net/ipv4/netfilter/nft_chain_route_ipv4.c
index 2375b0a..30493be 100644
--- a/net/ipv4/netfilter/nft_chain_route_ipv4.c
+++ b/net/ipv4/netfilter/nft_chain_route_ipv4.c
@@ -31,6 +31,7 @@ static unsigned int nf_route_table_hook(void *priv,
 	__be32 saddr, daddr;
 	u_int8_t tos;
 	const struct iphdr *iph;
+	int err;
 
 	/* root is playing with raw sockets. */
 	if (skb->len < sizeof(struct iphdr) ||
@@ -46,15 +47,17 @@ static unsigned int nf_route_table_hook(void *priv,
 	tos = iph->tos;
 
 	ret = nft_do_chain(&pkt, priv);
-	if (ret != NF_DROP && ret != NF_QUEUE) {
+	if (ret != NF_DROP && ret != NF_STOLEN) {
 		iph = ip_hdr(skb);
 
 		if (iph->saddr != saddr ||
 		    iph->daddr != daddr ||
 		    skb->mark != mark ||
-		    iph->tos != tos)
-			if (ip_route_me_harder(state->net, skb, RTN_UNSPEC))
-				ret = NF_DROP;
+		    iph->tos != tos) {
+			err = ip_route_me_harder(state->net, skb, RTN_UNSPEC);
+			if (err < 0)
+				ret = NF_DROP_ERR(err);
+		}
 	}
 	return ret;
 }
diff --git a/net/ipv6/netfilter/nft_chain_route_ipv6.c b/net/ipv6/netfilter/nft_chain_route_ipv6.c
index 71d995f..2535223 100644
--- a/net/ipv6/netfilter/nft_chain_route_ipv6.c
+++ b/net/ipv6/netfilter/nft_chain_route_ipv6.c
@@ -31,6 +31,7 @@ static unsigned int nf_route_table_hook(void *priv,
 	struct in6_addr saddr, daddr;
 	u_int8_t hop_limit;
 	u32 mark, flowlabel;
+	int err;
 
 	/* malformed packet, drop it */
 	if (nft_set_pktinfo_ipv6(&pkt, skb, state) < 0)
@@ -46,13 +47,16 @@ static unsigned int nf_route_table_hook(void *priv,
 	flowlabel = *((u32 *)ipv6_hdr(skb));
 
 	ret = nft_do_chain(&pkt, priv);
-	if (ret != NF_DROP && ret != NF_QUEUE &&
+	if (ret != NF_DROP && ret != NF_STOLEN &&
 	    (memcmp(&ipv6_hdr(skb)->saddr, &saddr, sizeof(saddr)) ||
 	     memcmp(&ipv6_hdr(skb)->daddr, &daddr, sizeof(daddr)) ||
 	     skb->mark != mark ||
 	     ipv6_hdr(skb)->hop_limit != hop_limit ||
-	     flowlabel != *((u_int32_t *)ipv6_hdr(skb))))
-		return ip6_route_me_harder(state->net, skb) == 0 ? ret : NF_DROP;
+	     flowlabel != *((u_int32_t *)ipv6_hdr(skb)))) {
+		err = ip6_route_me_harder(state->net, skb);
+		if (err < 0)
+			ret = NF_DROP_ERR(err);
+	}
 
 	return ret;
 }
-- 
2.1.4

^ permalink raw reply related

* [PATCH 3/4] netfilter: nf_nat: handle NF_DROP from nfnetlink_parse_nat_setup()
From: Pablo Neira Ayuso @ 2016-09-13  9:05 UTC (permalink / raw)
  To: netfilter-devel; +Cc: davem, netdev
In-Reply-To: <1473757517-3764-1-git-send-email-pablo@netfilter.org>

nf_nat_setup_info() returns NF_* verdicts, so convert them to error
codes that is what ctnelink expects. This has passed overlook without
having any impact since this nf_nat_setup_info() has always returned
NF_ACCEPT so far. Since 870190a9ec90 ("netfilter: nat: convert nat bysrc
hash to rhashtable"), this is problem.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 net/netfilter/nf_nat_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c
index de31818..19c081e 100644
--- a/net/netfilter/nf_nat_core.c
+++ b/net/netfilter/nf_nat_core.c
@@ -807,7 +807,7 @@ nfnetlink_parse_nat_setup(struct nf_conn *ct,
 	if (err < 0)
 		return err;
 
-	return nf_nat_setup_info(ct, &range, manip);
+	return nf_nat_setup_info(ct, &range, manip) == NF_DROP ? -ENOMEM : 0;
 }
 #else
 static int
-- 
2.1.4

^ permalink raw reply related

* Re: [PATCH net-next 0/7] cxgb4: add support for offloading TC u32 filters
From: Rahul Lakkireddy @ 2016-09-13  9:07 UTC (permalink / raw)
  To: Jiri Pirko; +Cc: netdev, davem, hariprasad, leedom, nirranjan, indranil
In-Reply-To: <cover.1473667613.git.rahul.lakkireddy@chelsio.com>

On Monday, September 09/12/16, 2016 at 13:42:33 +0530, Rahul Lakkireddy wrote:
> This series of patches add support to offload TC u32 filters onto
> Chelsio NICs.
> 
> Patch 1 moves current common filter code to separate files
> in order to provide a common api for performing packet classification
> and filtering in Chelsio NICs.
> 
> Patch 2 enables filters for normal NIC configuration and implements
> common api for setting and deleting filters.
> 
> Patch 3 provides a debugfs for dumping filter information.
> 
> Patches 4-7 add support for TC u32 offload via ndo_setup_tc.
> 
> Rahul Lakkireddy (7):
>   cxgb4: move common filter code to separate file
>   cxgb4: add common api support for configuring filters
>   cxgb4: add debugfs support to dump filter debug logs
>   cxgb4: add parser to translate u32 filters to internal spec
>   cxgb4: add support for setting u32 filters
>   cxgb4: add support for deleting u32 filters
>   cxgb4: add support for drop and redirect actions
> 
>  drivers/net/ethernet/chelsio/cxgb4/Makefile        |    2 +-
>  drivers/net/ethernet/chelsio/cxgb4/cxgb4.h         |   30 +
>  drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c |    4 +-
>  drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c  | 1086 ++++++++++++++++++++
>  drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h  |   50 +
>  drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c    |  338 ++----
>  drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c  |  498 +++++++++
>  drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.h  |   57 +
>  .../ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h    |  294 ++++++
>  drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h     |   23 +-
>  drivers/net/ethernet/chelsio/cxgb4/t4_values.h     |    5 +-
>  11 files changed, 2104 insertions(+), 283 deletions(-)
>  create mode 100644 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
>  create mode 100644 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h
>  create mode 100644 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c
>  create mode 100644 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.h
>  create mode 100644 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h
> 
> -- 
> 2.5.3
> 

Thanks for the review Jiri.  Will send a v2 with necessary changes.

Thanks,
Rahul

^ permalink raw reply

* Re: [PATCH 0/9] Move runnable code (tests) from Documentation to selftests
From: Jani Nikula @ 2016-09-13  9:20 UTC (permalink / raw)
  To: Jonathan Corbet, Shuah Khan
  Cc: richardcochran, linux-doc, linux-kernel, netdev, linux-kselftest
In-Reply-To: <20160910010100.72f1a9c4@lwn.net>

On Sat, 10 Sep 2016, Jonathan Corbet <corbet@lwn.net> wrote:
> On Fri,  9 Sep 2016 16:22:41 -0600
> Shuah Khan <shuahkh@osg.samsung.com> wrote:
>
>> Move runnable code (tests) from Documentation to selftests and update
>> Makefiles to work under selftests.
>> 
>> Jon Corbet and I discussed this in an email thread and as per that
>> discussion, this patch series moves all the tests that are under the
>> Documentation directory to selftests. There is more runnable code in
>> the form of examples and utils and that is going to be another patch
>> series. I moved just the tests and left the documentation files as is.
>
> I'm fine with the idea, but it looks like a couple of tweaks are needed,
> in particular to avoid leaving behind dangling references in
> Documentation/Makefile that cause build errors.
>
> I think the individual patches probably need a wider CC list as well.
> I'd use the get_maintainer script (or git) to see who has taken an
> interest in the individual tests and make sure they are aware of the
> move.

FWIW, I'm in favor of moving *all* the code away from Documentation, not
just tests. Essentially removing the CONFIG_BUILD_DOCSRC config option,
and reserving Documentation/Makefile for documentation build. After this
series, some of the remaining code belongs under samples, some under
tools.

We could make it possible to include the code samples from samples into
the Sphinx built documentation.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Technology Center

^ permalink raw reply

* RE: [RFC 02/11] Add RoCE driver framework
From: Ram Amrani @ 2016-09-13  9:22 UTC (permalink / raw)
  To: Mark Bloch, dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	David Miller
  Cc: Yuval Mintz, Ariel Elior, Michal Kalderon, Rajesh Borundia,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev
In-Reply-To: <516b98c7-477a-4890-0d92-529dc32f2c4e-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Thanks for your comments.
See my replies in line with [Ram].



-----Original Message-----
From: Mark Bloch [mailto:markb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org] 
Sent: Monday, September 12, 2016 9:44 PM
To: Ram Amrani <Ram.Amrani-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>; dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org; David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: Yuval Mintz <Yuval.Mintz-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>; Ariel Elior <Ariel.Elior@qlogic.com>; Michal Kalderon <Michal.Kalderon-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>; Rajesh Borundia <rajesh.borundia-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; netdev <netdev-u79uwXL29TZNg+MwTxZMZA@public.gmane.orgl.org>
Subject: Re: [RFC 02/11] Add RoCE driver framework


Hi Ram,

Just a few thoughts 

On 12/09/2016 19:07, Ram Amrani wrote:
> Adds a skeletal implementation of the qed* RoCE driver - basically the 
> ability to communicate with the qede driver and receive notifications 
> from it regarding various init/exit events.
> 
> Signed-off-by: Rajesh Borundia <rajesh.borundia-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Ram Amrani <Ram.Amrani-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/infiniband/Kconfig                   |   2 +
>  drivers/infiniband/hw/Makefile               |   1 +
>  drivers/infiniband/hw/qedr/Kconfig           |   7 +
>  drivers/infiniband/hw/qedr/Makefile          |   3 +
>  drivers/infiniband/hw/qedr/main.c            | 293 +++++++++++++++++++++++++
>  drivers/infiniband/hw/qedr/qedr.h            |  60 ++++++
>  drivers/net/ethernet/qlogic/qede/Makefile    |   1 +
>  drivers/net/ethernet/qlogic/qede/qede.h      |   9 +
>  drivers/net/ethernet/qlogic/qede/qede_main.c |  35 ++-  
> drivers/net/ethernet/qlogic/qede/qede_roce.c | 309 +++++++++++++++++++++++++++
>  include/linux/qed/qed_if.h                   |   3 +-
>  include/linux/qed/qede_roce.h                |  88 ++++++++
>  include/uapi/linux/pci_regs.h                |   3 +
>  13 files changed, 803 insertions(+), 11 deletions(-)  create mode 
> 100644 drivers/infiniband/hw/qedr/Kconfig
>  create mode 100644 drivers/infiniband/hw/qedr/Makefile
>  create mode 100644 drivers/infiniband/hw/qedr/main.c  create mode 
> 100644 drivers/infiniband/hw/qedr/qedr.h  create mode 100644 
> drivers/net/ethernet/qlogic/qede/qede_roce.c
>  create mode 100644 include/linux/qed/qede_roce.h

[SNIP]

> +
> +MODULE_DESCRIPTION("QLogic 40G/100G ROCE Driver"); 
> +MODULE_AUTHOR("QLogic Corporation"); MODULE_LICENSE("Dual BSD/GPL"); 
> +MODULE_VERSION(QEDR_MODULE_VERSION);
> +
> +uint debug;
> +module_param(debug, uint, 0);
> +MODULE_PARM_DESC(debug, "Default debug msglevel");

Why are you adding this as a module parameter? 
[Ram] Yuval commented on this in a previous e-mail


> +static LIST_HEAD(qedr_dev_list);
> +static DEFINE_SPINLOCK(qedr_devlist_lock);
> +

You already have a qedr_dev_list mutex in the qede_roce.c file, why do you need this spinlock as well?

 [Ram] qedr_devlist_lock - a static (local) list of qedr devices maintained by qedr, protected by spinlock. Not in used in the current patches.
qedr_dev_list_lock (with '_') - a static (local) list of qedr devices maintained by qede, protected by mutex.
We'll consider removing the first as it is currently not used and/or rename them to be more distinct.



> +void qedr_ib_dispatch_event(struct qedr_dev *dev, u8 port_num,
> +			    enum ib_event_type type)
> +{
> +	struct ib_event ibev;
> +
> +	ibev.device = &dev->ibdev;
> +	ibev.element.port_num = port_num;
> +	ibev.event = type;
> +
> +	ib_dispatch_event(&ibev);
> +}
> +
> +static enum rdma_link_layer qedr_link_layer(struct ib_device *device,
> +					    u8 port_num)
> +{
> +	return IB_LINK_LAYER_ETHERNET;
> +}
> +
> +static int qedr_register_device(struct qedr_dev *dev) {
> +	strlcpy(dev->ibdev.name, "qedr%d", IB_DEVICE_NAME_MAX);
> +
> +	memcpy(dev->ibdev.node_desc, QEDR_NODE_DESC, sizeof(QEDR_NODE_DESC));
> +	dev->ibdev.owner = THIS_MODULE;
> +
> +	dev->ibdev.get_link_layer = qedr_link_layer;
> +
> +	return 0;
> +}
> +
> +/* QEDR sysfs interface */
> +static ssize_t show_rev(struct device *device, struct device_attribute *attr,
> +			char *buf)
> +{
> +	struct qedr_dev *dev = dev_get_drvdata(device);
> +
> +	return scnprintf(buf, PAGE_SIZE, "0x%x\n", dev->pdev->vendor); }
> +
> +static ssize_t show_fw_ver(struct device *device, struct device_attribute *attr,
> +			   char *buf)
> +{
> +	return scnprintf(buf, PAGE_SIZE, "%s\n", "FW_VER_TO_ADD"); }

Ira Weiny has added a generic way to expose firmware versions in the rdma stack, can you have please have a look at c73428230d98d1352bcc69cd8306c292a85e1e42 and see how he converted the mlx5_ib module to use it.
[Ram] This way is replaced to be the same as you describe in patch 0004. I'll if I can move it to this patch to avoid confusion.

> +static ssize_t show_hca_type(struct device *device,
> +			     struct device_attribute *attr, char *buf) {
> +	return scnprintf(buf, PAGE_SIZE, "%s\n", "HCA_TYPE_TO_SET"); }
> +
> +static DEVICE_ATTR(hw_rev, S_IRUGO, show_rev, NULL); static 
> +DEVICE_ATTR(fw_ver, S_IRUGO, show_fw_ver, NULL); static 
> +DEVICE_ATTR(hca_type, S_IRUGO, show_hca_type, NULL);
> +
> +static struct device_attribute *qedr_attributes[] = {
> +	&dev_attr_hw_rev,
> +	&dev_attr_fw_ver,
> +	&dev_attr_hca_type
> +};
> +
> +static void qedr_remove_sysfiles(struct qedr_dev *dev) {
> +	int i;
> +
> +	for (i = 0; i < ARRAY_SIZE(qedr_attributes); i++)
> +		device_remove_file(&dev->ibdev.dev, qedr_attributes[i]); }
> +
> +void qedr_config_debug(uint debug, u32 *p_dp_module, u8 *p_dp_level) 
> +{
> +	*p_dp_level = 0;
> +	*p_dp_module = 0;
> +
> +	if (debug & QED_LOG_VERBOSE_MASK) {
> +		*p_dp_level = QED_LEVEL_VERBOSE;
> +		*p_dp_module = (debug & 0x3FFFFFFF);
> +	} else if (debug & QED_LOG_INFO_MASK) {
> +		*p_dp_level = QED_LEVEL_INFO;
> +	} else if (debug & QED_LOG_NOTICE_MASK) {
> +		*p_dp_level = QED_LEVEL_NOTICE;
> +	}
> +}
> +
> +static void qedr_pci_set_atomic(struct qedr_dev *dev, struct pci_dev 
> +*pdev) {
> +	struct pci_dev *bridge;
> +	u32 val;
> +
> +	dev->atomic_cap = IB_ATOMIC_NONE;
> +
> +	bridge = pdev->bus->self;
> +	if (!bridge)
> +		return;
> +
> +	/* Check whether we are connected directly or via a switch */
> +	while (bridge && bridge->bus->parent) {
> +		DP_NOTICE(dev,
> +			  "Device is not connected directly to root. bridge->bus->number=%d primary=%d\n",
> +			  bridge->bus->number, bridge->bus->primary);
> +		/* Need to check Atomic Op Routing Supported all the way to
> +		 * root complex.
> +		 */
> +		pcie_capability_read_dword(bridge, PCI_EXP_DEVCAP2, &val);
> +		if (!(val & PCI_EXP_DEVCAP2_ATOMIC_ROUTE)) {
> +			pcie_capability_clear_word(pdev,
> +						   PCI_EXP_DEVCTL2,
> +						   PCI_EXP_DEVCTL2_ATOMIC_REQ);
> +			return;
> +		}
> +		bridge = bridge->bus->parent->self;
> +	}
> +	bridge = pdev->bus->self;
> +
> +	/* according to bridge capability */
> +	pcie_capability_read_dword(bridge, PCI_EXP_DEVCAP2, &val);
> +	if (val & PCI_EXP_DEVCAP2_ATOMIC_COMP64) {
> +		pcie_capability_set_word(pdev, PCI_EXP_DEVCTL2,
> +					 PCI_EXP_DEVCTL2_ATOMIC_REQ);
> +		dev->atomic_cap = IB_ATOMIC_GLOB;
> +	} else {
> +		pcie_capability_clear_word(pdev, PCI_EXP_DEVCTL2,
> +					   PCI_EXP_DEVCTL2_ATOMIC_REQ);
> +	}
> +}
> +
> +static struct qedr_dev *qedr_add(struct qed_dev *cdev, struct pci_dev *pdev,
> +				 struct net_device *ndev)
> +{
> +	struct qedr_dev *dev;
> +	int rc = 0, i;
> +
> +	dev = (struct qedr_dev *)ib_alloc_device(sizeof(*dev));
> +	if (!dev) {
> +		pr_err("Unable to allocate ib device\n");
> +		return NULL;
> +	}
> +
> +	qedr_config_debug(debug, &dev->dp_module, &dev->dp_level);
> +	DP_VERBOSE(dev, QEDR_MSG_INIT, "qedr add device called\n");
> +
> +	dev->pdev = pdev;
> +	dev->ndev = ndev;
> +	dev->cdev = cdev;
> +
> +	qedr_pci_set_atomic(dev, pdev);
> +
> +	rc = qedr_register_device(dev);
> +	if (rc) {
> +		DP_ERR(dev, "Unable to allocate register device\n");
> +		goto init_err;
> +	}
> +
> +	for (i = 0; i < ARRAY_SIZE(qedr_attributes); i++)
> +		if (device_create_file(&dev->ibdev.dev, qedr_attributes[i]))
> +			goto init_err;
> +
> +	spin_lock(&qedr_devlist_lock);
> +	list_add_tail_rcu(&dev->entry, &qedr_dev_list);
> +	spin_unlock(&qedr_devlist_lock);
> +
> +	DP_VERBOSE(dev, QEDR_MSG_INIT, "qedr driver loaded successfully\n");
> +	return dev;
> +
> +init_err:
> +	ib_dealloc_device(&dev->ibdev);
> +	DP_ERR(dev, "qedr driver load failed rc=%d\n", rc);
> +
> +	return NULL;
> +}
> +
> +static void qedr_remove(struct qedr_dev *dev) {
> +	/* First unregister with stack to stop all the active traffic
> +	 * of the registered clients.
> +	 */
> +	qedr_remove_sysfiles(dev);
> +
> +	spin_lock(&qedr_devlist_lock);
> +	list_del_rcu(&dev->entry);
> +	spin_unlock(&qedr_devlist_lock);
> +
> +	ib_dealloc_device(&dev->ibdev);
> +}
> +
> +static int qedr_close(struct qedr_dev *dev) {
> +	qedr_ib_dispatch_event(dev, 1, IB_EVENT_PORT_ERR);
> +

Why are you sending port number hard-coded as 1?

[Ram] Our implementation always uses one port. Here's the ibv_devinfo output for example:
hca_id:	qedr0
	transport:			InfiniBand (0)
	fw_ver:				8.10.10.0
	...
	phys_port_cnt:			1
		port:	1
			state:			PORT_ACTIVE (4)
			...
			link_layer:		Ethernet

hca_id:	qedr1
	transport:			InfiniBand (0)
	fw_ver:				8.10.10.0
	...
	phys_port_cnt:			1
		port:	1
			state:			PORT_ACTIVE (4)
			...
			link_layer:		Ethernet

Mark
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: icmpv6: issue with routing table entries from link local addresses
From: Andreas Hübner @ 2016-09-13  9:22 UTC (permalink / raw)
  To: David Ahern; +Cc: Hannes Frederic Sowa, netdev, d. caratti
In-Reply-To: <bf36b487-1cdf-ede9-1ed8-cca17c7f5fc6@cumulusnetworks.com>

On Mon, Sep 12, 2016 at 01:17:24PM -0600, David Ahern wrote:
> v4.4 and on there are fib6 tracepoints that show the lookup result.
> May provide some insights.
>
> perf record -a -e fib6:*
> perf script

Thanks for the hint, didn't now that something like this exists.

Following up on my earlier mail, I wasn't able to reproduce the issue
with more recent kernel versions. (tried 4.7)

So I guess someone must have fixed it somewhere between 3.16 and 4.7. :)
Okay, will check the git and probably try to backport it.

Again, sorry that I did not check immediately with the more recent kernel
versions. Wasn't expecting that much has changed in this area.

But my request for information with regard to the FIB data structure
still remains, since I'm curious about how it actually works.
(And I already spent some time trying to understand it.)


Thanks for your help, everyone!

Andreas

^ permalink raw reply

* Re: [PATCH 3/3] net-next: dsa: add new driver for qca8xxx family
From: John Crispin @ 2016-09-13  9:40 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: David S. Miller, Florian Fainelli, netdev, linux-kernel,
	qsdk-review
In-Reply-To: <20160913012304.GC3585@lunn.ch>



On 13/09/2016 03:23, Andrew Lunn wrote:
> So lets see if i have this right.
> 
> Port 0 has no internal phy.
> Port 1 has an internal PHY at MDIO address 0.
> Port 2 has an internal PHY at MDIO address 1.
> ...
> Port 5 has an internal PHY ad MDIO address 4.
> Port 6 has no internal PHY.

Hi Andrew

correct. port 0 is the cpu port. I initially thought that port6 can also
be used as te cpu port but there are various places in the datasheet
stating that the cpu port is 0. in some of the reference designs, port6
is wired to a 2nd gmac of the cpu and in those cases port 6 is then
hardwired to port 5 of the switch and called wan. right now the driver
does not support this feature. i have changed the code to always assume
that port is the cpu port and will send a patch later to allow the
port5/6 wan port setup once the series got accepted.

> 
> This is why you have funky port numbers, and phy_to_port.

this is legacy code from the series Matthieu posted. i agree though that
its a bit dirty. Sergey already told me that the devicetree is also bad
because of this as the unit address of the device tree node and reg
property are not aligned.

> 
> I think it would be a lot cleaner to handle this in qca8k_phy_read()
> and qca8k_phy_write(). 

ok, i will simply substract 1 from the phy_addr inside the mdio
callbacks. this would make the code more readable and make the DT
binding compliant with the ePAPR spec.

> 
> Also, the comment it a bit misleading. You are probing the PHY ID, not
> the switch ID. At least for the Marvell switches, different switches
> can have the same embedded PHY. It would be annoying to find there is
> another incompatible switch with the same PHY ID.

there is only an 8bit field inside the MASK_CTRL register (0x000) which
is 0x13. I've sent an email to QCA asking if this a unique identifier.

> Is the embedded PHY compatible with the at803x driver?

I've sent an email to QCA asking about this

	John

^ permalink raw reply

* [PATCH net-next] alx: fix error handling in __alx_open
From: Tobias Regnery @ 2016-09-13 10:06 UTC (permalink / raw)
  To: netdev, jcliburn, chris.snook; +Cc: davem, Tobias Regnery

In commit 9ee7b683ea63 we moved the enablement of msi interrupts earlier in
alx_init_intr. If there is an error in alx_alloc_rings, __alx_open returns
with an error but msi (or msi-x) interrupts stays enabled. Add a new error
label to disable msi (or msi-x) interrupts.

Fixes: 9ee7b683ea63 ("alx: refactor msi enablement and disablement")
Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
---
 drivers/net/ethernet/atheros/alx/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
index 9887cee434dd..c0f84b73574d 100644
--- a/drivers/net/ethernet/atheros/alx/main.c
+++ b/drivers/net/ethernet/atheros/alx/main.c
@@ -1028,7 +1028,7 @@ static int __alx_open(struct alx_priv *alx, bool resume)
 
 	err = alx_alloc_rings(alx);
 	if (err)
-		return err;
+		goto out_disable_adv_intr;
 
 	alx_configure(alx);
 
@@ -1049,6 +1049,8 @@ static int __alx_open(struct alx_priv *alx, bool resume)
 
 out_free_rings:
 	alx_free_rings(alx);
+out_disable_adv_intr:
+	alx_disable_advanced_intr(alx);
 	return err;
 }
 
-- 
2.7.4

^ permalink raw reply related

* Re: [RFC 02/11] Add RoCE driver framework
From: Leon Romanovsky @ 2016-09-13 10:16 UTC (permalink / raw)
  To: Mintz, Yuval
  Cc: Yuval Mintz, Mark Bloch, Ram Amrani, dledford@redhat.com,
	David Miller, Ariel Elior, Michal Kalderon, Rajesh Borundia,
	linux-rdma@vger.kernel.org, netdev
In-Reply-To: <BL2PR07MB2306937C8C495DB80DA776CA8DFE0@BL2PR07MB2306.namprd07.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1310 bytes --]

On Tue, Sep 13, 2016 at 07:18:01AM +0000, Mintz, Yuval wrote:
> >> >> +uint debug;
> >> >> +module_param(debug, uint, 0);
> > >>> +MODULE_PARM_DESC(debug, "Default debug msglevel");
> >>
> >> >Why are you adding this as a module parameter?
> >>
> >>  I believe this is mostly to follow same line as qede which also defines
> > > 'debug' module parameter for allowing easy user control of debug
> > > prints [& specifically for probe prints, which can't be controlled
> > > otherwise].
>
> > Can you give us an example where dynamic debug and tracing infrastructures
> > are not enough?
>
> > AFAIK, most of these debug module parameters are legacy copy/paste
> > code which is useless in real life scenarios.
>
> Define 'enough'; Using dynamic debug you can provide all the necessary
> information and at an even better granularity that's achieved by suggested
> infrastructure,  but is harder for an end-user to use. Same goes for tracing.
>
> The 'debug' option provides an easy grouping for prints related to a specific
> area in the driver.

It is hard to agree with you that user which knows how-to load modules
with parameters won't success to enable debug prints.

In addition, global increase in debug level for whole driver will create
printk storm in dmesg and give nothing to debuggability.

Thanks

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: [PATCH RFC 03/11] net/mlx5e: Implement RX mapped page cache for page recycle
From: Tariq Toukan via iovisor-dev @ 2016-09-13 10:16 UTC (permalink / raw)
  To: Jesper Dangaard Brouer, Saeed Mahameed
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA, iovisor-dev, Jamal Hadi Salim,
	Eric Dumazet, Tom Herbert
In-Reply-To: <20160907204501.08cc4ede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>


On 07/09/2016 9:45 PM, Jesper Dangaard Brouer wrote:
> On Wed,  7 Sep 2016 15:42:24 +0300 Saeed Mahameed <saeedm-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> wrote:
>
>> From: Tariq Toukan <tariqt-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>>
>> Instead of reallocating and mapping pages for RX data-path,
>> recycle already used pages in a per ring cache.
>>
>> We ran pktgen single-stream benchmarks, with iptables-raw-drop:
>>
>> Single stride, 64 bytes:
>> * 4,739,057 - baseline
>> * 4,749,550 - order0 no cache
>> * 4,786,899 - order0 with cache
>> 1% gain
>>
>> Larger packets, no page cross, 1024 bytes:
>> * 3,982,361 - baseline
>> * 3,845,682 - order0 no cache
>> * 4,127,852 - order0 with cache
>> 3.7% gain
>>
>> Larger packets, every 3rd packet crosses a page, 1500 bytes:
>> * 3,731,189 - baseline
>> * 3,579,414 - order0 no cache
>> * 3,931,708 - order0 with cache
>> 5.4% gain
>>
>> Signed-off-by: Tariq Toukan <tariqt-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>> Signed-off-by: Saeed Mahameed <saeedm-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>> ---
>>   drivers/net/ethernet/mellanox/mlx5/core/en.h       | 16 ++++++
>>   drivers/net/ethernet/mellanox/mlx5/core/en_main.c  | 15 ++++++
>>   drivers/net/ethernet/mellanox/mlx5/core/en_rx.c    | 57 ++++++++++++++++++++--
>>   drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 16 ++++++
>>   4 files changed, 99 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
>> index 075cdfc..afbdf70 100644
>> --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
>> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
>> @@ -287,6 +287,18 @@ struct mlx5e_rx_am { /* Adaptive Moderation */
>>   	u8					tired;
>>   };
>>   
>> +/* a single cache unit is capable to serve one napi call (for non-striding rq)
>> + * or a MPWQE (for striding rq).
>> + */
>> +#define MLX5E_CACHE_UNIT	(MLX5_MPWRQ_PAGES_PER_WQE > NAPI_POLL_WEIGHT ? \
>> +				 MLX5_MPWRQ_PAGES_PER_WQE : NAPI_POLL_WEIGHT)
>> +#define MLX5E_CACHE_SIZE	(2 * roundup_pow_of_two(MLX5E_CACHE_UNIT))
>> +struct mlx5e_page_cache {
>> +	u32 head;
>> +	u32 tail;
>> +	struct mlx5e_dma_info page_cache[MLX5E_CACHE_SIZE];
>> +};
>> +
> [...]
>>   
>> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
>> index c1cb510..8e02af3 100644
>> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
>> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
>> @@ -305,11 +305,55 @@ static inline void mlx5e_post_umr_wqe(struct mlx5e_rq *rq, u16 ix)
>>   	mlx5e_tx_notify_hw(sq, &wqe->ctrl, 0);
>>   }
>>   
>> +static inline bool mlx5e_rx_cache_put(struct mlx5e_rq *rq,
>> +				      struct mlx5e_dma_info *dma_info)
>> +{
>> +	struct mlx5e_page_cache *cache = &rq->page_cache;
>> +	u32 tail_next = (cache->tail + 1) & (MLX5E_CACHE_SIZE - 1);
>> +
>> +	if (tail_next == cache->head) {
>> +		rq->stats.cache_full++;
>> +		return false;
>> +	}
>> +
>> +	cache->page_cache[cache->tail] = *dma_info;
>> +	cache->tail = tail_next;
>> +	return true;
>> +}
>> +
>> +static inline bool mlx5e_rx_cache_get(struct mlx5e_rq *rq,
>> +				      struct mlx5e_dma_info *dma_info)
>> +{
>> +	struct mlx5e_page_cache *cache = &rq->page_cache;
>> +
>> +	if (unlikely(cache->head == cache->tail)) {
>> +		rq->stats.cache_empty++;
>> +		return false;
>> +	}
>> +
>> +	if (page_ref_count(cache->page_cache[cache->head].page) != 1) {
>> +		rq->stats.cache_busy++;
>> +		return false;
>> +	}
> Hmmm... doesn't this cause "blocking" of the page_cache recycle
> facility until the page at the head of the queue gets (page) refcnt
> decremented?  Real use-case could fairly easily block/cause this...
Hi Jesper,

That's right. We are aware of this issue.
We considered ways of solving this, but decided to keep current 
implementation for now.
One way of solving this is to look deeper in the cache.
Cons:
- this will consume time, and the chance of finding an available page is 
not that high: if the page in head of queue is busy then there's a good 
chance that all the others are too (because of FIFO).
in other words, you already checked all pages and anyway you're going to 
allocate a new one (higher penalty for same decision).
- this will make holes in the array causing complex accounting when 
looking for an available page (this can easily be fixed by swapping 
between the page in head and the available one).

Another way is sharing pages between different RQs.
- For now we're not doing this for simplicity and to keep 
synchronization away.

What do you think?

Anyway, we're looking forward to use your page-pool API which solves 
these issues.

Regards,
Tariq
>
>> +
>> +	*dma_info = cache->page_cache[cache->head];
>> +	cache->head = (cache->head + 1) & (MLX5E_CACHE_SIZE - 1);
>> +	rq->stats.cache_reuse++;
>> +
>> +	dma_sync_single_for_device(rq->pdev, dma_info->addr, PAGE_SIZE,
>> +				   DMA_FROM_DEVICE);
>> +	return true;
>> +}
>> +
>>   static inline int mlx5e_page_alloc_mapped(struct mlx5e_rq *rq,
>>   					  struct mlx5e_dma_info *dma_info)
>>   {
>> -	struct page *page = dev_alloc_page();
>> +	struct page *page;
>> +
>> +	if (mlx5e_rx_cache_get(rq, dma_info))
>> +		return 0;
>>   
>> +	page = dev_alloc_page();
>>   	if (unlikely(!page))
>>   		return -ENOMEM;

^ permalink raw reply

* Re: [RFC 00/11] QLogic RDMA Driver (qedr) RFC
From: Leon Romanovsky @ 2016-09-13 10:19 UTC (permalink / raw)
  To: Ram Amrani
  Cc: Jason Gunthorpe, dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	David Miller, Yuval Mintz, Ariel Elior, Michal Kalderon,
	Rajesh Borundia,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev
In-Reply-To: <DM3PR1101MB1181DF570D4F01A0CEB1CFC7E2FE0-xYdf0wd+uoGW1Nawvih6nR68uu4wjhmwnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2178 bytes --]

On Tue, Sep 13, 2016 at 08:44:06AM +0000, Ram Amrani wrote:
> Hi Jason,
> I see that "include/uapi/rdma" contains API that is common.
> The qedr_user.h, that I assume you are referring to, is a qedr specific API.
> For example, we issue the ib_copy_to_udata() on structures defined in the file.
> So per my understanding it is in place.

1. It will be great if you avoid from top-posting.
2. In the near future, these custom UAPI header files will be placed
under include/uapi/rdma/provider/.

>
> Thanks,
> Ram
>
>
> -----Original Message-----
> From: Jason Gunthorpe [mailto:jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org]
> Sent: Monday, September 12, 2016 9:05 PM
> To: Ram Amrani <Ram.Amrani-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
> Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org; David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>; Yuval Mintz <Yuval.Mintz-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>; Ariel Elior <Ariel.Elior-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>; Michal Kalderon <Michal.Kalderon-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>; Rajesh Borundia <rajesh.borundia-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; netdev <netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
> Subject: Re: [RFC 00/11] QLogic RDMA Driver (qedr) RFC
>
> On Mon, Sep 12, 2016 at 07:07:34PM +0300, Ram Amrani wrote:
> >  drivers/infiniband/hw/qedr/main.c              |  907 ++++++
> >  drivers/infiniband/hw/qedr/qedr.h              |  494 ++++
> >  drivers/infiniband/hw/qedr/qedr_cm.c           |  626 +++++
> >  drivers/infiniband/hw/qedr/qedr_cm.h           |   61 +
> >  drivers/infiniband/hw/qedr/qedr_hsi.h          |   56 +
> >  drivers/infiniband/hw/qedr/qedr_hsi_rdma.h     |  748 +++++
> >  drivers/infiniband/hw/qedr/qedr_user.h         |   80 +
>
> We are requiring new uAPI headers are placed under include/uapi/rdma/, please coordinate with Leon on the path.
>
> Jason
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: [RFC 02/11] Add RoCE driver framework
From: Leon Romanovsky @ 2016-09-13 10:22 UTC (permalink / raw)
  To: Ram Amrani
  Cc: Mark Bloch, dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	David Miller, Yuval Mintz, Ariel Elior, Michal Kalderon,
	Rajesh Borundia,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev
In-Reply-To: <DM3PR1101MB1181337A65B7CEFC1A30F353E2FE0-xYdf0wd+uoGW1Nawvih6nR68uu4wjhmwnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 228 bytes --]

On Tue, Sep 13, 2016 at 09:22:04AM +0000, Ram Amrani wrote:
> Thanks for your comments.
> See my replies in line with [Ram].

Please configure your email client
https://www.kernel.org/doc/Documentation/email-clients.txt

Thanks

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: [RFC 00/11] QLogic RDMA Driver (qedr) RFC
From: Leon Romanovsky @ 2016-09-13 10:39 UTC (permalink / raw)
  To: Mintz, Yuval
  Cc: Yuval Mintz, Parav Pandit, Ram Amrani, Doug Ledford, David Miller,
	Ariel Elior, Michal Kalderon, Rajesh Borundia,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev
In-Reply-To: <BL2PR07MB23064356EA2492675AC980A78DFE0-I6Fv6QFlT9L2NWYWB7JgfuFPX92sqiQdvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1561 bytes --]

On Tue, Sep 13, 2016 at 06:48:00AM +0000, Mintz, Yuval wrote:
> >> While this might work, I personally dislike it as I find it
> >> counter-intuitive when going over the code -
> >> I don't expect driver to locally modify the inclusion path.
> >> Besides, we're going to [eventually] a whole suite of drivers based
> >> on the qed module, some of which would reside under drivers/scsi;
> >> Not sure it's best to have 3 or 4 different drivers privately include the
> >> same directory under a different subsystem.
>
> > I agree with you that orcdma's way can be valuable for small drivers.
>
> > Orcmda has small shared headers set and doesn't need to change them rapidly
> > to support different devices.
>
> > I thought to place them in similar directory to include/soc/* and remove
> > from include/linux/. We have include/rdma/ and it looks like a good
> > candidate.
>
> I'm perfectly fine with relocating those to a different directory under include/,
> although using 'rdma' doesn't sound like a good fit [as the headers would be
> included by ethernet, scsi and rdma drivers].
> Are there good existing alternatives?

There is nothing that I can name.

>
> Regardless, I don't believe this should be part of the initial submission,
> as it would involve in relocating existing networking headers as well.
> I think we can move those at leisure later on.

Sure, it is good time and context to discuss, but orthogonal to this
submission.

>
> [We're in the middle of transitioning our e-mails from qlogic -> cavium,
> so sorry if things become corrupted]

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* [PATCH net-next v2 0/5] cxgb4: add support for offloading TC u32 filters
From: Rahul Lakkireddy @ 2016-09-13 11:42 UTC (permalink / raw)
  To: netdev; +Cc: davem, hariprasad, leedom, nirranjan, indranil, Rahul Lakkireddy

This series of patches add support to offload TC u32 filters onto
Chelsio NICs.

Patch 1 moves current common filter code to separate files
in order to provide a common api for performing packet classification
and filtering in Chelsio NICs.

Patch 2 enables filters for normal NIC configuration and implements
common api for setting and deleting filters.

Patches 3-5 add support for TC u32 offload via ndo_setup_tc.

---
v2:
Based on review and suggestions from Jiri Pirko <jiri@resnulli.us>:
- Replaced macros S and U with appropriate static helper functions.
- Moved completion code for set and delete filters to respective
  functions cxgb4_set_filter() and cxgb4_del_filter().  Renamed the
  original functions to __cxgb4_set_filter() and __cxgb4_del_filter()
  in case synchronization is not required.
- Dropped debugfs patch.
- Merged code for inserting and deleting u32 filters into a single
  patch.
- Reworked and fixed bugs with traversing the actions list.
- Removed all unnecessary extra ().

Rahul Lakkireddy (5):
  cxgb4: move common filter code to separate file
  cxgb4: add common api support for configuring filters
  cxgb4: add parser to translate u32 filters to internal spec
  cxgb4: add support for offloading u32 filters
  cxgb4: add support for drop and redirect actions

 drivers/net/ethernet/chelsio/cxgb4/Makefile        |   2 +-
 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h         |  29 +
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c  | 722 +++++++++++++++++++++
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h  |  48 ++
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c    | 338 ++--------
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c  | 485 ++++++++++++++
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.h  |  57 ++
 .../ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h    | 294 +++++++++
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.h     |  26 +-
 9 files changed, 1720 insertions(+), 281 deletions(-)
 create mode 100644 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
 create mode 100644 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.h
 create mode 100644 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c
 create mode 100644 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.h
 create mode 100644 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32_parse.h

-- 
2.5.3

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox