search for: ifnamsiz

Displaying 20 results from an estimated 89 matches for "ifnamsiz".

2019 Mar 29
0
[PATCH net v4] failover: allow name change on IFF_UP slave interfaces
...^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +/call_netdevice_notifiers_info +1252 net/core/dev.c 1166 1167 /** 1168 * dev_change_name - change name of a device 1169 * @dev: device 1170 * @newname: name (or format string) must be at least IFNAMSIZ 1171 * 1172 * Change name of a device, can pass format strings "eth%d". 1173 * for wildcarding. 1174 */ 1175 int dev_change_name(struct net_device *dev, const char *newname) 1176 { 1177 unsigned char old_assign_type; 1178 char oldname[IFNAMSIZ]; 1179 int err = 0;...
2019 Mar 28
0
[PATCH net v3] failover: allow name change on IFF_UP slave interfaces
...: declared here int dev_open(struct net_device *dev, struct netlink_ext_ack *extack); ^~~~~~~~ vim +/dev_open +1277 net/core/dev.c 1166 1167 /** 1168 * dev_change_name - change name of a device 1169 * @dev: device 1170 * @newname: name (or format string) must be at least IFNAMSIZ 1171 * 1172 * Change name of a device, can pass format strings "eth%d". 1173 * for wildcarding. 1174 */ 1175 int dev_change_name(struct net_device *dev, const char *newname) 1176 { 1177 unsigned char old_assign_type; 1178 bool reopen_needed = false; 1179 char oldn...
2003 Dec 26
2
[Bug 84] Unaligned access in ip_tables.c:ip_packet_match
...4/netfilter/ip_tables.c 2003-12-26 12:13:58.000000000 +0200 +++ linux-2.4/net/ipv4/netfilter/ip_tables.c 2003-12-26 12:11:01.000000000 +0200 @@ -151,11 +151,11 @@ ip_packet_match(const struct iphdr *ip, } /* Look for ifname matches; this should unroll nicely. */ - for (i = 0, ret = 0; i < IFNAMSIZ/sizeof(unsigned long); i++) { - ret |= (((const unsigned long *)indev)[i] - ^ ((const unsigned long *)ipinfo->iniface)[i]) - & ((const unsigned long *)ipinfo->iniface_mask)[i]; - } + for (i = 0, ret = 0; i < IFNAMSIZ; i++) { + ret |= (indev[i] + ^ ipinfo->iniface[i]) +...
2005 Oct 31
1
ip tunnel doesn''t show warning or error
This is really strange behavior .. root@garfield ~# ip tunnel add testing123 mode ipip remote 192.168.1.1 local 192.168.1.12 root@garfield ~# ip tunnel show .. testing123: ip/ip remote 192.168.1.1 local 192.168.1.12 ttl inherit root@garfield ~# ip tunnel add testingabc mode ipip remote 192.168.1.1 local 192.168.1.12 root@garfield ~# echo $? 0 root@garfield ~# ip tunnel show .. testing123:
2008 Jul 07
3
[Bridge] [RFC PATCH 0/2] Allow full bridge configuration via sysfs
Right now, you can configure most bridge device parameters via sysfs. However, you cannot either: - add or remove bridge interfaces - add or remove physical interfaces from a bridge The attached patch set rectifies this. With this patch set, brctl (theoretically) becomes completely optional, much like ifenslave is now for bonding. (In fact, the idea for this patch, and the syntax used herein, is
2007 Apr 18
0
[Bridge] [PATCH] (9/11) bridge -- new ioctl interface for 32/64 compatiablity
...unsigned long args[3]; @@ -354,5 +358,51 @@ } } + return -EOPNOTSUPP; +} + +int br_ioctl_deviceless_stub(unsigned int cmd, unsigned long uarg) +{ + switch (cmd) { + case SIOCGIFBR: + case SIOCSIFBR: + return old_deviceless(uarg); + + case SIOCBRADDBR: + case SIOCBRDELBR: + { + char buf[IFNAMSIZ]; + + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + + if (copy_from_user(buf, (void __user *) uarg, IFNAMSIZ)) + return -EFAULT; + + buf[IFNAMSIZ-1] = 0; + if (cmd == SIOCBRADDBR) + return br_add_bridge(buf); + + return br_del_bridge(buf); + } + } + return -EOPNOTSUPP; +} + +int br_dev...
2023 Aug 08
0
[Bridge] [PATCH v2 11/14] networking: Update to register_net_sysctl_sz
...sysctl_sz for all the > > networking related files. Do this while making sure to mirror the NULL > > assignments with a table_size of zero for the unprivileged users. > > ... > > const char *dev_name_source; > > char neigh_path[ sizeof("net//neigh/") + IFNAMSIZ + IFNAMSIZ ]; > > char *p_name; > > + size_t neigh_vars_size; > > t = kmemdup(&neigh_sysctl_template, sizeof(*t), GFP_KERNEL_ACCOUNT); > > if (!t) > > @@ -3790,11 +3791,13 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p, > &gt...
2007 Apr 18
0
[Bridge] [PATCH] (4/11) bridge - ioctl cleanup and consolidation
...rg0, indices, arg1*sizeof(int)) - ? -EFAULT : arg1; + ret = copy_to_user((void *)args[1], indices, args[2]*sizeof(int)) + ? -EFAULT : args[2]; kfree(indices); return ret; @@ -283,12 +315,12 @@ if (!capable(CAP_NET_ADMIN)) return -EPERM; - if (copy_from_user(buf, (void *)arg0, IFNAMSIZ)) + if (copy_from_user(buf, (void *)args[1], IFNAMSIZ)) return -EFAULT; buf[IFNAMSIZ-1] = 0; - if (cmd == BRCTL_ADD_BRIDGE) + if (args[0] == BRCTL_ADD_BRIDGE) return br_add_bridge(buf); return br_del_bridge(buf); @@ -296,15 +328,4 @@ } return -EOPNOTSUPP; -} - - -int br...
2023 May 03
1
[PATCH v5 virtio 04/11] pds_vdpa: move enum from common to adminq header
The pds_core_logical_qtype enum and IFNAMSIZ are not needed in the common PDS header, only needed when working with the adminq, so move them to the adminq header. Note: This patch might conflict with pds_vfio patches that are in review, depending on which patchset gets pulled first. Signed-off-by: Shannon Nelson <shannon.nelson at...
2019 Mar 27
0
[PATCH net v3] failover: allow name change on IFF_UP slave interfaces
...a/net/core/dev.c >+++ b/net/core/dev.c >@@ -1171,6 +1171,7 @@ int dev_get_valid_name(struct net *net, struct net_device *dev, > int dev_change_name(struct net_device *dev, const char *newname) > { > unsigned char old_assign_type; >+ bool reopen_needed = false; > char oldname[IFNAMSIZ]; > int err = 0; > int ret; >@@ -1180,8 +1181,24 @@ int dev_change_name(struct net_device *dev, const char *newname) > BUG_ON(!dev_net(dev)); > > net = dev_net(dev); >- if (dev->flags & IFF_UP) >- return -EBUSY; >+ >+ /* Allow failover slave to rename even...
2013 May 21
1
[PATCH net-next V2 2/2] xen-netfront: split event channels support for Xen frontend driver
...o { struct napi_struct napi; - unsigned int evtchn; + /* Split event channels support, tx_* == rx_* when using + * single event channel. + */ + unsigned int tx_evtchn, rx_evtchn; + unsigned int tx_irq, rx_irq; + /* Only used when split event channels support is enabled */ + char tx_irq_name[IFNAMSIZ+4]; /* DEVNAME-tx */ + char rx_irq_name[IFNAMSIZ+4]; /* DEVNAME-rx */ + struct xenbus_device *xbdev; spinlock_t tx_lock; @@ -330,7 +338,7 @@ no_skb: push: RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(&np->rx, notify); if (notify) - notify_remote_via_irq(np->netdev->irq); + notif...
2011 Nov 11
1
[RFC] kvm tools: Implement multiple VQ for virtio-net
..._mutex_t io_tx_lock; - pthread_cond_t io_tx_cond; + pthread_t io_thread[VIRTIO_NET_NUM_QUEUES]; + pthread_mutex_t io_lock[VIRTIO_NET_NUM_QUEUES]; + pthread_cond_t io_cond[VIRTIO_NET_NUM_QUEUES]; + int rx_vq_num; + int tx_vq_num; + int vq_num; int tap_fd; char tap_name[IFNAMSIZ]; @@ -78,17 +76,22 @@ static void *virtio_net_rx_thread(void *p) struct net_dev *ndev = p; u16 out, in; u16 head; - int len; + int len, queue_num; + + mutex_lock(&ndev->mutex); + queue_num = ndev->rx_vq_num * 2; + ndev->tx_vq_num++; + mutex_unlock(&ndev->mutex); kvm...
2011 Nov 11
1
[RFC] kvm tools: Implement multiple VQ for virtio-net
..._mutex_t io_tx_lock; - pthread_cond_t io_tx_cond; + pthread_t io_thread[VIRTIO_NET_NUM_QUEUES]; + pthread_mutex_t io_lock[VIRTIO_NET_NUM_QUEUES]; + pthread_cond_t io_cond[VIRTIO_NET_NUM_QUEUES]; + int rx_vq_num; + int tx_vq_num; + int vq_num; int tap_fd; char tap_name[IFNAMSIZ]; @@ -78,17 +76,22 @@ static void *virtio_net_rx_thread(void *p) struct net_dev *ndev = p; u16 out, in; u16 head; - int len; + int len, queue_num; + + mutex_lock(&ndev->mutex); + queue_num = ndev->rx_vq_num * 2; + ndev->tx_vq_num++; + mutex_unlock(&ndev->mutex); kvm...
2009 Jun 15
0
[Bridge] [PATCH][RFC] bridge-utils: add basic VEPA support
...ridge/libbridge.h index 016acea..b232f45 100644 --- a/libbridge/libbridge.h +++ b/libbridge/libbridge.h @@ -54,6 +54,8 @@ struct bridge_info struct timeval tcn_timer_value; struct timeval topology_change_timer_value; struct timeval gc_timer_value; + unsigned char vepa_mode; + char uplink_port[IFNAMSIZ]; }; struct fdb_entry @@ -80,6 +82,7 @@ struct port_info struct timeval message_age_timer_value; struct timeval forward_delay_timer_value; struct timeval hold_timer_value; + unsigned char hairpin_mode; }; extern int br_init(void); @@ -113,4 +116,8 @@ extern int br_set_path_cost(const...
2009 Jun 15
0
[Bridge] [PATCH][RFC] bridge-utils: add basic VEPA support
...ridge/libbridge.h index 016acea..b232f45 100644 --- a/libbridge/libbridge.h +++ b/libbridge/libbridge.h @@ -54,6 +54,8 @@ struct bridge_info struct timeval tcn_timer_value; struct timeval topology_change_timer_value; struct timeval gc_timer_value; + unsigned char vepa_mode; + char uplink_port[IFNAMSIZ]; }; struct fdb_entry @@ -80,6 +82,7 @@ struct port_info struct timeval message_age_timer_value; struct timeval forward_delay_timer_value; struct timeval hold_timer_value; + unsigned char hairpin_mode; }; extern int br_init(void); @@ -113,4 +116,8 @@ extern int br_set_path_cost(const...
2009 Jun 15
0
[Bridge] [PATCH][RFC] bridge-utils: add basic VEPA support
...ridge/libbridge.h index 016acea..b232f45 100644 --- a/libbridge/libbridge.h +++ b/libbridge/libbridge.h @@ -54,6 +54,8 @@ struct bridge_info struct timeval tcn_timer_value; struct timeval topology_change_timer_value; struct timeval gc_timer_value; + unsigned char vepa_mode; + char uplink_port[IFNAMSIZ]; }; struct fdb_entry @@ -80,6 +82,7 @@ struct port_info struct timeval message_age_timer_value; struct timeval forward_delay_timer_value; struct timeval hold_timer_value; + unsigned char hairpin_mode; }; extern int br_init(void); @@ -113,4 +116,8 @@ extern int br_set_path_cost(const...
2003 May 23
7
CBQ DEVICE BW?
Hi, The CBQ config file shud be some thing like this. DEVICE=eth0,10Mbit,1Mbit RATE=50Kbit WEIGHT=5Kbit Shall i hardcode the DEVICE BW as 10/100 Mbit or Shall i use any other tool like ethtool for getting this. ethtool gives Speed: 10Mbps If so, how about, if i use some other Interfaces other than eth0, like ppp0 or some other? C''d anybody can give a suggestion over this? thanks
2007 Apr 18
1
[Bridge] Max length of bridge device name?
Hi all, Does anyone know the maximum length of the interface name created by 'brctl addbr'? How about any other restrictions on usable alphanumerics, for example is "-" (dash) or "_" (underscore) allowed, commas, periods, etc allowed? Most docs I see refer to this as br0, but I'd like to use more descriptive names, such as vlan_105, etc. Thanks in advance, Josh
2010 Dec 09
0
[PATCH linux-2.6.18-xen] make netloop permanent
...ivers/xen/netback/loopback.c --- a/drivers/xen/netback/loopback.c Tue Dec 07 18:35:16 2010 +0000 +++ b/drivers/xen/netback/loopback.c Wed Dec 08 18:27:41 2010 +0100 @@ -290,23 +290,6 @@ return err; } -static void __exit clean_loopback(int i) -{ - struct net_device *dev1, *dev2; - char dev_name[IFNAMSIZ]; - - sprintf(dev_name, "vif0.%d", i); - dev1 = dev_get_by_name(dev_name); - sprintf(dev_name, "veth%d", i); - dev2 = dev_get_by_name(dev_name); - if (dev1 && dev2) { - unregister_netdev(dev2); - unregister_netdev(dev1); - free_netdev(dev2); - free_netdev(dev1); - }...
2006 Aug 02
0
no PROMISC mode ..
...and also if you don''t agree : - The case it shows the flag with iproute is because it''s using a single flag set. That was working on kernels linux <2.1.x. (2.0 etc.) Basically the mechanism was : --- strncpy(ifr.ifr_name, our_device, IFNAMSIZ); ioctl(sock, SIOCGIFFLAGS, &ifr); ifr.ifr_flags |= IFF_PROMISC; ioctl(sock, SIOCSIFFLAGS, &ifr); --- And only one could set the IFF_PROMISC, because if another process decided to set it too, then it was cleared... - Now, wit...