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

Traffic Generator not getting data packets. #58

Closed
rohansuri1996 opened this issue Feb 17, 2022 · 7 comments
Closed

Traffic Generator not getting data packets. #58

rohansuri1996 opened this issue Feb 17, 2022 · 7 comments

Comments

@rohansuri1996
Copy link

rohansuri1996 commented Feb 17, 2022

I setup 2 ndn-dpdk nodes and activated them as traffic generators.
My plan was to set one of them as consumer and the other one as producer.
I can see interest packets counter increasing on the producer(rxInterest) but unfortunately there is no data packet on the consumer (rxData). I am using the following parameters.

import type { TgConfig } from "@usnistgov/ndn-dpdk";
import stdout from "stdout-stream";

This is consumer-

const cfg: TgConfig = {
  face: {
    scheme: "ether",
    local: "02:60:18:6d:b0:01",
    remote: "02:60:18:6d:b0:02",
    mtu: 1500,
  },
  consumer: {
    patterns: [
      {
        weight: 5,
        prefix: "/V",
      },
    ],
    interval: "1ms",
  },
};

stdout.write(JSON.stringify(cfg));

This is producer-

import type { TgConfig } from "@usnistgov/ndn-dpdk";
import stdout from "stdout-stream";

const cfg: TgConfig = {
  face: {
    scheme: "ether",
    local: "02:60:18:6d:b0:02",
    remote: "02:60:18:6d:b0:01",
    mtu: 1500,
  },
  producer: {
    patterns: [
      {
        prefix: "/V",
        replies: [
            
                {
                  suffix: "/V",
                  payloadLen: 8000,
                  weight:6,
                },
              ],
            },
 
  
        ],
      },
};

stdout.write(JSON.stringify(cfg));

If check the counters-

on producer

