Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datapath: Extend METRICS_MAP to store prog ID / ifindex / LOC upon DROP_MISSED_TAIL_CALL #27748

Closed
brb opened this issue Aug 28, 2023 · 8 comments · Fixed by #30972
Closed

datapath: Extend METRICS_MAP to store prog ID / ifindex / LOC upon DROP_MISSED_TAIL_CALL #27748

brb opened this issue Aug 28, 2023 · 8 comments · Fixed by #30972
Assignees
Labels
feature/conntrack kind/bug This is a bug in the Cilium logic. kind/regression This functionality worked fine before, but was broken in a newer release of Cilium. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages.

Comments

@brb
Copy link
Member

brb commented Aug 28, 2023

Currently, we get very little information when DROP_MISSED_TAIL_CALL happens - only the counter value is incremented (e.g., #26739).

To fix that, we could extend the METRICS_MAP to store prog ID, ifindex, LOC in the metrics counter which could drastically help with troubleshooting. The meta info could be rendered into prometheus metric label. DROP_MISSED_TAIL_CALL should be rare events, so the high cardinality of such a metric shouldn't be an issue.

@brb brb added sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. kind/feature This introduces new functionality. labels Aug 28, 2023
@julianwiedmann
Copy link
Member

In addition, we could also propagate it as ext_err in the drop notification. Not sure if that makes it all the way to hubble today.

@brb
Copy link
Member Author

brb commented Aug 29, 2023

ext_err in the drop notification

We do that today. However, in the case of DROP_MISSED_TAIL_CALL, the drop notification is not sent to the perf ringbuffer, as it's done in a separate tail call.

@julianwiedmann
Copy link
Member

ext_err in the drop notification

We do that today.

I meant setting the ext_err to the actual missed tail-call index (ie returning with DROP_MISSED_TAIL_CALL and ext_err := CILIUM_CALL_IPV4_NODEPORT_DSR).

However, in the case of DROP_MISSED_TAIL_CALL, the drop notification is not sent to the perf ringbuffer, as it's done in a separate tail call.

You mean in case there's a fundamental problem with tail-calls, then the drop-notification also wouldn't make it out? Yep, true. Is that the typical problem? I would have figured we can also have scenarios where some tail-call is just not wired up correctly, but CILIUM_CALL_DROP_NOTIFY still works.

@brb
Copy link
Member Author

brb commented Aug 29, 2023

then the drop-notification also wouldn't make it out

Yep, e.g., when there is a bug in our loader.

@ti-mo ti-mo self-assigned this Sep 12, 2023
@ti-mo
Copy link
Contributor

ti-mo commented Sep 12, 2023

I'll see if I can make some progress here in the coming weeks. Exporting this as a metric is not a terrible idea. Cardinality isn't much of an issue here, since there's a finite amount of call sites (file + loc tuples at least) for a given agent build. Not sure if ifindex is 100% relevant, perhaps local endpoint id is more useful since those correspond to dir names in the agent's state dir as well as prog array pin paths on bpffs? Sysdump picks those up, so easier to correlate.

@brb wdyt?

@brb
Copy link
Member Author

brb commented Sep 12, 2023

@brb wdyt?

SGTM

@brb brb added sig/k8s Impacts the kubernetes API, or kubernetes -> cilium internals translation layers. kind/community-report This was reported by a user in the Cilium community, eg via Slack. info-completed The GH issue has received a reply from the author and removed kind/feature This introduces new functionality. labels Sep 14, 2023
@margamanterola margamanterola added kind/bug This is a bug in the Cilium logic. kind/regression This functionality worked fine before, but was broken in a newer release of Cilium. feature/conntrack and removed sig/k8s Impacts the kubernetes API, or kubernetes -> cilium internals translation layers. kind/community-report This was reported by a user in the Cilium community, eg via Slack. info-completed The GH issue has received a reply from the author labels Sep 14, 2023
@ti-mo
Copy link
Contributor

ti-mo commented Nov 21, 2023

Some more data after investigating a few of these cases recently.

  • Logging a missed tail call should not require a tail call. I suspect we spend as many insns preparing the context for tail calling into the program that outputs the perf event than we do actually emitting the event, so this feels a little pointless.
  • Missing a tail call should emit a (rate limited) error-level log message addition to bumping the metric. Debugging missed tail calls using cilium monitor is almost impossible since this requires the local API to be up, by which point some programs might've already been replaced. Not sure if this will require a separate perf ring, I'm not familiar with cilium monitor's internals, but the agent should open the ring immediately during startup (before replacing any progs) and log any missed tail calls. This is easier to spot during development.

@ti-mo
Copy link
Contributor

ti-mo commented Jan 17, 2024

Keeping this on the radar, but deferring until tail call misses pop up again at some point. (#30248)

There's room in the trailer of struct metrics_key to put a file and line number, but we need to be smart about allocating it. Do we go for an opaque 'extra' field? Or could more metrics benefit from file/lineno? Not sure what a good solution would be.

@ti-mo ti-mo removed their assignment Jan 17, 2024
@ti-mo ti-mo self-assigned this Feb 26, 2024
ti-mo added a commit to ti-mo/cilium that referenced this issue Feb 26, 2024
Fixes cilium#27748

Example output:
```
cilium bpf metrics list
REASON                    DIRECTION   PACKETS   BYTES    LINE   FILE
Interface                 INGRESS     6830      683492   198    trace.h
Success                   EGRESS      6217      532344   198    trace.h
Success                   INGRESS     4747      537660   86     l3.h
Success                   INGRESS     4986      556878   229    trace.h
Unsupported L3 protocol   EGRESS      49        3670     1466   bpf_lxc.c
```

```
cilium metrics list | grep drop
cilium_drop_bytes_total   direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol"   3740.000000
cilium_drop_count_total   direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol"   50.000000
```

Signed-off-by: Timo Beckers <timo@isovalent.com>
ti-mo added a commit to ti-mo/cilium that referenced this issue Feb 26, 2024
Fixes cilium#27748

Example output:
```
cilium bpf metrics list
REASON                    DIRECTION   PACKETS   BYTES    LINE   FILE
Interface                 INGRESS     6830      683492   198    trace.h
Success                   EGRESS      6217      532344   198    trace.h
Success                   INGRESS     4747      537660   86     l3.h
Success                   INGRESS     4986      556878   229    trace.h
Unsupported L3 protocol   EGRESS      49        3670     1466   bpf_lxc.c
```

```
cilium metrics list | grep drop
cilium_drop_bytes_total   direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol"   3740.000000
cilium_drop_count_total   direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol"   50.000000
```

Signed-off-by: Timo Beckers <timo@isovalent.com>
ti-mo added a commit to ti-mo/cilium that referenced this issue Feb 27, 2024
Fixes cilium#27748

Example output:
```
cilium metrics list | grep -E "cilium_(drop|forward)" && cilium bpf metrics list
cilium_drop_bytes_total                                  direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol"       460.000000
cilium_drop_count_total                                  direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol"       6.000000
cilium_forward_bytes_total                               direction="EGRESS"                                                                     285278.000000
cilium_forward_bytes_total                               direction="INGRESS"                                                                    448620.000000
cilium_forward_count_total                               direction="EGRESS"                                                                     1205.000000
cilium_forward_count_total                               direction="INGRESS"                                                                    2296.000000
REASON                    DIRECTION   PACKETS   BYTES    LINE   FILE
Interface                 INGRESS     151       9368     1092   bpf_host.c
Interface                 INGRESS     731       139248   659    bpf_overlay.c
Success                   EGRESS      137       8212     1531   bpf_host.c
Success                   EGRESS      369       113022   40     encap.h
Success                   EGRESS      690       163300   86     l3.h
Success                   EGRESS      9         744      1286   bpf_lxc.c
Success                   INGRESS     11        926      86     l3.h
Success                   INGRESS     1403      299078   231    trace.h
Unsupported L3 protocol   EGRESS      6         460      1466   bpf_lxc.c
```

Signed-off-by: Timo Beckers <timo@isovalent.com>
ti-mo added a commit to ti-mo/cilium that referenced this issue Feb 28, 2024
Fixes cilium#27748

Example output:
```
~ cilium metrics list | grep -E "cilium_(drop|forward)"
cilium_drop_bytes_total                                  direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol"       460.000000
cilium_drop_count_total                                  direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol"       6.000000
cilium_forward_bytes_total                               direction="EGRESS"                                                                     285278.000000
cilium_forward_bytes_total                               direction="INGRESS"                                                                    448620.000000
cilium_forward_count_total                               direction="EGRESS"                                                                     1205.000000
cilium_forward_count_total                               direction="INGRESS"                                                                    2296.000000
```

```
~ cilium bpf metrics list
REASON                    DIRECTION   PACKETS   BYTES    LINE   FILE
Interface                 INGRESS     151       9368     1092   bpf_host.c
Interface                 INGRESS     731       139248   659    bpf_overlay.c
Success                   EGRESS      137       8212     1531   bpf_host.c
Success                   EGRESS      9         744      1286   bpf_lxc.c
Success                   INGRESS     11        926      86     l3.h
Success                   INGRESS     1403      299078   231    trace.h
Unsupported L3 protocol   EGRESS      6         460      1466   bpf_lxc.c
```

```
~ cilium bpf metrics list -o json
  {
    "reason": "Success",
    "direction": "egress",
    "packets": 406587,
    "bytes": 78023315,
    "line": 40,
    "file": "encap.h"
  },
  {
    "reason": "Unsupported L3 protocol",
    "direction": "egress",
    "packets": 167,
    "bytes": 12050,
    "line": 1466,
    "file": "bpf_lxc.c"
  }
```

Signed-off-by: Timo Beckers <timo@isovalent.com>
ti-mo added a commit to ti-mo/cilium that referenced this issue Feb 28, 2024
Fixes cilium#27748

Example output:
```
~ cilium metrics list | grep -E "cilium_(drop|forward)"
cilium_drop_bytes_total                                  direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol"       460.000000
cilium_drop_count_total                                  direction="EGRESS" file="bpf_lxc.c" line="1466" reason="Unsupported L3 protocol"       6.000000
cilium_forward_bytes_total                               direction="EGRESS"                                                                     285278.000000
cilium_forward_bytes_total                               direction="INGRESS"                                                                    448620.000000
cilium_forward_count_total                               direction="EGRESS"                                                                     1205.000000
cilium_forward_count_total                               direction="INGRESS"                                                                    2296.000000
```

```
~ cilium bpf metrics list
REASON                    DIRECTION   PACKETS   BYTES    LINE   FILE
Interface                 INGRESS     151       9368     1092   bpf_host.c
Interface                 INGRESS     731       139248   659    bpf_overlay.c
Success                   EGRESS      137       8212     1531   bpf_host.c
Success                   EGRESS      9         744      1286   bpf_lxc.c
Success                   INGRESS     11        926      86     l3.h
Success                   INGRESS     1403      299078   231    trace.h
Unsupported L3 protocol   EGRESS      6         460      1466   bpf_lxc.c
```

```
~ cilium bpf metrics list -o json
  {
    "reason": "Success",
    "direction": "egress",
    "packets": 406587,
    "bytes": 78023315,
    "line": 40,
    "file": "encap.h"
  },
  {
    "reason": "Unsupported L3 protocol",
    "direction": "egress",
    "packets": 167,
    "bytes": 12050,
    "line": 1466,
    "file": "bpf_lxc.c"
  }
```

Signed-off-by: Timo Beckers <timo@isovalent.com>
ti-mo added a commit to ti-mo/cilium that referenced this issue Feb 29, 2024
Fixes cilium#27748

Example output:
```
~ cilium bpf metrics list
REASON                    DIRECTION   PACKETS   BYTES    LINE   FILE
Interface                 INGRESS     151       9368     1092   bpf_host.c
Interface                 INGRESS     731       139248   659    bpf_overlay.c
Success                   EGRESS      137       8212     1531   bpf_host.c
Success                   EGRESS      9         744      1286   bpf_lxc.c
Success                   INGRESS     11        926      86     l3.h
Success                   INGRESS     1403      299078   231    trace.h
Unsupported L3 protocol   EGRESS      6         460      1466   bpf_lxc.c
```

```
~ cilium bpf metrics list -o json
  {
    "reason": "Success",
    "direction": "egress",
    "packets": 406587,
    "bytes": 78023315,
    "line": 40,
    "file": "encap.h"
  },
  {
    "reason": "Unsupported L3 protocol",
    "direction": "egress",
    "packets": 167,
    "bytes": 12050,
    "line": 1466,
    "file": "bpf_lxc.c"
  }
```

Signed-off-by: Timo Beckers <timo@isovalent.com>
ti-mo added a commit to ti-mo/cilium that referenced this issue Feb 29, 2024
Fixes cilium#27748

Example output:
```
~ cilium bpf metrics list
REASON                    DIRECTION   PACKETS   BYTES    LINE   FILE
Interface                 INGRESS     151       9368     1092   bpf_host.c
Interface                 INGRESS     731       139248   659    bpf_overlay.c
Success                   EGRESS      137       8212     1531   bpf_host.c
Success                   EGRESS      9         744      1286   bpf_lxc.c
Success                   INGRESS     11        926      86     l3.h
Success                   INGRESS     1403      299078   231    trace.h
Unsupported L3 protocol   EGRESS      6         460      1466   bpf_lxc.c
```

```
~ cilium bpf metrics list -o json
  {
    "reason": "Success",
    "direction": "egress",
    "packets": 406587,
    "bytes": 78023315,
    "line": 40,
    "file": "encap.h"
  },
  {
    "reason": "Unsupported L3 protocol",
    "direction": "egress",
    "packets": 167,
    "bytes": 12050,
    "line": 1466,
    "file": "bpf_lxc.c"
  }
```

Signed-off-by: Timo Beckers <timo@isovalent.com>
ti-mo added a commit to ti-mo/cilium that referenced this issue Feb 29, 2024
Fixes cilium#27748

Example output:
```
~ cilium bpf metrics list
REASON                    DIRECTION   PACKETS   BYTES    LINE   FILE
Interface                 INGRESS     151       9368     1092   bpf_host.c
Interface                 INGRESS     731       139248   659    bpf_overlay.c
Success                   EGRESS      137       8212     1531   bpf_host.c
Success                   EGRESS      9         744      1286   bpf_lxc.c
Success                   INGRESS     11        926      86     l3.h
Success                   INGRESS     1403      299078   231    trace.h
Unsupported L3 protocol   EGRESS      6         460      1466   bpf_lxc.c
```

```
~ cilium bpf metrics list -o json
  {
    "reason": "Success",
    "direction": "egress",
    "packets": 406587,
    "bytes": 78023315,
    "line": 40,
    "file": "encap.h"
  },
  {
    "reason": "Unsupported L3 protocol",
    "direction": "egress",
    "packets": 167,
    "bytes": 12050,
    "line": 1466,
    "file": "bpf_lxc.c"
  }
```

Signed-off-by: Timo Beckers <timo@isovalent.com>
ti-mo added a commit to ti-mo/cilium that referenced this issue Mar 4, 2024
Fixes cilium#27748

Example output:
```
~ cilium bpf metrics list
REASON                    DIRECTION   PACKETS   BYTES    LINE   FILE
Interface                 INGRESS     151       9368     1092   bpf_host.c
Interface                 INGRESS     731       139248   659    bpf_overlay.c
Success                   EGRESS      137       8212     1531   bpf_host.c
Success                   EGRESS      9         744      1286   bpf_lxc.c
Success                   INGRESS     11        926      86     l3.h
Success                   INGRESS     1403      299078   231    trace.h
Unsupported L3 protocol   EGRESS      6         460      1466   bpf_lxc.c
```

```
~ cilium bpf metrics list -o json
  {
    "reason": "Success",
    "direction": "egress",
    "packets": 406587,
    "bytes": 78023315,
    "line": 40,
    "file": "encap.h"
  },
  {
    "reason": "Unsupported L3 protocol",
    "direction": "egress",
    "packets": 167,
    "bytes": 12050,
    "line": 1466,
    "file": "bpf_lxc.c"
  }
```

Signed-off-by: Timo Beckers <timo@isovalent.com>
ti-mo added a commit to ti-mo/cilium that referenced this issue Mar 5, 2024
Fixes cilium#27748

Example output:
```
~ cilium bpf metrics list
REASON                    DIRECTION   PACKETS   BYTES    LINE   FILE
Interface                 INGRESS     151       9368     1092   bpf_host.c
Interface                 INGRESS     731       139248   659    bpf_overlay.c
Success                   EGRESS      137       8212     1531   bpf_host.c
Success                   EGRESS      9         744      1286   bpf_lxc.c
Success                   INGRESS     11        926      86     l3.h
Success                   INGRESS     1403      299078   231    trace.h
Unsupported L3 protocol   EGRESS      6         460      1466   bpf_lxc.c
```

```
~ cilium bpf metrics list -o json
  {
    "reason": "Success",
    "direction": "egress",
    "packets": 406587,
    "bytes": 78023315,
    "line": 40,
    "file": "encap.h"
  },
  {
    "reason": "Unsupported L3 protocol",
    "direction": "egress",
    "packets": 167,
    "bytes": 12050,
    "line": 1466,
    "file": "bpf_lxc.c"
  }
```

Signed-off-by: Timo Beckers <timo@isovalent.com>
ti-mo added a commit to ti-mo/cilium that referenced this issue Mar 6, 2024
Fixes cilium#27748

Example output:
```
~ cilium bpf metrics list
REASON                    DIRECTION   PACKETS   BYTES    LINE   FILE
Interface                 INGRESS     151       9368     1092   bpf_host.c
Interface                 INGRESS     731       139248   659    bpf_overlay.c
Success                   EGRESS      137       8212     1531   bpf_host.c
Success                   EGRESS      9         744      1286   bpf_lxc.c
Success                   INGRESS     11        926      86     l3.h
Success                   INGRESS     1403      299078   231    trace.h
Unsupported L3 protocol   EGRESS      6         460      1466   bpf_lxc.c
```

```
~ cilium bpf metrics list -o json
  {
    "reason": "Success",
    "direction": "egress",
    "packets": 406587,
    "bytes": 78023315,
    "line": 40,
    "file": "encap.h"
  },
  {
    "reason": "Unsupported L3 protocol",
    "direction": "egress",
    "packets": 167,
    "bytes": 12050,
    "line": 1466,
    "file": "bpf_lxc.c"
  }
```

Signed-off-by: Timo Beckers <timo@isovalent.com>
ti-mo added a commit to ti-mo/cilium that referenced this issue Mar 13, 2024
Fixes cilium#27748

Example output:
```
~ cilium bpf metrics list
REASON                    DIRECTION   PACKETS   BYTES    LINE   FILE
Interface                 INGRESS     151       9368     1092   bpf_host.c
Interface                 INGRESS     731       139248   659    bpf_overlay.c
Success                   EGRESS      137       8212     1531   bpf_host.c
Success                   EGRESS      9         744      1286   bpf_lxc.c
Success                   INGRESS     11        926      86     l3.h
Success                   INGRESS     1403      299078   231    trace.h
Unsupported L3 protocol   EGRESS      6         460      1466   bpf_lxc.c
```

```
~ cilium bpf metrics list -o json
  {
    "reason": "Success",
    "direction": "egress",
    "packets": 406587,
    "bytes": 78023315,
    "line": 40,
    "file": "encap.h"
  },
  {
    "reason": "Unsupported L3 protocol",
    "direction": "egress",
    "packets": 167,
    "bytes": 12050,
    "line": 1466,
    "file": "bpf_lxc.c"
  }
```

Signed-off-by: Timo Beckers <timo@isovalent.com>
dylandreimerink pushed a commit to dylandreimerink/cilium that referenced this issue Mar 14, 2024
Fixes cilium#27748

Example output:
```
~ cilium bpf metrics list
REASON                    DIRECTION   PACKETS   BYTES    LINE   FILE
Interface                 INGRESS     151       9368     1092   bpf_host.c
Interface                 INGRESS     731       139248   659    bpf_overlay.c
Success                   EGRESS      137       8212     1531   bpf_host.c
Success                   EGRESS      9         744      1286   bpf_lxc.c
Success                   INGRESS     11        926      86     l3.h
Success                   INGRESS     1403      299078   231    trace.h
Unsupported L3 protocol   EGRESS      6         460      1466   bpf_lxc.c
```

```
~ cilium bpf metrics list -o json
  {
    "reason": "Success",
    "direction": "egress",
    "packets": 406587,
    "bytes": 78023315,
    "line": 40,
    "file": "encap.h"
  },
  {
    "reason": "Unsupported L3 protocol",
    "direction": "egress",
    "packets": 167,
    "bytes": 12050,
    "line": 1466,
    "file": "bpf_lxc.c"
  }
```

Signed-off-by: Timo Beckers <timo@isovalent.com>
dylandreimerink pushed a commit to dylandreimerink/cilium that referenced this issue Mar 15, 2024
Fixes cilium#27748

Example output:
```
~ cilium bpf metrics list
REASON                    DIRECTION   PACKETS   BYTES    LINE   FILE
Interface                 INGRESS     151       9368     1092   bpf_host.c
Interface                 INGRESS     731       139248   659    bpf_overlay.c
Success                   EGRESS      137       8212     1531   bpf_host.c
Success                   EGRESS      9         744      1286   bpf_lxc.c
Success                   INGRESS     11        926      86     l3.h
Success                   INGRESS     1403      299078   231    trace.h
Unsupported L3 protocol   EGRESS      6         460      1466   bpf_lxc.c
```

```
~ cilium bpf metrics list -o json
  {
    "reason": "Success",
    "direction": "egress",
    "packets": 406587,
    "bytes": 78023315,
    "line": 40,
    "file": "encap.h"
  },
  {
    "reason": "Unsupported L3 protocol",
    "direction": "egress",
    "packets": 167,
    "bytes": 12050,
    "line": 1466,
    "file": "bpf_lxc.c"
  }
```

Signed-off-by: Timo Beckers <timo@isovalent.com>
ti-mo added a commit to ti-mo/cilium that referenced this issue Mar 19, 2024
Fixes cilium#27748

Example output:
```
~ cilium bpf metrics list
REASON                    DIRECTION   PACKETS   BYTES    LINE   FILE
Interface                 INGRESS     151       9368     1092   bpf_host.c
Interface                 INGRESS     731       139248   659    bpf_overlay.c
Success                   EGRESS      137       8212     1531   bpf_host.c
Success                   EGRESS      9         744      1286   bpf_lxc.c
Success                   INGRESS     11        926      86     l3.h
Success                   INGRESS     1403      299078   231    trace.h
Unsupported L3 protocol   EGRESS      6         460      1466   bpf_lxc.c
```

```
~ cilium bpf metrics list -o json
  {
    "reason": "Success",
    "direction": "egress",
    "packets": 406587,
    "bytes": 78023315,
    "line": 40,
    "file": "encap.h"
  },
  {
    "reason": "Unsupported L3 protocol",
    "direction": "egress",
    "packets": 167,
    "bytes": 12050,
    "line": 1466,
    "file": "bpf_lxc.c"
  }
```

Signed-off-by: Timo Beckers <timo@isovalent.com>
ti-mo added a commit to ti-mo/cilium that referenced this issue Mar 21, 2024
Fixes cilium#27748

Example output:
```
~ cilium bpf metrics list
REASON                    DIRECTION   PACKETS   BYTES    LINE   FILE
Interface                 INGRESS     151       9368     1092   bpf_host.c
Interface                 INGRESS     731       139248   659    bpf_overlay.c
Success                   EGRESS      137       8212     1531   bpf_host.c
Success                   EGRESS      9         744      1286   bpf_lxc.c
Success                   INGRESS     11        926      86     l3.h
Success                   INGRESS     1403      299078   231    trace.h
Unsupported L3 protocol   EGRESS      6         460      1466   bpf_lxc.c
```

```
~ cilium bpf metrics list -o json
  {
    "reason": "Success",
    "direction": "egress",
    "packets": 406587,
    "bytes": 78023315,
    "line": 40,
    "file": "encap.h"
  },
  {
    "reason": "Unsupported L3 protocol",
    "direction": "egress",
    "packets": 167,
    "bytes": 12050,
    "line": 1466,
    "file": "bpf_lxc.c"
  }
```

Signed-off-by: Timo Beckers <timo@isovalent.com>
github-merge-queue bot pushed a commit that referenced this issue Mar 22, 2024
Fixes #27748

Example output:
```
~ cilium bpf metrics list
REASON                    DIRECTION   PACKETS   BYTES    LINE   FILE
Interface                 INGRESS     151       9368     1092   bpf_host.c
Interface                 INGRESS     731       139248   659    bpf_overlay.c
Success                   EGRESS      137       8212     1531   bpf_host.c
Success                   EGRESS      9         744      1286   bpf_lxc.c
Success                   INGRESS     11        926      86     l3.h
Success                   INGRESS     1403      299078   231    trace.h
Unsupported L3 protocol   EGRESS      6         460      1466   bpf_lxc.c
```

```
~ cilium bpf metrics list -o json
  {
    "reason": "Success",
    "direction": "egress",
    "packets": 406587,
    "bytes": 78023315,
    "line": 40,
    "file": "encap.h"
  },
  {
    "reason": "Unsupported L3 protocol",
    "direction": "egress",
    "packets": 167,
    "bytes": 12050,
    "line": 1466,
    "file": "bpf_lxc.c"
  }
```

Signed-off-by: Timo Beckers <timo@isovalent.com>
rzdebskiy pushed a commit to rzdebskiy/cilium that referenced this issue Apr 3, 2024
Fixes cilium#27748

Example output:
```
~ cilium bpf metrics list
REASON                    DIRECTION   PACKETS   BYTES    LINE   FILE
Interface                 INGRESS     151       9368     1092   bpf_host.c
Interface                 INGRESS     731       139248   659    bpf_overlay.c
Success                   EGRESS      137       8212     1531   bpf_host.c
Success                   EGRESS      9         744      1286   bpf_lxc.c
Success                   INGRESS     11        926      86     l3.h
Success                   INGRESS     1403      299078   231    trace.h
Unsupported L3 protocol   EGRESS      6         460      1466   bpf_lxc.c
```

```
~ cilium bpf metrics list -o json
  {
    "reason": "Success",
    "direction": "egress",
    "packets": 406587,
    "bytes": 78023315,
    "line": 40,
    "file": "encap.h"
  },
  {
    "reason": "Unsupported L3 protocol",
    "direction": "egress",
    "packets": 167,
    "bytes": 12050,
    "line": 1466,
    "file": "bpf_lxc.c"
  }
```

Signed-off-by: Timo Beckers <timo@isovalent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/conntrack kind/bug This is a bug in the Cilium logic. kind/regression This functionality worked fine before, but was broken in a newer release of Cilium. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants