x_mtu to 0. So that dev_set_mtu() will not check the mtu range,
and can be set with any value.
CC: Eric Dumazet
CC: Sabrina Dubroca
Signed-off-by: Zhang Shengju
---
drivers/net/dummy.c | 2 +-
drivers/net/ifb.c | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net
device MTU validation check.
Signed-off-by: Zhang Shengju
---
drivers/net/ifb.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index 8870bd2..ce84ad2 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -282,6 +282,14 @@ static int ifb_validate
patch adds device MTU validation check.
Signed-off-by: Zhang Shengju
---
drivers/net/dummy.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
index e31ab3b..0276b2b 100644
--- a/drivers/net/dummy.c
+++ b/drivers/net/dummy.c
@@ -365,6 +365,14
This patch serial add device MTU validation check, so that only valid mtu value
can be set when adding new device.
Zhang Shengju (2):
dummy: add device MTU validation check
ifb: add device MTU validation check
drivers/net/dummy.c | 8
drivers/net/ifb.c | 8
2 files
This patch checks data first at one place, return if it's null.
Signed-off-by: Zhang Shengju
---
drivers/net/macvlan.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index d2aea96..1ffe77e 100644
--- a/driver
This patch adds a new function igb_get_max_rss_queues() to get maximum
RSS queues, this will reduce duplicate code and facilitate future
maintenance.
Signed-off-by: Zhang Shengju
---
drivers/net/ethernet/intel/igb/igb.h | 1 +
drivers/net/ethernet/intel/igb/igb_ethtool.c | 32
Dummy device name is enumerated by the kernel, let user space be aware
of the naming scheme used by dummy devices:
(visible in /sys/class/net//name_assign_type).
Signed-off-by: Zhang Shengju
---
drivers/net/dummy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net
Replace shift instead of expensive divide.
Signed-off-by: Zhang Shengju
---
drivers/net/ethernet/emulex/benet/be_main.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c
b/drivers/net/ethernet/emulex/benet/be_main.c
index
This patch adds a new function igb_get_max_rss_queues() to get maximum
RSS queues, this will reduce duplicate code and facilitate future
maintenance.
Signed-off-by: Zhang Shengju
---
drivers/net/ethernet/intel/igb/igb.h | 1 +
drivers/net/ethernet/intel/igb/igb_ethtool.c | 32
The macvlan dev should propagate the return value of mac address change for
lower device in the passthru mode, instead of always return 0.
Signed-off-by: Zhang Shengju
---
drivers/net/macvlan.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/macvlan.c b
Remove unnecessary set of flag IFF_BROADCAST, since ether_setup
already does this.
Signed-off-by: Zhang Shengju
---
drivers/net/fjes/fjes_main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c
index ae48c80..b56e07f 100644
--- a
Add a new macro MODULE_ALIAS_VPORT_TYPE to unify and simplify the
declaration of vport type alias.
Signed-off-by: Zhang Shengju
---
net/openvswitch/vport-geneve.c | 2 +-
net/openvswitch/vport-gre.c| 2 +-
net/openvswitch/vport-vxlan.c | 2 +-
net/openvswitch/vport.h| 3 +++
4
Add a new macro MODULE_ALIAS_VPORT_TYPE to unify and simplify the
declaration of vport type alias, and replace magic numbers with
symbolic constants.
Signed-off-by: Zhang Shengju
---
net/openvswitch/vport-geneve.c | 2 +-
net/openvswitch/vport-gre.c| 2 +-
net/openvswitch/vport-vxlan.c | 2
Add a new macro MODULE_ALIAS_TEAM_MODE to unify and simplify the
declaration of team mode alias.
Signed-off-by: Zhang Shengju
---
drivers/net/team/team_mode_activebackup.c | 2 +-
drivers/net/team/team_mode_broadcast.c| 2 +-
drivers/net/team/team_mode_loadbalance.c | 2 +-
drivers/net
Since register_netdevice() already call add_device_randomness() and
dev_set_mac_address() will call it after mac address change.
It's not necessary to call at device UP.
Signed-off-by: Zhang Shengju
---
net/core/dev.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/core/dev.c b/net
Since register_netdevice() already call add_device_randomness() and
dev_set_mac_address() will call it after mac address change.
It's not necessary to call at device UP.
Signed-off-by: Zhang Shengju
---
net/core/dev.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/core/dev.c b/net
Since netif_carrier_on() will do nothing if device's carrier is already
on, so it's unnecessary to do carrier status check.
It's the same for netif_carrier_off().
Signed-off-by: Zhang Shengju
---
net/core/dev.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
d
Add support to set IFLA_CARRIER attribute.
Signed-off-by: Zhang Shengju
---
ip/iplink.c | 12
1 file changed, 12 insertions(+)
diff --git a/ip/iplink.c b/ip/iplink.c
index 866ad72..263bfdd 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -72,6 +72,7 @@ void iplink_usage(void
This patch updates the comment for netif_dormant() function to reflect
the intended usage.
Signed-off-by: Zhang Shengju
---
include/linux/netdevice.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 5d5267f
Remove first zero for add, and use full attribute name in comments.
Signed-off-by: Zhang Shengju
---
drivers/net/macsec.c | 25 -
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
index cc00eb0..f83cf66 100644
After commit 61e84623ace3 ("net: centralize net_device min/max MTU checking"),
the mtu range for dummy device becomes [68, 1500].
This patch extends it to [0, 65535].
v2
- fix typo in commit message
Signed-off-by: Zhang Shengju
---
drivers/net/dummy.c | 3 +++
1 file changed, 3
After commit 61e84623ace3 ("net: centralize net_device min/max MTU checking"),
the mtu range for dummy device becomes [68, 1500].
This patch expends it to [0, 65535].
Signed-off-by: Zhang Shengju
---
drivers/net/dummy.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/n
Since commit 61e84623ace3 ("net: centralize net_device min/max MTU checking"),
mtu range is checked at dev_set_mtu().
This patch adds min_mtu for nlmon device and remove unnecessary
ndo_change_mtu() function.
Signed-off-by: Zhang Shengju
---
drivers/net/nlmon.c | 20 +
Currently, icmp_rcv() always return zero on a packet delivery upcall.
To make its behavior more compliant with the way this API should be
used, this patch changes this to let it return NET_RX_SUCCESS when the
packet is proper handled, and NET_RX_DROP otherwise.
Signed-off-by: Zhang Shengju
Since offset is zero, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 +-
1 file changed, 1 insertion(+), 1 del
Since offset is zero, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju
---
drivers/net/ethernet/mellanox/mlx4/en_selftest.c | 2 +-
1 file changed, 1 insertion(+), 1 del
Since offset is zero, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju
---
drivers/net/ethernet/qlogic/qede/qede_main.c | 2 +-
1 file changed, 1 insertion(+), 1 del
This patch serial replace 'set' function to 'reset', since the offset is zero.
It's not necessary to use set, reset function is straightforward, and will
remove the unnecessary add operation in set function.
Zhang Shengju (5):
qede: use reset to set network header
Since offset is zero, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju
---
drivers/staging/wilc1000/linux_mon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Since offset is zero, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju
---
drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 2 +-
1 file changed, 1 insertion(+), 1 del
Before this patch, function ndo_dflt_fdb_dump() will always return code
from uc fdb dump. The reture code of mc fdb dump is lost.
Signed-off-by: Zhang Shengju
---
net/core/rtnetlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
ple change
Signed-off-by: Zhang Shengju
---
net/core/neighbour.c | 15 +--
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 2ae929f..782dd86 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2291,
filtered out neighs to be scanned
mulitple
times.
This patch make idx as the absolute index in the list, it will increase no
matter
whether the neigh is filtered. This will prevent the above problem.
And this is in line with other dump functions.
Signed-off-by: Zhang Shengju
---
net/c
This patch replaces printk() with netdev_err() for macvtap device.
Signed-off-by: Zhang Shengju
---
drivers/net/macvtap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index 5da9861..2513939 100644
--- a/drivers/net/macvtap.c
Loop index in neigh dump function is not updated correctly under some
circumstances, this patch will fix it.
Fixes: 16660f0bd9 ("net: Add support for filtering neigh dump by device index")
Fixes: 21fdd092ac ("net: Add support for filtering neigh dump by master device")
Add missing team and team_slave link type.
Signed-off-by: Zhang Shengju
---
ip/iplink.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ip/iplink.c b/ip/iplink.c
index a8b49c5..1e603e7 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -98,8 +98,8 @@ void iplink_usage(void
Loop index in neigh dump function is not updated correctly under some
circumstances, this patch will fix it.
Signed-off-by: Zhang Shengju
---
net/core/neighbour.c | 39 ++-
1 file changed, 18 insertions(+), 21 deletions(-)
diff --git a/net/core/neighbour.c b
ff-by: Zhang Shengju
---
net/core/rtnetlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index f4b9350..09e115b 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2734,7 +2734,7 @@ static u16 rtnl_calcit(struct sk
This patch reduce the size of message sent to kernel space. Before this
patch, for command: 'ip link show', we will sent 1056 bytes. With this
patch, we only need to send 40 bytes.
Signed-off-by: Zhang Shengju
---
lib/libnetlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletio
If the link is filtered out, loop index should also be updated. If not,
loop index will not be correct.
Signed-off-by: Zhang Shengju
---
net/core/rtnetlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index db313ec..f4b9350
default qlen 1000
link/ether 4e:3b:d3:6c:f0:e6 brd ff:ff:ff:ff:ff:ff
12: dummy1: mtu 1500 qdisc noop state DOWN mode DEFAULT group
test qlen 1000
link/ether d6:9c:a4:1f:e7:e5 brd ff:ff:ff:ff:ff:ff
Signed-off-by: Zhang Shengju
---
lib/rt_names.c | 8 ++--
1 file changed, 6 insertions
Set name_assign_type of internal port to NET_NAME_USER.
Signed-off-by: Zhang Shengju
---
net/openvswitch/vport-internal_dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/openvswitch/vport-internal_dev.c
b/net/openvswitch/vport-internal_dev.c
index 2ee48e4..434e04c
Bond device gets it's mac address from the first slave device, it's not
necessary to set slave device's mac address to bond if equal.
Signed-off-by: Zhang Shengju
---
drivers/net/bonding/bond_main.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/driv
This patch moves output message before setting slave to inactive, this will
print the correct status of slave device.
Signed-off-by: Zhang Shengju
---
drivers/net/bonding/bond_main.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b
This patch series remove duplicate set of flag IFF_MULTICAST.
Zhang Shengju (2):
bonding: remove duplicate set of flag IFF_MULTICAST
team: remove duplicate set of flag IFF_MULTICAST
drivers/net/bonding/bond_main.c | 2 +-
drivers/net/team/team.c | 1 -
2 files changed, 1 insertion
Remove unnecessary set of flag IFF_MULTICAST, since ether_setup
already does this.
Signed-off-by: Zhang Shengju
---
drivers/net/team/team.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 2769835..26c64d2 100644
--- a/drivers/net/team
Remove unnecessary set of flag IFF_MULTICAST, since ether_setup
already does this.
Signed-off-by: Zhang Shengju
---
drivers/net/bonding/bond_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index b6236ff
Fix a comment typo.
Signed-off-by: Zhang Shengju
---
include/uapi/linux/if.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/if.h b/include/uapi/linux/if.h
index 9cf2394..f802775 100644
--- a/include/uapi/linux/if.h
+++ b/include/uapi/linux/if.h
@@ -37,7
Update this manual to add attributes proxy_neigh and
ignore_routes_with_linkdown.
Signed-off-by: Zhang Shengju
---
man/man8/ip-netconf.8 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/man8/ip-netconf.8 b/man/man8/ip-netconf.8
index 2718258..7fe3e5f 100644
--- a/man/man8
This patch series add support for ignore route attribute.
v1->v2:
- update manual
- use rta_getattr_* instead of RTA_DATA
- fix code styles
Zhang Shengju (2):
netconf: add support for ignore route attribute
man: update netconf manual for new attributes
ip/ipnetconf.c|
Add support for ignore route attribute, and refine the code to use
rta_getattr_* function to get attribute value.
Signed-off-by: Zhang Shengju
---
ip/ipnetconf.c | 25 +
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/ip/ipnetconf.c b/ip/ipnetconf.c
index
Add support for ignore_routes_with_linkdown attribute.
Signed-off-by: Zhang Shengju
---
ip/ipnetconf.c | 4
1 file changed, 4 insertions(+)
diff --git a/ip/ipnetconf.c b/ip/ipnetconf.c
index eca6eee..6fec818 100644
--- a/ip/ipnetconf.c
+++ b/ip/ipnetconf.c
@@ -119,6 +119,10 @@ int
This patch adds macro NETCONFA_ALL to represent all type of netconf
attributes for IPv4 and IPv6.
Signed-off-by: Zhang Shengju
---
include/uapi/linux/netconf.h | 1 +
net/ipv4/devinet.c | 40 +++-
net/ipv6/addrconf.c | 36
Add macro IN_DEV_DROP_GRATUITOUS_ARP to facilitate getting
drop_gratuitous_arp value.
Signed-off-by: Zhang Shengju
---
include/linux/inetdevice.h | 3 +++
net/ipv4/arp.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/linux/inetdevice.h b/include/linux
led, call kfree_skb() instead of consume_skb(), then
return the correct return value.
Signed-off-by: Zhang Shengju
---
net/ipv4/arp.c | 35 ---
1 file changed, 20 insertions(+), 15 deletions(-)
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index c102eb5..c34c754 100
Since offset is zero, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju
---
net/wireless/util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/wir
Since offset is zero, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju
---
drivers/net/wireless/mac80211_hwsim.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
This patch series replace set function with reset when offset is zero.
Changes since v1:
- fix typo in commit message
Zhang Shengju (4):
vxlan: use reset to set header pointers
mac80211_hwsim: use reset to set mac header
mac80211: use reset to set header pointer
wireless: use reset to
Since offset is zero, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju
---
net/mac80211/mesh_hwmp.c | 6 +++---
net/mac80211/rx.c| 2 +-
net/mac80211/status.c
Since offset is zero, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add operation
in set function.
Signed-off-by: Zhang Shengju
---
drivers/net/vxlan.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dr
This patch series replace set function with reset when offset is zero.
Zhang Shengju (4):
vxlan: use reset to set header pointers
mac80211_hwsim: use reset to set mac header
mac80211: use reset to set header pointer
wireless: use reset to set mac header
drivers/net/vxlan.c
Since offset is zeor, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju
---
drivers/net/wireless/mac80211_hwsim.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Since offset is zeor, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju
---
net/mac80211/mesh_hwmp.c | 6 +++---
net/mac80211/rx.c| 2 +-
net/mac80211/status.c
Since offset is zeor, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add operation
in set function.
Signed-off-by: Zhang Shengju
---
drivers/net/vxlan.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dr
Since offset is zeor, it's not necessary to use set function. Reset
function is straightforward, and will remove the unnecessary add
operation in set function.
Signed-off-by: Zhang Shengju
---
net/wireless/util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/wir
Currently, arp_rcv() always return zero on a packet delivery upcall.
To make its behavior more compliant with the way this API should be
used, this patch changes this to let it return NET_RX_SUCCESS when the
packet is proper handled, and NET_RX_DROP otherwise.
Signed-off-by: Zhang Shengju
If skb_reorder_vlan_header() failed, skb is freed and NULL is returned.
Then at skb_vlan_untag(), it will free skbuff again which cause double free.
This patch removes kfree_skb() call in function skb_reorder_vlan_header().
Signed-off-by: Zhang Shengju
---
net/core/skbuff.c | 4 +---
1 file
If skb_reorder_vlan_header() failed, skb is freed and NULL is returned.
Then at skb_vlan_untag(), it will free skbuff again which cause double
free.
This patch removes kfree_skb() call in function skb_reorder_vlan_header().
Signed-off-by: Zhang Shengju
---
net/core/skbuff.c | 1 -
1 file
Since offset is zero, it's not necessary to use set function.
Signed-off-by: Zhang Shengju
---
net/core/pktgen.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 1474cfd..20999aa 100644
--- a/net/core/pktgen.c
+++ b/net
cuous mode needlessly. If underlying device does not
support unicast filtering, that device will enter promiscuous mode.
Signed-off-by: Zhang Shengju
---
net/8021q/vlan.c | 1 -
net/8021q/vlan_dev.c | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/8021q/vlan.c b/net/80
Since function vlan_proc_rem_dev() will only return 0, it's better to
return void instead of int.
Signed-off-by: Zhang Shengju
---
net/8021q/vlanproc.c | 3 +--
net/8021q/vlanproc.h | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/net/8021q/vlanproc.c b/net/
Since function vlan_proc_rem_dev() will only return 0, it's better to
return void instead of int.
Signed-off-by: Zhang Shengju
---
net/8021q/vlanproc.c | 3 +--
net/8021q/vlanproc.h | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/8021q/vlanproc.c b/net/
Use IFF_NO_QUEUE to indicate that a device can run without a qdisc.
Signed-off-by: Zhang Shengju
---
drivers/net/macvlan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 94e6888..426a2cc 100644
--- a/drivers/net/macvlan.c
PHRD_ETHER.
It's not necessary for the following three places, they changed neither bond
mac address nor type. It's straightforward to return directly.
Signed-off-by: Zhang Shengju
---
drivers/net/bonding/bond_main.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
d
Replace 'goto' with 'return' to remove unnecessary check at label:
err_undo_flags.
Signed-off-by: Zhang Shengju
---
drivers/net/bonding/bond_main.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net
remove some redudant brackets, use sizeof(*) instead of sizeof(struct x).
Signed-off-by: Zhang Shengju
---
drivers/net/bonding/bond_main.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index
netdev_dbg() will add bond device name, it will be helpful if we print
slave device name.
Signed-off-by: Zhang Shengju
---
drivers/net/bonding/bond_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
:
'i40e_add_geneve_port' defined but not used [-Wunused-function]
drivers/net/ethernet/intel/i40e/i40e_main.c:8651:13: warning:
'i40e_del_geneve_port' defined but not used [-Wunused-function]
Signed-off-by: Zhang Shengju
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 13 +---
the warning was:
iproute.c:301:12: warning: 'val' may be used uninitialized in this
function [-Wmaybe-uninitialized]
features &= ~RTAX_FEATURE_ECN;
^
iproute.c:575:10: note: 'val' was declared here
__u32 val;
^
Signed-off-by: Zhang Shengju
---
Cut one level indentation to make things easier to read.
Signed-off-by: Zhang Shengju
---
ip/iplink.c | 65 +++--
1 file changed, 33 insertions(+), 32 deletions(-)
diff --git a/ip/iplink.c b/ip/iplink.c
index 520f750..504aa74 100644
--- a
Add missing file close.
Signed-off-by: Zhang Shengju
---
ip/ipnetns.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/ip/ipnetns.c b/ip/ipnetns.c
index 088096f..d1af0c6 100644
--- a/ip/ipnetns.c
+++ b/ip/ipnetns.c
@@ -462,8 +462,10 @@ static int netns_pids(int argc, char **argv
Add mising close() calls.
Signed-off-by: Zhang Shengju
---
lib/namespace.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/namespace.c b/lib/namespace.c
index 8197165..025ed47 100644
--- a/lib/namespace.c
+++ b/lib/namespace.c
@@ -45,7 +45,7 @@ static void bind_etc
This patch set adds some missing close() calls.
Zhang Shengju (2):
libs: close file in netns_switch()
netns: add missing file close
ip/ipnetns.c| 5 +
lib/namespace.c | 6 +++---
2 files changed, 8 insertions(+), 3 deletions(-)
--
1.8.3.1
--
To unsubscribe from this list: send
Add missing return value to fix warnings
Signed-off-by: Zhang Shengju
---
include/utils.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/utils.h b/include/utils.h
index 95d162c..0c57ccd 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -137,7 +137,7 @@ const
Remove unnecessary retrun, because invarg() exit.
Signed-off-by: Zhang Shengju
---
ip/iplink_bridge.c | 30 --
1 file changed, 12 insertions(+), 18 deletions(-)
diff --git a/ip/iplink_bridge.c b/ip/iplink_bridge.c
index e704e29..61e4cda 100644
--- a/ip
Enhance promtp message for 'spoofchk' and 'query_rss' flag, and fix a
typo.
Signed-off-by: Zhang Shengju
---
ip/iplink.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ip/iplink.c b/ip/iplink.c
index 1836889..520f750 100644
--- a/ip/iplink
fix a typo: "noarp" -> "arp"
Signed-off-by: Zhang Shengju
---
ip/iplink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ip/iplink.c b/ip/iplink.c
index 7e5c466..fa8aa47 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -507,7 +507,7 @@ int iplink_pars
Add missing link type "bridge_slave".
Signed-off-by: Zhang Shengju
---
ip/iplink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ip/iplink.c b/ip/iplink.c
index de5a3c9..7e5c466 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -93,7 +93,7 @@ void iplink_
Allow to print link type usage by: ip link help bridge
Signed-off-by: Zhang Shengju
---
ip/iplink_bridge.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/ip/iplink_bridge.c b/ip/iplink_bridge.c
index 297160c..1e69960 100644
--- a/ip/iplink_bridge.c
+++ b
This patch set enables bridge related links to print usage with short format.
Or else it is needed to use the following way:
ip link { add | del | set } type TYPE help
Zhang Shengju (3):
iplink: add missing link type
iplink: use the short format to print help info
iplink
Allow to print link type usage by: ip link help bridge_slave
Signed-off-by: Zhang Shengju
---
ip/iplink_bridge_slave.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/ip/iplink_bridge_slave.c b/ip/iplink_bridge_slave.c
index a285185..4593872 100644
--- a/ip
In our manual, we have this description of 'EXIT STATUS':
Exit status is 0 if command was successful, and 1 if there is a syntax
error.
But we exit in command functions with code -1 when there is a syntax error.
It's better to use return.
Signed-off-by: Zhang Shengju
---
ip/ip
Replace white-spaces with tabs
Signed-off-by: Zhang Shengju
---
ip/ip.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ip/ip.c b/ip/ip.c
index c23de74..78134f9 100644
--- a/ip/ip.c
+++ b/ip/ip.c
@@ -64,7 +64,7 @@ static void usage(void)
static int do_help(int argc
Remove dupldated include for , since it's already
included by 'xfrm.h'.
Signed-off-by: Zhang Shengju
---
ip/ipxfrm.c | 1 -
ip/xfrm_monitor.c | 1 -
ip/xfrm_policy.c | 1 -
ip/xfrm_state.c | 1 -
4 files changed, 4 deletions(-)
diff --git a/ip/ipxfrm.c b/ip/ipxfrm.
Make sure that return value of each socket() call is properly checked
and do not continue processing if the call failed.
Signed-off-by: Zhang Shengju
---
ip/tunnel.c | 24
1 file changed, 24 insertions(+)
diff --git a/ip/tunnel.c b/ip/tunnel.c
index 33c78e3..d69fe84
95 matches
Mail list logo