All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [FIXUP PATCH 0/2] fixup patches for warnings in queue
@ 2017-02-06 22:38 Jacob Keller
  2017-02-06 22:38 ` [Intel-wired-lan] [FIXUP PATCH 1/2] fixup! i40e: Introduce VF Port Representator(VFPR) netdevs Jacob Keller
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jacob Keller @ 2017-02-06 22:38 UTC (permalink / raw)
  To: intel-wired-lan

The following two patches are fixup/squash patches that should be rolled
into the relevant patches on the queue, to resolve some compile warnings
found while working on the flexible byte ntuple ethtool interface.

Please do not send these directly. If the relevant patch was already
merged, let me know so I can roll them as proper fixes. Otherwise,
please ensure these fixes land in the original work before it is pulled.

Jacob Keller (2):
  fixup! i40e: Introduce VF Port Representator(VFPR) netdevs
  fixup! i40e: Add support for exposing VF port statistics via VFPR
    netdev on the host

 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.12.0.rc0.151.g8a5726c42288


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Intel-wired-lan] [FIXUP PATCH 1/2] fixup! i40e: Introduce VF Port Representator(VFPR) netdevs
  2017-02-06 22:38 [Intel-wired-lan] [FIXUP PATCH 0/2] fixup patches for warnings in queue Jacob Keller
@ 2017-02-06 22:38 ` Jacob Keller
  2017-02-07  6:30   ` Samudrala, Sridhar
  2017-02-06 22:38 ` [Intel-wired-lan] [PATCH 1/1] i40e: document drivers use of ntuple filters Jacob Keller
  2017-02-06 22:38 ` [Intel-wired-lan] [FIXUP PATCH 2/2] fixup! i40e: Add support for exposing VF port statistics via VFPR netdev on the host Jacob Keller
  2 siblings, 1 reply; 7+ messages in thread
From: Jacob Keller @ 2017-02-06 22:38 UTC (permalink / raw)
  To: intel-wired-lan

This fixes a warning in commit 6dc77d828f1a ("i40e: Introduce VF Port
Representator(VFPR) netdevs", 2017-01-31).

Jeff please squash this fix into the mentioned patch, or have the
original author re-roll the patch.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index a970ba3a86b1..9efecff9c535 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -1204,7 +1204,7 @@ static const struct switchdev_ops i40e_vfpr_switchdev_ops = {
  *
  * add/delete VFs broadcast filter
  **/
-void i40e_update_vf_broadcast_filter(struct i40e_vf *vf, bool enable)
+static void i40e_update_vf_broadcast_filter(struct i40e_vf *vf, bool enable)
 {
 	struct i40e_pf *pf = vf->pf;
 	struct i40e_vsi *vsi = pf->vsi[vf->lan_vsi_idx];
-- 
2.12.0.rc0.151.g8a5726c42288


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Intel-wired-lan] [PATCH 1/1] i40e: document drivers use of ntuple filters
  2017-02-06 22:38 [Intel-wired-lan] [FIXUP PATCH 0/2] fixup patches for warnings in queue Jacob Keller
  2017-02-06 22:38 ` [Intel-wired-lan] [FIXUP PATCH 1/2] fixup! i40e: Introduce VF Port Representator(VFPR) netdevs Jacob Keller
@ 2017-02-06 22:38 ` Jacob Keller
  2017-02-06 22:38 ` [Intel-wired-lan] [FIXUP PATCH 2/2] fixup! i40e: Add support for exposing VF port statistics via VFPR netdev on the host Jacob Keller
  2 siblings, 0 replies; 7+ messages in thread
From: Jacob Keller @ 2017-02-06 22:38 UTC (permalink / raw)
  To: intel-wired-lan

Add documentation describing the drivers use of ethtool ntuple filters,
including the limitations that it has due to hardware, as well as how it
reads and parses the user-def data block.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
 Documentation/networking/i40e.txt | 72 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/Documentation/networking/i40e.txt b/Documentation/networking/i40e.txt
index a251bf4fe9c9..57e616ed10b0 100644
--- a/Documentation/networking/i40e.txt
+++ b/Documentation/networking/i40e.txt
@@ -63,6 +63,78 @@ Additional Configurations
   The latest release of ethtool can be found from
   https://www.kernel.org/pub/software/network/ethtool
 
+
+  Flow Director n-ntuple traffic filters (FDir)
+  ---------------------------------------------
+  The driver utilizes the ethtool interface for configuring ntuple filters,
+  via "ethtool -N <device> <filter>".
+
+  The sctp4, ip4, udp4, and tcp4 flow types are supported with the standard
+  fields including src-ip, dst-ip, src-port and dst-port. The driver only
+  supports fully enabling or fully masking the fields, so use of the mask
+  fields for partial matches is not supported.
+
+  Additionally, the driver supports using the action to specify filters for a
+  Virtual Function. You can specify the action as a 64bit value, where the
+  lower 32 bits represents the queue number, while the next 8 bits represent
+  which VF. Note that 0 is the PF, so the VF identifier is offset by 1. For
+  example:
+
+    ... action 0x800000002 ...
+
+  Would indicate to direct traffic for Virtual Function 7 (8 minus 1) on queue
+  2 of that VF.
+
+  The driver also supports using the user-defined field to specify 2 bytes of
+  arbitrary data to match within the packet payload in addition to the regular
+  fields. The data is specified in the lower 32bits of the user-def field in
+  the following way:
+
+  +----------------------------+---------------------------+
+  | 31    28    24    20    16 | 15    12     8     4     0|
+  +----------------------------+---------------------------+
+  | offset into packet payload |  2 bytes of flexible data |
+  +----------------------------+---------------------------+
+
+  As an example,
+
+    ... user-def 0x4FFFF ....
+
+  means to match the value 0xFFFF 4 bytes into the packet payload. Note that
+  the offset is based on the beginning of the payload, and not the beginning
+  of the packet. Thus
+
+    flow-type tcp4 ... user-def 0x8BEAF ....
+
+  would match TCP/IPv4 packets which have the value 0xBEAF 8bytes into the
+  TCP/IPv4 payload.
+
+  For ICMP, the hardware parses the ICMP header as 4 bytes of header and 4
+  bytes of payload, so if you want to match an ICMP frames payload you may need
+  to add 4 to the offset in order to match the data.
+
+  Furthermore, the offset can only be up to a value of 64, as the hardware
+  will only read up to 64 bytes of data from the payload. It must also be even
+  as the flexible data is 2 bytes long and must be aligned to byte 0 of the
+  packet payload.
+
+  When programming filters, the hardware is limited to using a single input
+  set for each flow type. This means that it is an error to program two
+  different filters with the same type that don't match on the same fields.
+  Thus the second of the following two commands will fail:
+
+    ethtool -N <device> flow-type tcp4 src-ip 192.168.0.7 action 5
+    ethtool -N <device> flow-type tcp4 dst-ip 192.168.15.18 action 1
+
+  This is because the first filter will be accepted and reprogram the input
+  set for TCPv4 filters, but the second filter will be unable to reprogram the
+  input set until all the conflicting TCPv4 filters are first removed.
+
+  Note that the user-defined flexible offset is also considered part of the
+  input set and cannot be programmed separately for multiple filters of the
+  same type. However, the flexible data is not part of the input set and
+  multiple filters may use the same offset but match against different data.
+
   Data Center Bridging (DCB)
   --------------------------
   DCB configuration is not currently supported.
-- 
2.12.0.rc0.151.g8a5726c42288


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Intel-wired-lan] [FIXUP PATCH 2/2] fixup! i40e: Add support for exposing VF port statistics via VFPR netdev on the host
  2017-02-06 22:38 [Intel-wired-lan] [FIXUP PATCH 0/2] fixup patches for warnings in queue Jacob Keller
  2017-02-06 22:38 ` [Intel-wired-lan] [FIXUP PATCH 1/2] fixup! i40e: Introduce VF Port Representator(VFPR) netdevs Jacob Keller
  2017-02-06 22:38 ` [Intel-wired-lan] [PATCH 1/1] i40e: document drivers use of ntuple filters Jacob Keller
