[ovs-dev] [PATCH v15] Improved Packet Drop Statistics in OVS
Eelco Chaudron
echaudro at redhat.com
Mon Nov 11 14:51:27 UTC 2019
On 8 Nov 2019, at 6:02, Anju Thomas wrote:
> Currently OVS maintains explicit packet drop/error counters only on
> port level. Packets that are dropped as part of normal OpenFlow
> processing are counted in flow stats of “drop” flows or as table
> misses in table stats. These can only be interpreted by controllers
> that know the semantics of the configured OpenFlow pipeline.
> Without that knowledge, it is impossible for an OVS user to obtain
> e.g. the total number of packets dropped due to OpenFlow rules.
>
> Furthermore, there are numerous other reasons for which packets can be
> dropped by OVS slow path that are not related to the OpenFlow
> pipeline.
> The generated datapath flow entries include a drop action to avoid
> further expensive upcalls to the slow path, but subsequent packets
> dropped by the datapath are not accounted anywhere.
>
> Finally, the datapath itself drops packets in certain error
> situations.
> Also, these drops are today not accounted for.This makes it difficult
> for OVS users to monitor packet drop in an OVS instance and to alert a
> management system in case of a unexpected increase of such drops.
> Also OVS trouble-shooters face difficulties in analysing packet drops.
>
> With this patch we implement following changes to address the issues
> mentioned above.
>
> 1. Identify and account all the silent packet drop scenarios
>
> 2. Display these drops in ovs-appctl coverage/show
>
> Co-authored-by: Rohith Basavaraja <rohith.basavaraja at gmail.com>
> Co-authored-by: Keshav Gupta <keshugupta1 at gmail.com>
> Signed-off-by: Anju Thomas <anju.thomas at ericsson.com>
> Signed-off-by: Rohith Basavaraja <rohith.basavaraja at gmail.com>
> Signed-off-by: Keshav Gupta <keshugupta1 at gmail.com>
> Acked-by: Eelco Chaudron <echaudro at redhat.com
Not sure what is happening, but your patches show up from “Sriram
Vatala via dev”
> ---
<SNIP>
> diff --git a/lib/odp-util.c b/lib/odp-util.c
> index 3a574bf..2f8544b 100644
> --- a/lib/odp-util.c
> +++ b/lib/odp-util.c
> @@ -45,6 +45,7 @@
> #include "openvswitch/match.h"
> #include "odp-netlink-macros.h"
> #include "csum.h"
> +#include "ofproto/ofproto-dpif-xlate.h"
>
> VLOG_DEFINE_THIS_MODULE(odp_util);
>
> @@ -141,6 +142,7 @@ odp_action_len(uint16_t type)
> case OVS_ACTION_ATTR_PUSH_NSH: return ATTR_LEN_VARIABLE;
> case OVS_ACTION_ATTR_POP_NSH: return 0;
> case OVS_ACTION_ATTR_CHECK_PKT_LEN: return ATTR_LEN_VARIABLE;
> + case OVS_ACTION_ATTR_DROP: return sizeof(uint32_t);
>
> case OVS_ACTION_ATTR_UNSPEC:
> case __OVS_ACTION_ATTR_MAX:
> @@ -1238,6 +1240,9 @@ format_odp_action(struct ds *ds, const struct
> nlattr *a,
> case OVS_ACTION_ATTR_CHECK_PKT_LEN:
> format_odp_check_pkt_len_action(ds, a, portno_names);
> break;
> + case OVS_ACTION_ATTR_DROP:
> + ds_put_cstr(ds, "drop");
> + break;
> case OVS_ACTION_ATTR_UNSPEC:
> case __OVS_ACTION_ATTR_MAX:
> default:
> @@ -2573,8 +2578,10 @@ odp_actions_from_string(const char *s, const
> struct simap *port_names,
> struct ofpbuf *actions)
> {
> size_t old_size;
> + enum xlate_error drop_action;
Remove the above, as it’s not used. Make sure you use the
--enable-Werror when doing ./configure as it will catch these errors.
Rest looks good to me…
More information about the dev
mailing list