AltraMayor / XIA-for-Linux

XIA implementation for the Linux kernel
https://github.com/AltraMayor/XIA-for-Linux/wiki
Other
92 stars 42 forks source link

Add Ethernet principal #19

Closed sauravkumar2014 closed 6 years ago

sauravkumar2014 commented 7 years ago

Production type commits.

AltraMayor commented 7 years ago

Hi @sauravkumar2014,

While I review the code, run checkpatch.pl (it is available in the kernel source) on all files of this pull request and address the feedback obtained. You should run checkpatch.pl on all files you modified or created. For example, on net/xia/ppal_ether/main.c, I got the following feedback:

$ scripts/checkpatch.pl -f net/xia/ppal_ether/main.c
WARNING: braces {} are not necessary for single statement blocks
#28: FILE: main.c:28:
+   if (rc) {
+       fxid_free_norcu(xtbl, &leid->xel_common);
+   }

ERROR: trailing whitespace
#70: FILE: main.c:70:
+^I/* Add the netlink attribute "destination address" to $

ERROR: trailing whitespace
#71: FILE: main.c:71:
+^I * the nl_msg contained inside the skb. $

ERROR: trailing whitespace
#98: FILE: main.c:98:
+^Iif (!cfg->xfc_dst || !cfg->xfc_odev || !cfg->xfc_lladdr $

ERROR: code indent should use tabs where possible
#99: FILE: main.c:99:
+^I^I        || cfg->xfc_lladdr_len != cfg->xfc_odev->addr_len )$

ERROR: space prohibited before that close parenthesis ')'
#99: FILE: main.c:99:
+               || cfg->xfc_lladdr_len != cfg->xfc_odev->addr_len )

ERROR: trailing whitespace
#101: FILE: main.c:101:
+^I$

WARNING: line over 80 characters
#106: FILE: main.c:106:
+   if (!(out_interface->flags & IFF_UP) || (out_interface->flags & IFF_LOOPBACK))

[There many more items here, I'm leaving them off to short this output]

total: 55 errors, 21 warnings, 833 lines checked

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

main.c has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

You may see a long message at the begging of the output that starts with "Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/((?^x:"; you can ignore it since it has to do with checkpatch.pl, not your code. I omitted this long message in the output above.

Once you address all the feedback on all files, run checkpatch.pl again to make sure that you didn't introduce another style issue.

sauravkumar2014 commented 7 years ago

I have updated the pull request according to reviews. I would request mentors to please have one last look.

AltraMayor commented 7 years ago

Patch xia/ether: add basic principal template is ready for merge.

sauravkumar2014 commented 7 years ago

Hi @AltraMayor , I have carried out all the requests listed above and also compiled and checked the code. The styling error script has also been run and verified. Please review the code. Thank you.

AltraMayor commented 7 years ago

Patch xia/ether: add device registration functions is ready for merge.

AltraMayor commented 7 years ago

Patch net/ether: add local table is ready for merge.

sauravkumar2014 commented 7 years ago

Hi @AltraMayor, I have committed the requested changes and also tested and compiled the code.

AltraMayor commented 6 years ago

Patch xia/ether: add main table is ready for merge.

AltraMayor commented 6 years ago

Patch xia/ether: add cached hdr is ready for merge.

AltraMayor commented 6 years ago

Congratulations on your first merged pull request, @sauravkumar2014!

sauravkumar2014 commented 6 years ago

Thank you @AltraMayor .