data": {
"faces": [
{
"counters": {
"rxData": "0",
"rxInterests": "352448",
"rxNacks": "0",
"rxOctets": "13745472"
},
"fibEntries": null,
"id": "DP40FIC8JDVUNM4DJSAUD3JUHS"
}

On consumer

"data": {
"faces": [
{
"counters": {
"rxData": "0",
"rxInterests": "0",
"rxNacks": "0",
"rxOctets": "0"
},
"fibEntries": null,
"id": "M166GFE8E51SVCCP27LJNG1T"
}

Is there some issue with the parameters or is there some other issue?

@yoursunny
Copy link
Member

The consumer traffic pattern generates Interests like: Name=/V/9ffa1dd7255a2f79, CanBePrefix=false, MustBeFresh=false.
The producer traffic pattern generates Data like: Name=/V/9ffa1dd7255a2f79/V, FreshnessPeriod=0.
This Data doesn't satisfy this Interest because the name is not an exact match while the Interest specifies CanBePrefix=false.
You need to either set CanBePrefix=true or delete Data suffix for them to match.

@rohansuri1996
Copy link
Author

rohansuri1996 commented Feb 17, 2022

You need to either set CanBePrefix=true or delete Data suffix for them to match.

const cfg: TgConfig = {
  face: {
    scheme: "ether",
    local: "02:60:18:6d:b0:01",
    remote: "02:60:18:6d:b0:02",
    mtu: 1500,
  },
  consumer: {
    patterns: [
      {
        weight: 5,
        prefix: "/V",
        canBePrefix: true,
      },
    ],
    interval: "1ms",
  },
};

Hi tried it and it gives me the same result,
There are interest packet on the producer but no data packet at consumer.

I am also showing some warnings that i got when i am starting the traffic generator

(node:112513) ExperimentalWarning: --experimental-loader is an experimental feature. This feature could change at any time
(Use node --trace-warnings ... to show where the warning was created)
(node:112513) DeprecationWarning: Obsolete loader hook(s) supplied and will be ignored: getFormat, transformSource
{"consumer":null,"face":{"id":"KCK0LD3N68JSRE50BAU5VJ8L4S"},"fetcher":null,"id":"JOKL3OH25599G","producer":{"id":"JOKHNR975HA9VRO"}}

@yoursunny
Copy link
Member

These Node.js ExperimentalWarning and DeprecationWarning are caused by lukeed/tsm#12 .
They are printed by your script, not coming from NDN-DPDK service, and thus cannot affect NDN-DPDK service operation.

@yoursunny
Copy link
Member

I tested the traffic generator with the current version 33d8870 .
There are some serious problem with port creation when the port needs to use RxTable - it causes a panic no RxLoop available, with the following stack trace:

github.com/usnistgov/ndn-dpdk/iface.ActivateRxGroup
        /home/jns23/code/ndn-dpdk/iface/rxloop.go:159
github.com/usnistgov/ndn-dpdk/iface/ethport.newRxgTable
        /home/jns23/code/ndn-dpdk/iface/ethport/rxtable.go:86
github.com/usnistgov/ndn-dpdk/iface/ethport.(*rxTable).Init
        /home/jns23/code/ndn-dpdk/iface/ethport/rxtable.go:30
github.com/usnistgov/ndn-dpdk/iface/ethport.New
        /home/jns23/code/ndn-dpdk/iface/ethport/port.go:226

While using traffic generator with RxTable is never recommended, it is supposed to work if you only create one face per port.

It's yet another thing that got broken when I did the ethport package refactoring in 2021-Dec.
I'll fix it in about a week.


Meanwhile, the traffic generator only works with memif or with PCI driver + RxFlow enabled.
A full example tested in the current version:

# hardware: Mellanox ConnectX-5 adapters, connected via a direct attach cable without intermediate switch

# on both machines
sudo ndndpdk-ctrl systemd restart
jq -n '{
  mempool: {
    DIRECT: {
      capacity: 65535,
      dataroom: 9146
    },
    INDIRECT: {
      capacity: 65535
    },
    PAYLOAD: {
      capacity: 65535,
      dataroom: 9146
    }
  }
}' | ndndpdk-ctrl activate-trafficgen

# on producer machine
# (the MAC addresses must match the physical MAC addresses of the adapters)
ndndpdk-ctrl create-eth-port --pci d8:00.0 --rx-flow 1
jq -n '{
  face: {
    scheme: "ether",
    local: "52:76:96:64:30:6b",
    remote: "ba:a7:8b:55:a4:d6",
    mtu: 1500
  },
  producer: {
    patterns: [
      {
        prefix: "/V",
        replies: [
          {
            suffix: "/V",
            payloadLen: 8000,
            weight: 6
          }
        ]
      }
    ]
  }
}' | ndndpdk-ctrl start-trafficgen

# on consumer machine
# (the MAC addresses must match the physical MAC addresses of the adapters)
ndndpdk-ctrl create-eth-port --pci d8:00.0 --rx-flow 1
jq -n '{
  face: {
    scheme: "ether",
    local: "ba:a7:8b:55:a4:d6",
    remote: "52:76:96:64:30:6b",
    mtu: 1500
  },
  consumer: {
    patterns: [
      {
        weight: 5,
        prefix: "/V",
        canBePrefix: true
      }
    ],
    interval: "1ms"
  }
}' | ndndpdk-ctrl start-trafficgen

What you can try:

  • Try my setup first, see whether it works.
  • Change one thing at a time, until it stops working.
  • Tell me what's the thing that causes it to stop working, so that I can adjust the program to either accommodate it or reject it with an error message, if feasible.

@rohansuri1996
Copy link
Author

For conusmer this is the watch for earlier setup

{"consumer":{"nAllocError":"0","nData":"0","nInterests":"129344","nNacks":"0","perPattern":[{"nData":"0","nInterests":"129344","nNacks":"0"}],"rtt":{"mean":null,"stdev":null}},"producer":null}

For producer this is the watch result for earlier setup-

{"consumer":null,"producer":{"nAllocError":"0","nInterests":"85632","nNoMatch":"0","perPattern":[{"nInterests":"85632","perReply":["85632"]}]}}

I think the interest and data name is matching but that is not the issue.

The setup you suggested requires two hardware machines right and it cannot be done using docker?

@yoursunny
Copy link
Member

The setup you suggested requires two hardware machines right and it cannot be done using docker?

Traffic generator is designed as a network appliance, so it needs hardware machines.
Other setups are possible but not regularly tested.

@yoursunny
Copy link
Member

Traffic generator can now work with RxTable as of fa16b5e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants