aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/netronome/nfp/flower/cmsg.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-09-26nfp: compile flower vxlan tunnel metadata match fieldsJohn Hurley1-0/+38
Compile ovs-tc flower vxlan metadata match fields for offloading. Only support offload of tunnel data when the VXLAN port specifically matches well known port 4789. Signed-off-by: John Hurley <john.hurley@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-09-26nfp: add helper to get flower cmsg lengthJohn Hurley1-0/+5
Add a helper function that returns the length of the cmsg data when given the cmsg skb Signed-off-by: John Hurley <john.hurley@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-16nfp: process control messages in workqueue in flower appSimon Horman1-0/+1
Processing of control messages is not time-critical and future processing of some messages will require taking the RTNL which is not possible in a BH handler. It seems simplest to move all control message processing to a workqueue. Signed-off-by: Simon Horman <simon.horman@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-11nfp: send control message when MAC representors are createdSimon Horman1-0/+21
The firmware expects a MAC_REPR control message when a MAC representor is created. The driver should expect a PORTMOD message to follow which will provide the link states of the physical port associated with the MAC representor. Signed-off-by: Simon Horman <simon.horman@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-01nfp: add control message passing capabilities to flower offloadsPieter Jansen van Vuuren1-0/+6
Previously the flower offloads never sends messages to the hardware, and never registers a handler for receiving messages from hardware. This patch enables the flower offloads to send control messages to hardware when adding and removing flow rules. Additionally it registers a control message rx handler for receiving stats updates from hardware for each offloaded flow. Additionally this patch adds 4 control message types; Add, modify and delete flow, as well as flow stats. It also allows nfp_flower_cmsg_get_data() to be used outside of cmsg.c. Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-01nfp: add a stats handler for flower offloadsPieter Jansen van Vuuren1-0/+5
Previously there was no way of updating flow rule stats after they have been offloaded to hardware. This is solved by keeping track of stats received from hardware and providing this to the TC handler on request. Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-01nfp: add basic action capabilities to flower offloadsPieter Jansen van Vuuren1-0/+45
Adds push vlan, pop vlan, output and drop action capabilities to flower offloads. Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-01nfp: extend flower matching capabilitiesPieter Jansen van Vuuren1-0/+4
Extends matching capabilities for flower offloads to include vlan, layer 2, layer 3 and layer 4 type matches. This includes both exact and wildcard matching. Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-01nfp: extend flower add flow offloadPieter Jansen van Vuuren1-0/+141
Extends the flower flow add function by calculating which match fields are present in the flower offload structure and allocating the appropriate space to describe these. Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-27nfp: move representors' struct net_device_ops to shared codeJakub Kicinski1-1/+1
Apps shouldn't declare their own struct net_device_ops for representors, this makes sharing code harder. Add necessary nfp_app callbacks and move the definition of representors' struct net_device_ops to common code. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-25nfp: add support for control messages for flower appSimon Horman1-0/+116
In preparation for adding a new flower app - targeted at offloading the flower classifier - provide support for control message that it will use to communicate with the NFP. Based in part on work by Bert van Leeuwen. Signed-off-by: Simon Horman <simon.horman@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>