From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 01EA9374F; Wed, 19 Jul 2017 06:12:45 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jul 2017 21:12:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,379,1496127600"; d="scan'208";a="288622154" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 18 Jul 2017 21:12:43 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 18 Jul 2017 21:12:43 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.116]) by shsmsx102.ccr.corp.intel.com ([169.254.2.146]) with mapi id 14.03.0319.002; Wed, 19 Jul 2017 12:12:40 +0800 From: "Zhang, Qi Z" To: "Zhao1, Wei" , "Lu, Wenzhuo" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/ixgbe: fix sctp port support limitation Thread-Index: AQHTACj0qUOxag1pR0+lpsTUjnQR+6JZ/TKAgACM5zA= Date: Wed, 19 Jul 2017 04:12:39 +0000 Message-ID: <039ED4275CED7440929022BC67E70611530BB17A@SHSMSX103.ccr.corp.intel.com> References: <20170719083917.63441-1-qi.z.zhang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: fix sctp port support limitation 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: Wed, 19 Jul 2017 04:12:46 -0000 Ok, will submit v2 and rebase on your patch. > -----Original Message----- > From: Zhao1, Wei > Sent: Wednesday, July 19, 2017 11:48 AM > To: Zhang, Qi Z ; Lu, Wenzhuo > Cc: dev@dpdk.org; Zhang, Qi Z ; stable@dpdk.org > Subject: RE: [dpdk-dev] [PATCH] net/ixgbe: fix sctp port support limitati= on >=20 > Hi, zhangqi > 82599 also support SCTP packet type, you can reference to this patch: > http://dpdk.org/dev/patchwork/patch/27012/ >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qi Zhang > > Sent: Wednesday, July 19, 2017 4:39 PM > > To: Lu, Wenzhuo > > Cc: dev@dpdk.org; Zhang, Qi Z ; stable@dpdk.org > > Subject: [dpdk-dev] [PATCH] net/ixgbe: fix sctp port support > > limitation > > > > Only x550 family support sctp port in fdir filter, so add this > > limiation when parse consistent API. > > > > Fixes: 11777435c727 ("net/ixgbe: parse flow director filter") > > Cc: stable@dpdk.org > > > > Signed-off-by: Qi Zhang > > --- > > drivers/net/ixgbe/ixgbe_flow.c | 107 > > ++++++++++++++++++++++++--------- > > -------- > > 1 file changed, 64 insertions(+), 43 deletions(-) > > > > diff --git a/drivers/net/ixgbe/ixgbe_flow.c > > b/drivers/net/ixgbe/ixgbe_flow.c index f70bdb0..4b5697a 100644 > > --- a/drivers/net/ixgbe/ixgbe_flow.c > > +++ b/drivers/net/ixgbe/ixgbe_flow.c > > @@ -1375,7 +1375,8 @@ static inline uint8_t signature_match(const > > struct rte_flow_item pattern[]) > > * Item->last should be NULL. > > */ > > static int > > -ixgbe_parse_fdir_filter_normal(const struct rte_flow_attr *attr, > > +ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev, > > + const struct rte_flow_attr *attr, > > const struct rte_flow_item pattern[], > > const struct rte_flow_action actions[], > > struct ixgbe_fdir_rule *rule, @@ -1398,9 +1399,10 > @@ > > ixgbe_parse_fdir_filter_normal(const struct rte_flow_attr *attr, > > const struct rte_flow_item_vlan *vlan_mask; > > const struct rte_flow_item_raw *raw_mask; > > const struct rte_flow_item_raw *raw_spec; > > - > > uint8_t j; > > > > + struct ixgbe_hw *hw =3D IXGBE_DEV_PRIVATE_TO_HW(dev->data- > > >dev_private); > > + > > if (!pattern) { > > rte_flow_error_set(error, EINVAL, > > RTE_FLOW_ERROR_TYPE_ITEM_NUM, > > @@ -1897,49 +1899,68 @@ ixgbe_parse_fdir_filter_normal(const struct > > rte_flow_attr *attr, > > item, "Not supported last point for range"); > > return -rte_errno; > > } > > - /** > > - * Only care about src & dst ports, > > - * others should be masked. > > - */ > > - if (!item->mask) { > > - memset(rule, 0, sizeof(struct ixgbe_fdir_rule)); > > - rte_flow_error_set(error, EINVAL, > > - RTE_FLOW_ERROR_TYPE_ITEM, > > - item, "Not supported by fdir filter"); > > - return -rte_errno; > > - } > > - rule->b_mask =3D TRUE; > > - sctp_mask =3D > > - (const struct rte_flow_item_sctp *)item->mask; > > - if (sctp_mask->hdr.tag || > > - sctp_mask->hdr.cksum) { > > - memset(rule, 0, sizeof(struct ixgbe_fdir_rule)); > > - rte_flow_error_set(error, EINVAL, > > - RTE_FLOW_ERROR_TYPE_ITEM, > > - item, "Not supported by fdir filter"); > > - return -rte_errno; > > - } > > - rule->mask.src_port_mask =3D sctp_mask->hdr.src_port; > > - rule->mask.dst_port_mask =3D sctp_mask->hdr.dst_port; > > > > - if (item->spec) { > > - rule->b_spec =3D TRUE; > > - sctp_spec =3D > > + /* only x550 family support sctp port */ > > + if (hw->mac.type =3D=3D ixgbe_mac_X550 || > > + hw->mac.type =3D=3D ixgbe_mac_X550EM_x || > > + hw->mac.type =3D=3D ixgbe_mac_X550EM_a) { > > + /** > > + * Only care about src & dst ports, > > + * others should be masked. > > + */ > > + if (!item->mask) { > > + memset(rule, 0, sizeof(struct > > ixgbe_fdir_rule)); > > + rte_flow_error_set(error, EINVAL, > > + RTE_FLOW_ERROR_TYPE_ITEM, > > + item, "Not supported by fdir filter"); > > + return -rte_errno; > > + } > > + rule->b_mask =3D TRUE; > > + sctp_mask =3D > > + (const struct rte_flow_item_sctp *)item- > > >mask; > > + if (sctp_mask->hdr.tag || > > + sctp_mask->hdr.cksum) { > > + memset(rule, 0, sizeof(struct > > ixgbe_fdir_rule)); > > + rte_flow_error_set(error, EINVAL, > > + RTE_FLOW_ERROR_TYPE_ITEM, > > + item, "Not supported by fdir filter"); > > + return -rte_errno; > > + } > > + rule->mask.src_port_mask =3D sctp_mask- > > >hdr.src_port; > > + rule->mask.dst_port_mask =3D sctp_mask- > > >hdr.dst_port; > > + > > + if (item->spec) { > > + rule->b_spec =3D TRUE; > > + sctp_spec =3D > > (const struct rte_flow_item_sctp *)item- > > >spec; > > - rule->ixgbe_fdir.formatted.src_port =3D > > - sctp_spec->hdr.src_port; > > - rule->ixgbe_fdir.formatted.dst_port =3D > > - sctp_spec->hdr.dst_port; > > - } > > + rule->ixgbe_fdir.formatted.src_port =3D > > + sctp_spec->hdr.src_port; > > + rule->ixgbe_fdir.formatted.dst_port =3D > > + sctp_spec->hdr.dst_port; > > + } > > > > - item =3D next_no_fuzzy_pattern(pattern, item); > > - if (item->type !=3D RTE_FLOW_ITEM_TYPE_RAW && > > - item->type !=3D RTE_FLOW_ITEM_TYPE_END) { > > - memset(rule, 0, sizeof(struct ixgbe_fdir_rule)); > > - rte_flow_error_set(error, EINVAL, > > - RTE_FLOW_ERROR_TYPE_ITEM, > > - item, "Not supported by fdir filter"); > > - return -rte_errno; > > + item =3D next_no_fuzzy_pattern(pattern, item); > > + if (item->type !=3D RTE_FLOW_ITEM_TYPE_RAW && > > + item->type !=3D RTE_FLOW_ITEM_TYPE_END) { > > + memset(rule, 0, sizeof(struct > > ixgbe_fdir_rule)); > > + rte_flow_error_set(error, EINVAL, > > + RTE_FLOW_ERROR_TYPE_ITEM, > > + item, "Not supported by fdir filter"); > > + return -rte_errno; > > + } > > + } else { > > + /* sctp port is not supported */ > > + sctp_mask =3D > > + (const struct rte_flow_item_sctp *)item- > > >mask; > > + if (sctp_mask && > > + (sctp_mask->hdr.src_port || > > + sctp_mask->hdr.dst_port)) { > > + memset(rule, 0, sizeof(struct > > ixgbe_fdir_rule)); > > + rte_flow_error_set(error, EINVAL, > > + RTE_FLOW_ERROR_TYPE_ITEM, > > + item, "Not supported by fdir filter"); > > + return -rte_errno; > > + } > > } > > } > > > > @@ -2528,7 +2549,7 @@ ixgbe_parse_fdir_filter(struct rte_eth_dev *dev, > > hw->mac.type !=3D ixgbe_mac_X550EM_a) > > return -ENOTSUP; > > > > - ret =3D ixgbe_parse_fdir_filter_normal(attr, pattern, > > + ret =3D ixgbe_parse_fdir_filter_normal(dev, attr, pattern, > > actions, rule, error); > > > > if (!ret) > > -- > > 2.9.4