diff options
author | Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com> | 2018-03-26 10:16:38 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-26 13:01:09 -0400 |
commit | 71ea5343a01cad36d7c44bea07a79dd96049e6c0 (patch) | |
tree | 2cb0f421ad2fbba42030a44d4b2c67cf63d47b0c /drivers/net/ethernet/netronome/nfp/flower/match.c | |
parent | 07e1671cfca54edf3f0c0915ef8754013b02dfbb (diff) | |
download | lwn-71ea5343a01cad36d7c44bea07a79dd96049e6c0.tar.gz lwn-71ea5343a01cad36d7c44bea07a79dd96049e6c0.zip |
nfp: flower: implement ip fragmentation match offload
Implement ip fragmentation match offloading for both IPv4 and IPv6. Allows
offloading frag, nofrag, first and nofirstfrag classification.
Signed-off-by: Pieter Jansen van Vuuren <pieter.jansenvanvuuren@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/flower/match.c')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/flower/match.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/flower/match.c b/drivers/net/ethernet/netronome/nfp/flower/match.c index 26110670ba13..91935405f586 100644 --- a/drivers/net/ethernet/netronome/nfp/flower/match.c +++ b/drivers/net/ethernet/netronome/nfp/flower/match.c @@ -190,6 +190,18 @@ nfp_flower_compile_ip_ext(struct nfp_flower_ip_ext *frame, if (tcp_flags & TCPHDR_URG) frame->flags |= NFP_FL_TCP_FLAG_URG; } + + if (dissector_uses_key(flow->dissector, FLOW_DISSECTOR_KEY_CONTROL)) { + struct flow_dissector_key_control *key; + + key = skb_flow_dissector_target(flow->dissector, + FLOW_DISSECTOR_KEY_CONTROL, + target); + if (key->flags & FLOW_DIS_IS_FRAGMENT) + frame->flags |= NFP_FL_IP_FRAGMENTED; + if (key->flags & FLOW_DIS_FIRST_FRAG) + frame->flags |= NFP_FL_IP_FRAG_FIRST; + } } static void |