Skip to content

Conversation

@safchain
Copy link
Collaborator

@safchain safchain commented Aug 1, 2019

This aims to fix generation of unique packet ID when injecting from multiple nodes to one

@dvandra
Copy link
Contributor

dvandra commented Aug 30, 2019

This is very useful to get a unique flow from multiple nodes to one destination.
But we need something to identify the source node per unique flow.
We need something either in flow or capture to identify source node per unique flow.

I am working on this and will soon update a patch.

cmd.Flags().StringVarP(&srcMAC, "src-mac", "", "", "source node MAC")
cmd.Flags().StringVarP(&dstMAC, "dst-mac", "", "", "destination node MAC")
cmd.Flags().Uint16VarP(&srcPort, "src-port", "", 0, "source port for TCP packet")
cmd.Flags().Uint16VarP(&dstPort, "dst-port", "", 0, "destination port for TCP packet")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is these changes needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really but make command line more consistent, this doesn't break the API

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@safchain
Copy link
Collaborator Author

safchain commented Sep 2, 2019

Using the mode unique per node we should be able to identify the flows. Let say we take the srcPort of 50000 and we do have 5 source nodes then we know that the source ports will be between 50000 and 50005. We can use the same approach with the ICMP ID

@safchain safchain force-pushed the improve-pi-inc-backup branch from 5034336 to 0d6255b Compare September 24, 2019 15:40
@safchain safchain changed the title WIP Improve PI unique packet generation Improve PI unique packet generation Sep 24, 2019
@safchain
Copy link
Collaborator Author

run skydive-compile-tests

@safchain safchain marked this pull request as ready for review September 24, 2019 15:53
@safchain safchain force-pushed the improve-pi-inc-backup branch 2 times, most recently from add5f43 to 4d1bb77 Compare September 25, 2019 06:00
@safchain
Copy link
Collaborator Author

run skydive-cdd-overview-tests
run skydive-compile-tests
run skydive-functional-tests-backend-orientdb

@safchain safchain force-pushed the improve-pi-inc-backup branch from 54cbf25 to cda2062 Compare September 25, 2019 08:48
@safchain
Copy link
Collaborator Author

run skydive-functional-tests-backend-orientdb
run skydive-functional-tests-backend-elasticsearch
run skydive-functional-tests-backend-orientdb

@safchain
Copy link
Collaborator Author

run skydive-cdd-overview-tests

@safchain
Copy link
Collaborator Author

run skydive-cdd-overview-tests
run skydive-functional-tests-backend-orientdb
run skydive-k8s-tests

if nodeID, host, ok := toRegister(nr); ok {
nps[nodeID] = nodeTask{nodeID, host, nr.Resource}
}
/*switch i.(type) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be removed instead of commented ?

return h.applyGremlinExpr(query)

if nodes := h.applyGremlinExpr(query); len(nodes) > 0 {
for _, i := range nodes {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be done in applyGremlinExpr ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applyGremlinExpr is called somewhere else so I would prefer to keep this as it is

@safchain safchain force-pushed the improve-pi-inc-backup branch 5 times, most recently from 9b8e602 to 1ec024c Compare September 27, 2019 16:25
cmd.Flags().Uint16VarP(&id, "id", "", 0, "ICMP identification")
cmd.Flags().BoolVarP(&increment, "increment", "", false, "increment ICMP id for each packet")
cmd.Flags().Int64VarP(&incrementPayload, "incrementPayload", "", 0, "increase payload for each packet")
cmd.Flags().StringVarP(&mode, "mode", "", "unique", "specify mode of packet generation, `unique` or `random`")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to check if the specified value is either "unique" or "random"

@safchain safchain force-pushed the improve-pi-inc-backup branch 4 times, most recently from 0b82fa0 to 94d9905 Compare October 1, 2019 06:52
@lebauce
Copy link
Member

lebauce commented Oct 1, 2019

run skydive-functional-tests-backend-orientdb

dstmac="", srcport=0, dstport=0, type="icmp4", payload="",
trackingid="", icmpid=0, count=1, interval=0,
increment=False, starttime="", ttl=64):
mode=0, starttime="", ttl=64):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be mode="" now

return errors.New("given type is not supported")
}

if pi.Mode != "" && pi.Mode != "unique" && pi.Mode != "random" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pi.Mode != PIModeUniqPerNode && pi.Mode != PIModeRandom

@safchain safchain force-pushed the improve-pi-inc-backup branch from 94d9905 to c72ebb0 Compare October 1, 2019 13:20
@safchain safchain force-pushed the improve-pi-inc-backup branch from c72ebb0 to 24ced98 Compare October 1, 2019 13:44
@safchain
Copy link
Collaborator Author

safchain commented Oct 1, 2019

run skydive-cdd-overview-tests

1 similar comment
@safchain
Copy link
Collaborator Author

safchain commented Oct 1, 2019

run skydive-cdd-overview-tests

@lebauce lebauce merged commit d77bd29 into skydive-project:master Oct 1, 2019
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

Successfully merging this pull request may close these issues.

3 participants