@ 2017-02-06 22:38 ` Jacob Keller
  2017-02-07  6:35   ` Samudrala, Sridhar
  2 siblings, 1 reply; 7+ messages in thread
From: Jacob Keller @ 2017-02-06 22:38 UTC (permalink / raw)
  To: intel-wired-lan

This fixes a compiler warning in commit abc0e7634722 ("i40e: Add support
for exposing VF port statistics via VFPR netdev on the host",
2017-01-31) which is caused by a function that should have been marked
as static.

Jeff, please squash this patch into the given commit, or have the
original author re-roll his patch to fix the warning.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 9efecff9c535..2686ddd65618 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -1062,7 +1062,7 @@ static int i40e_vfpr_netdev_stop(struct net_device *dev)
  *
  * Fills the hw statistics from the VSI corresponding to the associated VFPR
  **/
-void
+static void
 i40e_vfpr_netdev_get_stats64(struct net_device *netdev,
 			     struct rtnl_link_stats64 *stats)
 {
-- 
2.12.0.rc0.151.g8a5726c42288


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Intel-wired-lan] [FIXUP PATCH 1/2] fixup! i40e: Introduce VF Port Representator(VFPR) netdevs
  2017-02-06 22:38 ` [Intel-wired-lan] [FIXUP PATCH 1/2] fixup! i40e: Introduce VF Port Representator(VFPR) netdevs Jacob Keller
@ 2017-02-07  6:30   ` Samudrala, Sridhar
  0 siblings, 0 replies; 7+ messages in thread
From: Samudrala, Sridhar @ 2017-02-07  6:30 UTC (permalink / raw)
  To: intel-wired-lan



