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

Network #44

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Network #44

wants to merge 5 commits into from

Conversation

mirek23
Copy link

@mirek23 mirek23 commented Nov 17, 2021

New features added:

  1. the network statistics for Linux and RTEMS 4.10
  2. not connected CA links
  3. not connected PVs when sequencer programs are used

@mirek23
Copy link
Author

mirek23 commented Nov 17, 2021

network monitoring

Copy link
Member

@anjohnson anjohnson left a comment

Choose a reason for hiding this comment

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

Hi Mirek, here are a few comments and high-level questions about this PR. This module doesn't really have a maintainer at the moment, but as a representative of a site that is using it I'm hoping it will get some more attention which I think it badly needs.

Thanks for wanting to make it better!

  • Andrew

MAKE_TEST_IOC_APP=YES

#MAKE_TEST_IOC_APP=YES
MAKE_TEST_NET_IOC_APP=YES
Copy link
Member

Choose a reason for hiding this comment

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

The configure/RELEASE file is only supposed to contain variables with paths pointing to other modules. I know you didn't start this, but you're changing it so please move this variable to the configure/CONFIG_SITE file where it really belongs.

/* #if HAVE_CONFIG_H
#include "config.h"
#endif

Copy link
Member

Choose a reason for hiding this comment

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

There is a large block of commented-out #include statements being added starting here. If they aren't required please don't add them to the code; if they are they shouldn't be commented out...

{ NULL, 0.0 },
};

#ifdef WITH_NETWORK_SUPPORT
/* add here network support */
#endif
Copy link
Member

Choose a reason for hiding this comment

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

Is there something missing here?

@@ -692,7 +1005,7 @@ static double minMBuf(int pool)
int i = 0;
double lowest = 1.0, comp;

while ((i < CLUSTSIZES) && (clustinfo[pool][i][0] != 0))
while ((clustinfo[pool][i][0] != 0) && (i < CLUSTSIZES))
Copy link
Member

Choose a reason for hiding this comment

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

I would normally expect an index check to be done before actually using the index (so you don't try to read from storage that you don't own), can you explain why you swapped these around?

extern struct dbBase *pdbbase;

long ioccar(char *precordname,int level, int *Pcal, int *Pcalnconn, int *Pcaldconn)
{
Copy link
Member

Choose a reason for hiding this comment

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

This routine looks to be doing almost the same thing as the dbcaStats() provided by the IOC (see dbCaTest.h) — is it really necessary to duplicate it instead of just calling that? The code here also needs careful examination because it hasn't had all of its printf() calls replaced properly...

printf("\t\ttx_packets = %10u; rx_packets = %10u\n"
"\t\ttx_bytes = %10u; rx_bytes = %10u\n"
"\t\ttx_dropped = %10u; rx_dropped = %10u\n"
"\t\tmulticast = %10u; collisions = %10u\n",
Copy link
Member

Choose a reason for hiding this comment

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

More commented-out code, not really suitable for merging.

@@ -0,0 +1,301 @@
record(stringin, "$(IOCNAME):STARTTOD")
{
Copy link
Member

Choose a reason for hiding this comment

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

I'm seeing duplication of records here, can you explain if and how these are supposed to differ? For example there's an $(IOCNAME):STARTTOD record in the ioc.template file which the build instantiates into several different installed DB files.

@simon-ess simon-ess self-assigned this Feb 21, 2022
@simon-ess
Copy link
Contributor

Hi @mirek23 - I am looking to take over responsibility for the iocStats module. I see here that @anjohnson has a few comments for you, do you have any updates to this pull request?

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