From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 1021A5588 for ; Tue, 3 Jan 2017 15:33:17 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 03 Jan 2017 06:33:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,455,1477983600"; d="scan'208";a="25596955" Received: from kmsmsx152.gar.corp.intel.com ([172.21.73.87]) by orsmga002.jf.intel.com with ESMTP; 03 Jan 2017 06:33:16 -0800 Received: from pgsmsx106.gar.corp.intel.com ([169.254.9.2]) by KMSMSX152.gar.corp.intel.com ([169.254.11.37]) with mapi id 14.03.0248.002; Tue, 3 Jan 2017 22:33:15 +0800 From: "Dai, Wei" To: "Zhao1, Wei" , "dev@dpdk.org" CC: "Lu, Wenzhuo" , "Zhao1, Wei" Thread-Topic: [dpdk-dev] [PATCH v2 01/18] net/ixgbe: store SYN filter Thread-Index: AQHSYnKX7OTCm6h93UmeQa2beRXcgaEm1p8g Date: Tue, 3 Jan 2017 14:33:14 +0000 Message-ID: <49759EB36A64CF4892C1AFEC9231E8D63A322663@PGSMSX106.gar.corp.intel.com> References: <1483084390-53159-1-git-send-email-wei.zhao1@intel.com> <1483084390-53159-2-git-send-email-wei.zhao1@intel.com> In-Reply-To: <1483084390-53159-2-git-send-email-wei.zhao1@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjFlYjI3OGMtMTA1Yi00ZWFjLWFlYjEtNmEwMjg4NWY1ZTlhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImNkZ0srWjMwdnhiY0NKbWt6ZmJwY1hzM1hmdncwdnFvT0NZQ1dDbExSOVE9In0= x-ctpclassification: CTP_IC x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 01/18] net/ixgbe: store SYN filter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 14:33:18 -0000 Hi, Wei Zhao=20 I think that you had better give a cover letter for such a series of patche= s. You can give the changes between v2 and v1 in cover letter=20 and maybe no need describe it in each one. Thanks &Best Regards -Wei > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wei Zhao > Sent: Friday, December 30, 2016 3:53 PM > To: dev@dpdk.org > Cc: Lu, Wenzhuo ; Zhao1, Wei > Subject: [dpdk-dev] [PATCH v2 01/18] net/ixgbe: store SYN filter >=20 > Add support for storing SYN filter in SW. >=20 > Signed-off-by: Wenzhuo Lu > Signed-off-by: Wei Zhao > --- >=20 > v2: > --synqf assignment location change > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 14 +++++++++++--- > drivers/net/ixgbe/ixgbe_ethdev.h | 2 ++ > 2 files changed, 13 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c > b/drivers/net/ixgbe/ixgbe_ethdev.c > index a25bac8..316e560 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -1274,6 +1274,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev) > memset(filter_info->fivetuple_mask, 0, > sizeof(uint32_t) * IXGBE_5TUPLE_ARRAY_SIZE); >=20 > + /* initialize SYN filter */ > + filter_info->syn_info =3D 0; > return 0; > } >=20 > @@ -5580,15 +5582,18 @@ ixgbe_syn_filter_set(struct rte_eth_dev *dev, > bool add) > { > struct ixgbe_hw *hw =3D > IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > + struct ixgbe_filter_info *filter_info =3D > + IXGBE_DEV_PRIVATE_TO_FILTER_INFO(dev->data->dev_private); > + uint32_t syn_info; > uint32_t synqf; >=20 > if (filter->queue >=3D IXGBE_MAX_RX_QUEUE_NUM) > return -EINVAL; >=20 > - synqf =3D IXGBE_READ_REG(hw, IXGBE_SYNQF); > + syn_info =3D filter_info->syn_info; >=20 > if (add) { > - if (synqf & IXGBE_SYN_FILTER_ENABLE) > + if (syn_info & IXGBE_SYN_FILTER_ENABLE) > return -EINVAL; > synqf =3D (uint32_t)(((filter->queue << > IXGBE_SYN_FILTER_QUEUE_SHIFT) & > IXGBE_SYN_FILTER_QUEUE) | IXGBE_SYN_FILTER_ENABLE); > @@ -5598,10 +5603,13 @@ ixgbe_syn_filter_set(struct rte_eth_dev *dev, > else > synqf &=3D ~IXGBE_SYN_FILTER_SYNQFP; > } else { > - if (!(synqf & IXGBE_SYN_FILTER_ENABLE)) > + synqf =3D IXGBE_READ_REG(hw, IXGBE_SYNQF); > + if (!(syn_info & IXGBE_SYN_FILTER_ENABLE)) > return -ENOENT; > synqf &=3D ~(IXGBE_SYN_FILTER_QUEUE | > IXGBE_SYN_FILTER_ENABLE); > } > + > + filter_info->syn_info =3D synqf; > IXGBE_WRITE_REG(hw, IXGBE_SYNQF, synqf); > IXGBE_WRITE_FLUSH(hw); > return 0; > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h > b/drivers/net/ixgbe/ixgbe_ethdev.h > index 4ff6338..827026c 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.h > +++ b/drivers/net/ixgbe/ixgbe_ethdev.h > @@ -262,6 +262,8 @@ struct ixgbe_filter_info { > /* Bit mask for every used 5tuple filter */ > uint32_t fivetuple_mask[IXGBE_5TUPLE_ARRAY_SIZE]; > struct ixgbe_5tuple_filter_list fivetuple_list; > + /* store the SYN filter info */ > + uint32_t syn_info; > }; >=20 > /* > -- > 2.5.5