On 2/6/2017 2:38 PM, Jacob Keller wrote:
> This fixes a warning in commit 6dc77d828f1a ("i40e: Introduce VF Port
> Representator(VFPR) netdevs", 2017-01-31).
>
> Jeff please squash this fix into the mentioned patch, or have the
> original author re-roll the patch.
>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Sridhar Samudrala <sridhar.samudrala@intel.com>

> ---
>   drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> index a970ba3a86b1..9efecff9c535 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> @@ -1204,7 +1204,7 @@ static const struct switchdev_ops i40e_vfpr_switchdev_ops = {
>    *
>    * add/delete VFs broadcast filter
>    **/
> -void i40e_update_vf_broadcast_filter(struct i40e_vf *vf, bool enable)
> +static void i40e_update_vf_broadcast_filter(struct i40e_vf *vf, bool enable)
>   {
>   	struct i40e_pf *pf = vf->pf;
>   	struct i40e_vsi *vsi = pf->vsi[vf->lan_vsi_idx];


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Intel-wired-lan] [FIXUP PATCH 2/2] fixup! i40e: Add support for exposing VF port statistics via VFPR netdev on the host
  2017-02-06 22:38 ` [Intel-wired-lan] [FIXUP PATCH 2/2] fixup! i40e: Add support for exposing VF port statistics via VFPR netdev on the host Jacob Keller
@ 2017-02-07  6:35   ` Samudrala, Sridhar
  2017-02-07 17:46     ` Keller, Jacob E
  0 siblings, 1 reply; 7+ messages in thread
From: Samudrala, Sridhar @ 2017-02-07  6:35 UTC (permalink / raw)
  To: intel-wired-lan

On 2/6/2017 2:38 PM, Jacob Keller wrote:
> This fixes a compiler warning in commit abc0e7634722 ("i40e: Add support
> for exposing VF port statistics via VFPR netdev on the host",
> 2017-01-31) which is caused by a function that should have been marked
> as static.
>
> Jeff, please squash this patch into the given commit, or have the
> original author re-roll his patch to fix the warning.
>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Sridhar Samudrala <sridhar.samudrala@intel.com>

Jeff, Along with this patch, can you also squash this patch into this 
commit to fix percpu related
warning messages.

diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
index 52ba9d5..7ddce0d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
@@ -85,7 +85,7 @@ struct vfpr_pcpu_stats {
  struct i40e_vfpr_netdev_priv {
         struct metadata_dst *vfpr_dst;
         struct i40e_vf *vf;
-       struct vfpr_pcpu_stats *vfpr_stats;
+       struct vfpr_pcpu_stats __percpu *vfpr_stats;
  };

  /* VF information structure */


> ---
>   drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> index 9efecff9c535..2686ddd65618 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> @@ -1062,7 +1062,7 @@ static int i40e_vfpr_netdev_stop(struct net_device *dev)
>    *
>    * Fills the hw statistics from the VSI corresponding to the associated VFPR
>    **/
> -void
> +static void
>   i40e_vfpr_netdev_get_stats64(struct net_device *netdev,
>   			     struct rtnl_link_stats64 *stats)
>   {


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Intel-wired-lan] [FIXUP PATCH 2/2] fixup! i40e: Add support for exposing VF port statistics via VFPR netdev on the host
  2017-02-07  6:35   ` Samudrala, Sridhar
@ 2017-02-07 17:46     ` Keller, Jacob E
  0 siblings, 0 replies; 7+ messages in thread
From: Keller, Jacob E @ 2017-02-07 17:46 UTC (permalink / raw)
  To: intel-wired-lan



> -----Original Message-----
> From: Samudrala, Sridhar
> Sent: Monday, February 06, 2017 10:35 PM
> To: Keller, Jacob E <jacob.e.keller@intel.com>; Intel Wired LAN <intel-wired-
> lan at lists.osuosl.org>
> Subject: Re: [Intel-wired-lan] [FIXUP PATCH 2/2] fixup! i40e: Add support for
> exposing VF port statistics via VFPR netdev on the host
> 
> On 2/6/2017 2:38 PM, Jacob Keller wrote:
> > This fixes a compiler warning in commit abc0e7634722 ("i40e: Add support
> > for exposing VF port statistics via VFPR netdev on the host",
> > 2017-01-31) which is caused by a function that should have been marked
> > as static.
> >
> > Jeff, please squash this patch into the given commit, or have the
> > original author re-roll his patch to fix the warning.
> >
> > Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
> 
> Jeff, Along with this patch, can you also squash this patch into this
> commit to fix percpu related
> warning messages.

Thanks!

Regards,
Jake

> 
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
> b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
> index 52ba9d5..7ddce0d 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
> +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
> @@ -85,7 +85,7 @@ struct vfpr_pcpu_stats {
>   struct i40e_vfpr_netdev_priv {
>          struct metadata_dst *vfpr_dst;
>          struct i40e_vf *vf;
> -       struct vfpr_pcpu_stats *vfpr_stats;
> +       struct vfpr_pcpu_stats __percpu *vfpr_stats;
>   };
> 
>   /* VF information structure */
> 
> 
> > ---
> >   drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> > index 9efecff9c535..2686ddd65618 100644
> > --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> > +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> > @@ -1062,7 +1062,7 @@ static int i40e_vfpr_netdev_stop(struct net_device
> *dev)
> >    *
> >    * Fills the hw statistics from the VSI corresponding to the associated VFPR
> >    **/
> > -void
> > +static void
> >   i40e_vfpr_netdev_get_stats64(struct net_device *netdev,
> >   			     struct rtnl_link_stats64 *stats)
> >   {


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-02-07 17:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-06 22:38 [Intel-wired-lan] [FIXUP PATCH 0/2] fixup patches for warnings in queue Jacob Keller
2017-02-06 22:38 ` [Intel-wired-lan] [FIXUP PATCH 1/2] fixup! i40e: Introduce VF Port Representator(VFPR) netdevs Jacob Keller
2017-02-07  6:30   ` Samudrala, Sridhar
2017-02-06 22:38 ` [Intel-wired-lan] [PATCH 1/1] i40e: document drivers use of ntuple filters Jacob Keller
2017-02-06 22:38 ` [Intel-wired-lan] [FIXUP PATCH 2/2] fixup! i40e: Add support for exposing VF port statistics via VFPR netdev on the host Jacob Keller
2017-02-07  6:35   ` Samudrala, Sridhar
2017-02-07 17:46     ` Keller, Jacob E

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.