Lines Matching refs:tcx
8 #include <net/tcx.h>
144 struct tcx_link *tcx = tcx_link(link);
145 bool created, ingress = tcx->location == BPF_TCX_INGRESS;
147 struct net_device *dev = tcx->dev;
171 struct tcx_link *tcx = tcx_link(link);
172 bool ingress = tcx->location == BPF_TCX_INGRESS;
178 dev = tcx->dev;
196 tcx->dev = NULL;
206 struct tcx_link *tcx = tcx_link(link);
207 bool ingress = tcx->location == BPF_TCX_INGRESS;
213 dev = tcx->dev;
253 const struct tcx_link *tcx = tcx_link(link);
257 if (tcx->dev)
258 ifindex = tcx->dev->ifindex;
263 tcx->location,
264 tcx->location == BPF_TCX_INGRESS ? "ingress" : "egress");
270 const struct tcx_link *tcx = tcx_link(link);
274 if (tcx->dev)
275 ifindex = tcx->dev->ifindex;
278 info->tcx.ifindex = ifindex;
279 info->tcx.attach_type = tcx->location;
298 static int tcx_link_init(struct tcx_link *tcx,
304 bpf_link_init(&tcx->link, BPF_LINK_TYPE_TCX, &tcx_link_lops, prog);
305 tcx->location = attr->link_create.attach_type;
306 tcx->dev = dev;
307 return bpf_link_prime(&tcx->link, link_primer);
315 struct tcx_link *tcx;
324 tcx = kzalloc(sizeof(*tcx), GFP_USER);
325 if (!tcx) {
329 ret = tcx_link_init(tcx, &link_primer, attr, dev, prog);
331 kfree(tcx);
334 ret = tcx_link_prog_attach(&tcx->link, attr->link_create.flags,
335 attr->link_create.tcx.relative_fd,
336 attr->link_create.tcx.expected_revision);
338 tcx->dev = NULL;