From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Kirsher Subject: Re: [PATCH v2 net] ixgbe: fix parsing of TC actions for HW offload Date: Thu, 31 May 2018 14:46:08 -0700 Message-ID: References: <20180531212104.23572-1-ohlavaty@redhat.com> Reply-To: jeffrey.t.kirsher@intel.com Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-gtW4mTbqgH8s71P6Kbz4" Cc: netdev@vger.kernel.org, Andrew Bowers To: =?UTF-8?Q?Ond=C5=99ej_Hlavat=C3=BD?= Return-path: Received: from mga17.intel.com ([192.55.52.151]:58880 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750737AbeEaVog (ORCPT ); Thu, 31 May 2018 17:44:36 -0400 In-Reply-To: <20180531212104.23572-1-ohlavaty@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: --=-gtW4mTbqgH8s71P6Kbz4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2018-05-31 at 23:21 +0200, Ond=C5=99ej Hlavat=C3=BD wrote: > The previous code was optimistic, accepting the offload of whole > action > chain when there was a single known action (drop/redirect). This > results > in offloading a rule which should not be offloaded, because its > behavior > cannot be reproduced in the hardware. >=20 > For example: >=20 > $ tc filter add dev eno1 parent ffff: protocol ip \ > u32 ht 800: order 1 match tcp src 42 FFFF \ > action mirred egress mirror dev enp1s16 pipe \ > drop >=20 > The controller is unable to mirror the packet to a VF, but still > offloads the rule by dropping the packet. >=20 > Change the approach of the function to a pessimistic one, rejecting > the > chain when an unknown action is found. This is better suited for > future > extensions. >=20 > Note that both recognized actions always return TC_ACT_SHOT, > therefore > it is safe to ignore actions behind them. >=20 > Signed-off-by: Ond=C5=99ej Hlavat=C3=BD Signed-off-by: Jeff Kirsher Note- I am having our validation move to testing with GCC 8.1.1 or later so that we can catch warnings like Dave found in the future. Dave- Please go ahead and pick this up. --=-gtW4mTbqgH8s71P6Kbz4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiTyZWz+nnTrOJ1LZ5W/vlVpL7c4FAlsQbSAACgkQ5W/vlVpL 7c7WAg//XLoNH7fkcUcroCiQjp8xBjMd335nSpl1eF7xRgVIaaJVLMv4968DphGt 466Rrm6AVRY7vh78KvYGScDu7fdGvDxZRYD8QBsFwkRoNM1/eIBlyYXUc6ZAb35w sL0mt9LDAUmhBHtFBnNby2LrkJkuAXWSrymBlC6KKdlHjaTdXxSJFHO8NE5OyGIN nRixWjHNgI+cXJau+RDW8wHG/H9mZY5NcPxhXe9TnafDfj80QHRFnhpnBgranYqV VLCMUAxZ56VGpDhLYDaJx3qa/TYb6cX7DE7jv+nuKjOfp9k3DDKMgjfgZD90TsL3 LMHiUKFv3P0dIAmeNYYKHMW2d3fYLbp49/s7omjcUwNCOeEkHZSdkjLK+x6PlZox KKJrwBcj23X0KNyfBDItJWHwxPWwhkBS6PQM0u7aN6GrumgiyDJFAKbZPVSZ1CRH UQsxLhbbWPKk1jGEwgF9lOJR27hPtRa6/UObDmTfuU8qrlMJ9ijn3LCYGaSmK6xm GNYgVifb8nzULi67vKI40dVHvFOJ/5J2V45ehDePDyrw8+8KQqwsjKnbI3zwdAo6 RgBLz/gb5zj/gX+SDcwgm5Ua6vJG9WqyyjMw4ptTaHKq4OEyH8UxH4MCbh1Snv5c D76oWXCkYlJ/xOw1vF49Kg+tKIdX+DZRMWTeicFb6LLN6q6ujRM= =uL92 -----END PGP SIGNATURE----- --=-gtW4mTbqgH8s71P6Kbz4--